Hi. Thanks for the response.
I am not sure where can i modify the xml code as it is resulted from error message.
I have also tried to go to the website.
If I use the "/", it will add another nested element.
What I want is:

EXPECTED OUTPUT:
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xsi="ht +tp://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schem +as.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap +.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOA +P-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP +-ENV:Body><Test xmlns="http://test.test.test">TEXT_APPEAR</Test></SOA +P-ENV:Body></SOAP-ENV:Envelope> SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK Server: Jetty(6.1.6) Content-Length: 206 Content-Type: text/xml Client-Date: Wed, 11 Jun 2008 10:21:18 GMT Client-Peer: 127.0.0.1:7650 SOAPAction: ""

My Perl Code (version 1):
use SOAP::Lite + trace => 'debug'; my $svc; my $resp; eval { $svc= SOAP::Lite ->service("http://localhost:8000/"); $resp = $svc->Test('TEXT_APPEAR'); }; die "Got Error: $@" if($@);

OUTPUT:
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xsi="ht +tp://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schem +as.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap +.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOA +P-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP +-ENV:Body><Test xmlns="http://test.test.test"><Test>TEXT_APPEAR</Test +></Test></SOAP-ENV:Body></SOAP-ENV:Envelope> SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK Server: Jetty(6.1.6) Content-Length: 206 Content-Type: text/xml Client-Date: Wed, 11 Jun 2008 10:21:18 GMT Client-Peer: 127.0.0.1:7650 SOAPAction: ""


My Perl Code (version 2):
use SOAP::Lite + trace => 'debug'; my $svc; my $resp; eval { $svc= SOAP::Lite ->service("http://localhost:8000") ->proxy("http://localhost); $resp = $svc->call(SOAP::Data->name('Test') ->attr ({'xmlns'=>'http://sth.sth.sth'}) => "TEXT_APPEAR"); }; die "Got Error: $@" if($@);


OUTPUT:
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xsi="ht +tp://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENC="http://schem +as.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap +.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOA +P-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP +-ENV:Body><Test xmlns="http://test.test.test"><c-gensym3 xsi:type="xs +d:int">TEXT_APPEAR</c-gensym3></Greeter></SOAP-ENV:Body></SOAP-ENV:En +velope> SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 200 OK Server: Jetty(6.1.6) Content-Length: 272 Content-Type: text/xml; charset=utf-8 Client-Date: Wed, 11 Jun 2008 10:29:25 GMT Client-Peer: 127.0.0.1:7650

Could you please help me to get the expected output?
Thanks a lot!

In reply to Re^2: Perl Web Service by bubles_88
in thread Perl Web Service by bubles_88

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.