简体   繁体   中英

PHP site to post data to ASP.net Webservice

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

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):

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)

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM