I need send a XML with this format:
<soapenv:Body>
<loc:amount>
<loc:user>user_name</loc:user>
<loc:charge>
<description>description_text</description>
</loc:charge>
</loc:amount>
I have generate the XML body with soapVar, but I cant change "ns1" tag. Source:
$var = '<loc:amount> <loc:user>user_name</loc:user> <loc:charge> <description>description_text</description> </loc:charge> </loc:amount>';
$params[0] = new SoapVar($var,XSD_ANYXML,'amount','http://mydomain.cm');
And the header result is this:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://mydomain.cm" xmlns:ns2="http://header_domain.cm">
I need this result:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:loc="http://mydomain.cm" xmlns:ns2="http://header_domain.cm">
Is possible to change 'ns1' tag to 'loc'??
Thanks
Namespace prefix names are insignificant; it is only through their binding to a namespace value that they derive meaning. No conformant XML processor will care about the specific namespace prefix names; you should not either.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With