views:

30

answers:

4

Hi,

I've got a site running on php and I need my form to post data to an ASP.Net web service. All I have from the ASP.Net web service is a url ending in .svc and then I open up the url I get another link that I can click on which ends in .svc?wdsl

This is all pretty new to me so I'm not sure where to begin, any pointers?

Thanks

A: 

It sounds like you've been given a .NET SOAP Web Service to consume.

Check out the PHP docs for consuming/working with SOAP Services:

PHP: SOAP - Manual (Paying close attention to SoapClient which is what you'll use to actually construct and call the service)

Justin Niessner
A: 

The .svc?wsdl link will give you the WSDL for the web service (which describes which methods are available and what their parameters are).

Once you have the WSDL, you can construct a SoapClient with it and call the methods.

Eric Petroelje
Thanks, much appreciated. Will check the available methods.
Steven Cheng
When I loaded up the .svc?wsdl link it loaded an xml document and I'm guessing the <wsdl:operation name="#####"> is the method?
Steven Cheng
@Steven - I believe that is correct.
Eric Petroelje
Thanks, it was correct. I wasn't given alot of info on methods or how the parameters are to be passed. I've since figured it out and everything works very well now. Thanks!
Steven Cheng
+1  A: 

The ASP.NET site is exposing a WCF service, and the ?wsdl url you're seeing (pronounced wis-dul) is a XML file which describes all of the functionality provided by the service and the input/output parameters. See the Wikipedia article on Web Services Description Language for more info.

With the small amount of background info, you can find some examples about consuming a WCF service from PHP (the fact that it's a WCF service shouldn't make any difference btw, so any example of consuming a web service should work):

wsanville
Thanks for the links, will check them both out.
Steven Cheng
A: 

steven,

you'll need to do a refresher on wsdl and webservices under .net.

there are obviously lots of places to look online but certainly if you google: 'asp.net wcf wsdl webservice' you should get plenty of hits to help you along.

jim

jim
Thanks for the pointer.
Steven Cheng