Adding namespaces to SOAP-ENV::Envelope
- I'd like to be able to add further namespaces into the Envelope.
The web service I am connecting my SOAP::Lite client to declares many
methods and data types in its own namespace. SOAP::Lite handles the method
names in a rather peculiar way, and doesn't seem to handle the structure
types very well at all.
For method names, what I'm expecting is this:
<SOAP-ENV:Envelope [...] xmlns:myNamespace="myURI" [...]>
But what I'm getting is an unchanged envelope, then this:
Now, this seems to work okay (odd though it looks). The problem comes where
I need to use structures that belong to the 'myNamespace' namespace. WHat I
want to do is this:
...but the closest I've been able to get using SOAP::Lite is:
...which works (presumably because 'namesp1' was decalred and linked to the
URI in the 'myMethod' element), but I don't want to have to keep using trace
to second-guess the namepsaces that SOAP::Lite is going to auto-create for
This E-Mail and any attachment is intended only for the person or entity for
which it is addressed and may contain confidential material. If you are not
the addressee or have received this E-Mail in error, please inform the
sender immediately and delete it from your computer. In addition, if you are
not the addressee or have received this E-Mail in error, any disclosure,
copying, distribution or any action taken or omitted to be taken in reliance
upon it is prohibited and may be unlawful.
If this E-Mail has been transmitted outside the ordinary course of its
business, the company for which the sender works accepts no liability for
any loss or damage suffered by any person arising from any use of or
reliance on information contained in this E-Mail, and any opinion expressed
in this E-Mail is personal to the sender and may not reflect the opinion of
such company. Although the network operator makes every reasonable effort to
keep its network free from viruses, neither the network operator nor the
sender or the company for which the sender works accepts any responsibility
for computer viruses transmitted through this E-Mail or any attachments; it
is your responsibility to virus scan this E-Mail and any attachments. Any
E-Mail reply to this address may be subject to interception or monitoring
for operational reasons or for lawful business practices.
- This is an excellent question - something I will have to write about... at
least more explicitly on majordojo.com. Future versions of SOAP::Lite will
make this easier. Here is how *I* would address the problem:
This tells about how to override the root element of the response. In this
way you can take exact control over the namespaces and prefixes used...
> I'd like to be able to add further namespaces into the Envelope.^byrne :/
> The web service I am connecting my SOAP::Lite client to declares many
> methods and data types in its own namespace. SOAP::Lite handles the method
> names in a rather peculiar way, and doesn't seem to handle the structure
> types very well at all.
> For method names, what I'm expecting is this:
> >SOAP-ENV:Envelope [...] xmlns:myNamespace="myURI"
> To unsubscribe from this group, send an email to:
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
- On Wed, 26 Nov 2003, Byrne Reese wrote:
> This is an excellent question - something I will have to write about... atusing call() gives you a lot more flexibility.
> least more explicitly on majordojo.com. Future versions of SOAP::Lite will
> make this easier. Here is how *I* would address the problem:
which is very helpful, I have used this technique successfully to set the
namespace of the envelope, because ebXML-MS requires you specify the
namespace of things like ebXML, xlink, etc in the Envelope, Header and
Unfortunately there is still now way to specify a namespace in the
SOAP-BODY or SOAP-Header.
Any help on munging these without writing my own serializer would be much
p.s. I have uploaded version 0.6 of SOAP::Data::Builder to CPAN, it is now
more OO and doesn't churn out pages of debug info anymore. Patches welcome
Aaron J Trevena - Perl Hacker, Kung Fu Geek, Internet Consultant
AutoDia --- Automatic UML and HTML Specifications from Perl, C++
and Any Datasource with a Handler. http://droogs.org/autodia