php soap call without xsi:type

1.3k Views Asked by At

I am using php soap to make calls to a web service but the operator of the service wants us to switch to non-wsdl mode so it doesn't need to be exposed. I get bad requests and looking at the request generated I notice one main difference between the requests going out.

<ns1:userpwd>password</ns1:userpwd>

vs.

<ns1:userpwd xsi:type="xsd:string">password</ns1:userpwd>

All the parameters have this additional xsi:type="xsd:string" Currently I am using

new SoapParam($password, "ns1:userPWD");

to generate the parameters. What do I need to do different to omit the xsi:type attribute from the xml for the call that eventually gets sent out?

1

There are 1 best solutions below

0
On

Once again thinking the question through enough to write it up points to an answer:

new SoapVar("$password", XSD_ANYXML); produces the desired result in the request