PHP Server did not recognize the value of HTTP Header SOAPAction

Posted by Joe on Stack Overflow See other posts from Stack Overflow or by Joe
Published on 2010-03-24T01:38:06Z Indexed on 2010/03/24 1:43 UTC
Read the original article Hit count: 603

Filed under:
|
|
|

I am making my first SOAPclient and I am stuck with the Headers, I am getting a response and when I look at my request it has a soap:body but no soap:headers. The web service has needs 3 parameters

1.UserName
2.Password 3.errorMessage

This is the code I have set up.

$SOAPAction = 'http://localhost/DriveAwayPriceCalculation/PriceCalculation'; //Namespace of the WS. 
//


$SoapHeaders = array('User123' => $UserName, 
               'Password123' => $Password,
               '' => $errorMessage);

$client = new nusoap_client("https://test.com/CalculationWS.asmx?WSDL", false, $UserName, $Password, $errorMessage);


$headers = new SoapHeader('http://localhost/DriveAwayPriceCalculation/PriceCalculation', true, $SoapHeaders); 

As I said I am just starting out in SOAP (and PHP) so if you could help, it would be great. Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about soap