in reply to Perl Web Service

How do you turnoff the blasted c-gensym elements?

Replies are listed 'Best First'.
Re^2: Perl Web Service
by bubles_88 (Initiate) on Jun 11, 2008 at 13:50 UTC
    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!