I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-04-22 01:18:25-07 by noah in response to 7716
Re: mucking with namespaces
Nope. If I prefix all elements with 'ns2:', I get the same error as the first example in my previous email; I just need the method call prefixed. (I've been told this is a known bug in the SOAP server I'm hitting that will be fixed eventually). I wound up subclassing SOAP::WSDL::Serializer::XSD thusly:
sub serialize { my ($self, $args_of_ref) = @_; my $xml = $self->SUPER::serialize($args_of_ref); $xml =~ s#>#xmlns:ns2=\"http://services.company.com/\">#; return $xml; } sub serialize_body { my ($self, $name, $data, $opt) = @_; $data->__set_name("ns2:$name"); no warnings 'redefine'; *MyElements::getElement::get_xmlns = sub { '' }; return $self->SUPER::serialize_body($name, $data, $opt); }
If it helps, what I'm looking for is the same functionality one would get by calling...
$soap->ns('http://services.company.com/', 'ns2');
...in SOAP::Lite. My immediate problem is solved, but if there's a better way to get this done, I'm all ears. =) Thanks, Noah
Direct Responses: Write a response