Reputation: 2481
I've made ASP.NET web service, which contains one initial method called HelloWorld. I want to access to mentioned method using php and following code:
$client = new SoapClient("http://localhost:4925/Service1.asmx?WSDL");
$result = $client->HelloWorld()->TestMethodResult;
echo $result;
When I run php script, i get following error:
***Notice: Undefined property: stdClass::$TestMethodResult in C:\wamp\www\probe\servis.php on line 8***
Can someone please help?
Upvotes: 1
Views: 2944
Reputation: 71384
Since HelloWorld is the method you are trying to call, try:
$result = $client->__soapCall('HelloWord', $params);
or
$result = $client->HelloWorld($params);
Where $params
are any parameters you need to send for the method.
Upvotes: 2