views:

4991

answers:

1

I'm calling a webservice using the NuSoap PHP library. The webservice appears to use .NET; every time I call it I get an error about using an invalid SoapAction header. The header being sent is an empty string. How can I find the SoapAction that the server is expecting?

+4  A: 

You can see the SoapAction that the service operation you're calling expects by looking at the WSDL for the service. For .NET services, you can access the WSDL by opening a web browser to the url of the service and appending ?wsdl on the end.

Inside the WSDL document, you can see the SoapActions defined under the 'Operation' nodes (under 'Bindings'). For example:

<wsdl:operation name="Execute">
  <soap:operation soapAction="http://tempuri.org/Execute" style="document" />

Find the operation node for the operation you're trying to invoke, and you'll find the Soap Action it expects there.

Craig Vermeer