Reputation: 6618
How can I call a .Net Web Service from within php. Are there any useful libraries for php 4/5 ?
Upvotes: 4
Views: 858
Reputation: 12975
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.
Upvotes: 5
Reputation: 342635
If you don't have SoapClient installed then I would recommend nuSoap.
Upvotes: 4