views:

393

answers:

0

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