ffrost has asked for the wisdom of the Perl Monks concerning the following question:
I have code where I've supplied a snippet of the relevant parts below:
$soap = SOAP::Lite ->proxy($proxy) ->uri($uri) ->autotype(0) ->ns('http://www.w3.org/2003/05/soap-envelope','soap') ->ns('http://mil.dod.af.A1.personnel.dataservices.filter','mil') ->ns('http://mil.dod.af.A1.personnel.dataservices.training/v2.4','v2') ->readable(1);
This creates the following output:
<soap:Envelope soap:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/ xmlns:mil=http://mil.dod.af.A1.personnel.dataservices.filter xmlns:soap=http://www.w3.org/2003/05/soap-envelope xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/ xmlns:v2=http://mil.dod.af.A1.personnel.dataservices.training/v2.4 xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance>
But I need it to look like this, without the magically included namespaces:
<soap:Envelope xmlns:mil=http://mil.dod.af.A1.personnel.dataservices.filter xmlns:v2=http://mil.dod.af.A1.personnel.dataservices.training/v2.4 xmlns:soap=http://www.w3.org/2003/05/soap-envelope>
How do I get rid of the soap:encodingStyle, xmlns:soapenc, xmlns:xsd and xmlns:xsi namespaces? If I use these extra namespaces in the web service call then it fails their validation check.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SOAP::Lite - how to remove namespaces
by ForgotPasswordAgain (Vicar) on Dec 06, 2023 at 17:59 UTC |