in reply to Adding namespace in Method Response
I believe, uri() corresponds to namesp1, so combining all that information I havemy $content = SOAP::Serializer->prefix( 's' )->envelope( 'response', SOAP::Data->name( $response->soapmethod() . 'Response' )->uri( + $response->soapuri() ), # Do we need to serialize the content or not? ( $_[STATE] eq 'RAWDONE' ? SOAP::Data->type( 'xml', $response- +>content() ) : $response->content() ), );
which outputs a body#!/usr/bin/perl -- use strict; use warnings; use SOAP::Lite; my $content = SOAP::Serializer->prefix('s')->envelope( 'response', SOAP::Data->name( 'hi' . 'Response' ) ->uri( 'namesp1' ), 'Hello', ); print $content,"\n"; __END__
$ perl soap-lite-uri-namespace.pl |xml_grep --nowrap soap:Body |xml_pp <soap:Body> <namesp1:hiResponse xmlns:namesp1="namesp1"> <s-gensym3 xsi:type="xsd:string">Hello</s-gensym3> </namesp1:hiResponse> </soap:Body>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Adding namespace in Method Response
by inzoik (Novice) on Aug 12, 2010 at 23:14 UTC |