473,394 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Consuming a PHP Webservice

Hi,

as a background I have an Windows application developed with VS 2003 (c#)
that needs to transfer securely data to a MySQL database located on a Linux
server.

I have created a PHP webservice that will receive an xml file with all the
data to update an encrypted database. This way all database logic will remain
on the Linux server. The web service works OK using a testing PHP client.

The windows application will create the xml file to be transferred to the
web service to consume the webservice.

I have been reading about the ServicePoint class, proxies and WSDL, but I
feel kind of lost as I am new to web services.
Why do I need a proxy?
Can I just connect directly to the PHP web service to consume it?

I found a console sample on MSDN and try to use it to test the webservice on
Windows
http://msdn.microsoft.com/library/de...tionclient.asp

I tryed to use WSDL, but got an error saying "the HTML file specified does
not contain webservice discovery information".

I called it as:
WSDL http://linuxServer/WebService.php?wsdl

I will appreciate any guidance.

Carlos Lozano
Nov 23 '05 #1
6 10046
Just add the php as a "web reference" in your project. I did just a little
testing with just what you are trying. I was able to successfully make calls
and pass data back and forth with no problems. On the PHP side be sure to do
a google search for "nusoap" which is a very good php class package.

"Carlos Lozano" wrote:
Hi,

as a background I have an Windows application developed with VS 2003 (c#)
that needs to transfer securely data to a MySQL database located on a Linux
server.

I have created a PHP webservice that will receive an xml file with all the
data to update an encrypted database. This way all database logic will remain
on the Linux server. The web service works OK using a testing PHP client.

The windows application will create the xml file to be transferred to the
web service to consume the webservice.

I have been reading about the ServicePoint class, proxies and WSDL, but I
feel kind of lost as I am new to web services.
Why do I need a proxy?
Can I just connect directly to the PHP web service to consume it?

I found a console sample on MSDN and try to use it to test the webservice on
Windows
http://msdn.microsoft.com/library/de...tionclient.asp

I tryed to use WSDL, but got an error saying "the HTML file specified does
not contain webservice discovery information".

I called it as:
WSDL http://linuxServer/WebService.php?wsdl

I will appreciate any guidance.

Carlos Lozano

Nov 23 '05 #2
Hi,

Good you were able to test it, that confirms it will work just fine.

In fact, I am currently using NuSoap for the server implementation. Would
you mind sharing one of your samples (VB or C# would be okay) to use it as a
starting point?

I am not so versed with web services yet.

Thank you,

Carlos Lozano

"hobbyman" wrote:
Just add the php as a "web reference" in your project. I did just a little
testing with just what you are trying. I was able to successfully make calls
and pass data back and forth with no problems. On the PHP side be sure to do
a google search for "nusoap" which is a very good php class package.

"Carlos Lozano" wrote:
Hi,

as a background I have an Windows application developed with VS 2003 (c#)
that needs to transfer securely data to a MySQL database located on a Linux
server.

I have created a PHP webservice that will receive an xml file with all the
data to update an encrypted database. This way all database logic will remain
on the Linux server. The web service works OK using a testing PHP client.

The windows application will create the xml file to be transferred to the
web service to consume the webservice.

I have been reading about the ServicePoint class, proxies and WSDL, but I
feel kind of lost as I am new to web services.
Why do I need a proxy?
Can I just connect directly to the PHP web service to consume it?

I found a console sample on MSDN and try to use it to test the webservice on
Windows
http://msdn.microsoft.com/library/de...tionclient.asp

I tryed to use WSDL, but got an error saying "the HTML file specified does
not contain webservice discovery information".

I called it as:
WSDL http://linuxServer/WebService.php?wsdl

I will appreciate any guidance.

Carlos Lozano

Nov 23 '05 #3

Hi, you said
"just add the php as a "web reference" in your project"

But Im not able to do that, when I try to add the webreference .NET
searches for a .WSDL or .ASMX file with webservice defini9tion, but I
have none. Should I create one ??

--
wmaradei
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message1803421.html

Sep 15 '06 #4

Hi,

I am facing kind of similar issue. Below is the detail.

I've a Web Service created using PHP hosted on a Linux box. It's
working fine without any authentication. When I try to secure this by
enabling basic authentication using .htaccess and then try to consume
this, it fails saying

SOAP-ERROR: Parsing WSDL: Couldn't load from
http://www.xyz.com/Service/Service.php?wsdl

Can anyone please help me resolving this issue. I am using .Net as
client to consume this web service. However I am not able to consume
this neither using PHP nor using .Net.

A quick help required.

Many Thanks.
Rahul.
--
rahul.vk.khand
Jan 8 '08 #5
"rahul.vk.khand" <ra*******************@no-mx.forums.yourdomain.com.au>
wrote in message
news:ra*******************@no-mx.forums.yourdomain.com.au...
>
Hi,

I am facing kind of similar issue. Below is the detail.

I've a Web Service created using PHP hosted on a Linux box. It's
working fine without any authentication. When I try to secure this by
enabling basic authentication using .htaccess and then try to consume
this, it fails saying

SOAP-ERROR: Parsing WSDL: Couldn't load from
http://www.xyz.com/Service/Service.php?wsdl
Does it say anything else about why it can't load the WSDL? Please post the
entire exception.
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer
Jan 8 '08 #6
Does it say anything else about why it can't load the WSDL? Please post
the entire exception.
I have the same problem. I can reproduce it by browser and the output
is something like this.

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>WSDL</faultcode>
<faultstring>SOAP-ERROR: Parsing WSDL: Couldn't load from'
http://....wsdl'</faultstring>
</SOAP-ENV:Fault></SOAP-ENV:Body>
</SOAP-ENV:Envelope>

It 's the same issue rahul.vk.khand described. I use the
Prado-Framework to offer my webservice. My idea was to test NuSoap but
it sounds like there is the same problem.

regards

levi
--
levi2000
Jan 21 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: kamig | last post by:
Hi! Scenario: Consuming my webService in a windows application give denied acces! Explanation: I have to say a moveTo fn. which move one file/dir from one drive to another, <authorization>
0
by: plmanikandan | last post by:
I need to develop a application to consume a webservice. For consuming web service i tried a example in Consuming a Web Service in C# in http://www.csharphelp.com.But i am uanble to use that...
5
by: Preben Zacho | last post by:
Anyone that has a link or description that simply as possible shows how to add a web reference to a class library in C# and consuming it? TIA PZ
0
jeffbroodwar
by: jeffbroodwar | last post by:
hi, i need help about consuming webservice created in java with vb6. i've created the webservice in netbeans with sun java server bundle and used MS Soap toolkit 3.0 on the client side. i've...
2
jeffbroodwar
by: jeffbroodwar | last post by:
hi, i need help about consuming webservice created in java with vb6. i've created the webservice in netbeans with sun java server bundle and used MS Soap toolkit 3.0 on the client side. i've...
0
jeffbroodwar
by: jeffbroodwar | last post by:
hi, i need help about consuming webservice created in java with vb6. i've created the webservice in netbeans with sun java server bundle and used MS Soap toolkit 3.0 on the client side. i've...
5
jeffbroodwar
by: jeffbroodwar | last post by:
hi, i need help about consuming webservice created in java with vb6. i've created the webservice in netbeans with sun java server bundle and used MS Soap toolkit 3.0 on the client side. i've...
4
by: Boni | last post by:
I want consuming a webserivce trough a proxy. I use this code. myService s = new myService (); System.Net.WebProxy proxyObject = new System.Net.WebProxy("http://proxyhost:8080"); s.Proxy =...
1
by: Thomas Mueller | last post by:
Hi, I'm currently working on C# code consuming a PHP-webservice (soapserver-class of PHP5). A PHP test-client worked fine and achieved the requested data from the service's server. Using the...
2
by: arnomarga | last post by:
I am trying to consuming a .NET web service from a standard (classic) ASP, but having not so much luck as I dont have much experience about SOAP. Here is the webservice url:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.