That is not self contained like this
#!/usr/bin/perl -- use strict; use warnings; use SOAP::Lite; my $soap = SOAP::Lite -> uri('http://127.0.0.1/MyModule') -> proxy('http://127.0.0.1:1203') ;;;;;;;;; $soap->transport->add_handler("request_send", \&pp_dump ); $soap->transport->add_handler("response_done", \&pp_dump ); ); $soap->autotype(0)->readable(1); $soap->serializer->envprefix('S'); $soap->ns( "http://www.bluearc.com/BAService/LocalGroupProvider" , 'ns +0' ); my $evsId = SOAP::Data->new( 'name' => 'evsId', 'value' => 'evsId', 'prefix' => 'ns0', 'type' => 'unsignedShort' ); $soap->call( 'getAllLocalGroups', $evsId ); sub pp_twig { use XML::Twig; open my($fh), '>', \my $str; no warnings 'newline'; #~ XML::Twig->new(qw! pretty_print record !)->xparse(@_)->print( $ +fh ); XML::Twig->new(qw! pretty_print record !)->parse(@_)->print( $fh ) +; $str =~ s/ xmlns/\n xmlns/g; return $str; } sub pp_dump { my $content = $_[0]->content(''); $_[0]->content( pp_twig($content) ); print $_[0]->as_string,"\n"; return; } __END__ POST http://127.0.0.1:1203 HTTP/1.1 Accept: text/xml Accept: multipart/* Accept: application/soap User-Agent: SOAP::Lite/Perl/1.11 Content-Length: 573 Content-Type: text/xml; charset=utf-8 SOAPAction: "http://www.bluearc.com/BAService/LocalGroupProvider#getAl +lLocalGroups" <?xml version="1.0" encoding="UTF-8"?> <S:Envelope S:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ +" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://www.bluearc.com/BAService/LocalGroupProvider" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <S:Body> <ns0:getAllLocalGroups> <ns0:evsId xsi:type="xsd:unsignedShort">evsId</ns0:evsId> </ns0:getAllLocalGroups> </S:Body> </S:Envelope>

In reply to Re^5: SOAP::Lite method with one param by Anonymous Monk
in thread SOAP::Lite method with one param by montaseri

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.