How can I call a .Net Web Service from within php. Are there any useful libraries for php 4/5 ?
+4
A:
If you don't have SoapClient installed then I would recommend nuSoap.
karim79
2009-08-12 14:26:58
+4
A:
I agree with karim79. nuSoap is an excellent, easy to use library.
Once installed, try something like this:
<?php
require_once('libs/nusoap.php');
$wsdl="http://www.mydomain.com/mywebservice.wsdl";
$client=new soapclient($wsdl, 'wsdl');
$param=array('myparam1'=>'myval1', 'myparam2'=>'myval2');
echo $client->call('mymethodname', $param);
?>
Note that webservices are platform independent by definition, so the fact that the service is written in .NET is not relevant.
JoshJordan
2009-08-12 14:29:28