I'm trying to make a soap header that would look like this:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<a-user xmlns="a">testName</a-user>
<a-pass xmlns="a">testPassword</a-pass>
</s:Header>
<s:Body>
...
</s:Body>
</s:Envelope>
I'm pretty new to soap so I'm pretty sure I just don't understand what I'm supposed to put in for the parameters of the SoapHeader constructor, this is what I'm currently trying and it keeps failing to authenticate:
$authHeader = new SoapHeader("http://schemas.xmlsoap.org/soap/envelope/", "Envelope", array("Header" => array("a-user" => "testName", "a-pass" => "testPassword")));
Can someone explain how I'm supposed to translate that header from the xml into a php soapheader please?
Edit: Yes, agunn, I'm using a real user name and pass, I get a SoapFault exceptions saying "Vendor not authorized!" when I make my soapCall.
Here's the soap call part included:
$this->client->__setSoapHeaders($authHeader);
$response = $this->client->__soapCall("Foo", $params);