I\'m attempting to write a PHP script that will connect to the SOAP client for our SightMax interface. With the code below I am able to print out a list of functions availa
You should give the SOAP Action. Since you do not include it in the initialization of SoapClient
, it doesn't match the SOAP Action of the web service. Make sure you know what the SOAP Action is before connecting.
Read http://www.oreillynet.com/xml/blog/2002/11/unraveling_the_mystery_of_soap.html for more on the subject.
WCF seems to be looking for the action in the SOAP envelope. You can add it to your call with PHP's SoapClient this way:
$actionHeader = new SoapHeader('http://www.w3.org/2005/08/addressing',
'Action',
'http://soapaction.that.was.in.the.wsdl');
$client->__setSoapHeaders($actionHeader);
If you change the third parameter and add that between your instantiation of $client and the __call() it should clear the error (and possibly bring on new ones, isn't SOAP fun?)
Also FYI, having just gone through this same problem, I found the __getLastRequestHeaders(), __getLastRequest(), __getLastResponseHeaders(), and __getLastResponse() functions very handy to see if what I was trying had any effect (note that you need to add "trace" => "1" to your SoapClient options for those to work.)