PHP5 and SOAP is making me nuts

<geek rant>

Trying to generate a soap header using ext/soap in php5 :

What I need to create is :

...
<SOAP-ENV:HEADER>
     <USER xsi:type="xsd:string">myusername</USER>
     <PASSWORD xsi:type="xsd:string">mypasswd</PASSWORD>
</SOAP-ENV:HEADER>
...

What PHP5 is doing :

...
<SOAP-ENV:HEADER>
     <ns1:USER xsi:type="xsd:string">myusername</ns1:USER>
     <ns1:PASSWORD xsi:type="xsd:string">mypasswd</ns1:PASSWORD>
</SOAP-ENV:HEADER>
...

For whatever reason PHP requires the header parms to have a namespace which unfortunately causes the server to not understand the username/password in order to authenticate. Apparently at one point you could do this by giving a null to the namespace parm when you build the soap header, but that “bug” has apparently since then been squashed. Java will let you do this with the axis libraries, so it is at least theoretically possible with their interpretation of the soap spec. I guess I may try perl next and see if it lets me have a little more control of the soap header. And I may even try C/C++ with axis libraries.

Several Google searches and lots of time, hasn’t panned out, if you know a workaround I would definitely like to hear it.

<\geek rant>


Posted

in

by

Tags:

Comments

One response to “PHP5 and SOAP is making me nuts”

  1. craig Avatar

    I’m sure you saw this in your google searching, but what the heck:

    http://www.codecomments.com/PHP_Soap/message987627.html