Posted on 2009-06-30 18:49:06-07 by brianr in response to 10728
Re: how to coerce namespaces into the right places
Hi,

I think I'm still seeing this issue with the 2.00.10 release.

I'm using interfaces created by wsdl2perl.pl and when I snoop wire traffic, I find that many types which have a properly declared get_xmlns() sub, are serialized with an empty xmlns value.

See the entityId, uniqueKey, and tcn elements below:
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://sch +emas.xmlsoap.org/soap/envelope/" > <SOAP-ENV:Body> <updateRtms xmlns="http://server.example.com/provisioning/gateway"> <rtms> <entityId xmlns="">2</entityId> <uniqueKey xmlns="">5250</uniqueKey> <tcn xmlns="">0</tcn>

The object type for all of the xml elements contained within the <rtms> branch is MyTypes::RtmsConfig and the package contains:
package MyTypes::RtmsConfig; use strict; use warnings; __PACKAGE__->_set_element_form_qualified(0); sub get_xmlns { 'http://server.example.com/provisioning' };


I'm a bit new to this, but my expectation after reading through documentation on CPAN and various discussion forums is that I should be seeing:

<entityId xmlns="http://server.example.com/provisioning">


I hope I'm not too far off track here, as I'm new to using the SOAP::WSDL module. In my past and very limited experience with SOAP web services I've used SOAP::Lite. I'd really appreciate any pointers. Many Thanks!

-Brian
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.