Loading ...
Sorry, an error occurred while loading the content.

SOAP::Lite with NuSOAP

Expand Messages
  • jameshargreavesgmail
    Hi everyone! I m having a few teething problems getting my SOAP::Lite server to respond to a simple client I have written in PHP using NuSOAP. Does anyone have
    Message 1 of 4 , Apr 1, 2005
    • 0 Attachment
      Hi everyone!

      I'm having a few teething problems getting my SOAP::Lite server to
      respond to a simple client I have written in PHP using NuSOAP. Does
      anyone have any experience of these two working together?

      I've included the HTTP requests involved below - can anyone see what
      is wrong with the NuSOAP request the would cause the failure? My only
      thought is that it might be to do with the encoding but I don't know
      how to change this is NuSOAP? Plus I'm probably wrong :)

      Thanks
      Jay

      ---

      Request Sent By SOAP::Lite Perl Client - WORKS

      SOAP::Transport::HTTP::Client::send_receive:
      POST http://test.rigadon.com:7627 HTTP/1.1
      Accept: text/xml
      Accept: multipart/*
      Content-Length: 541
      Content-Type: text/xml; charset=utf-8
      SOAPAction: "SOAPAtlas#login"

      <?xml version="1.0" encoding="UTF-8"?>
      <SOAP-ENV:Envelope
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema"
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <SOAP-ENV:Body>
      <namesp1:login xmlns:namesp1="SOAPAtlas">
      <login xsi:type="xsd:string">HPW</login>
      <password xsi:type="xsd:string">3os0wnGCm</password>
      </namesp1:login>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      ---

      Request Sent By NuSOAP PHP Client - FAILS

      POST HTTP/1.0
      Host: test.rigadon.com:7627
      User-Agent: NuSOAP/0.6.8 (1.85)
      Content-Type: text/xml; charset=ISO-8859-1
      SOAPAction: "SOAPAtlas#login"
      Content-Length: 581

      <?xml version="1.0" encoding="ISO-8859-1"?>
      <SOAP-ENV:Envelope
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:si="http://soapinterop.org/xsd">
      <SOAP-ENV:Body>
      <ns5732:login xmlns:ns5732="SOAPAtlas">
      <login xsi:type="xsd:string">HPW</login>
      <password xsi:type="xsd:string">3os0wnGCm</password>
      </ns5732:login>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>

      ---

      <?xml version="1.0" encoding="UTF-8"?>
      <SOAP-ENV:Envelope
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/1999/XMLSchema"
      SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
      <faultcode>SOAP-ENV:Client</faultcode>
      <faultstring>Application failed during request deserialization:
      no element found at line 1, column 0, byte -1 at
      /usr/lib/perl5/vendor_perl/5.8.4/i586-linux/XML/Parser.pm line
      187</faultstring>
      <faultactor>http://npc74:7627/</faultactor>
      </SOAP-ENV:Fault>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>
    • jameshargreavesgmail
      Hi everyone! With regards the problem I previously posted how might I capture the incoming request as seen from the server? I have been analysing the input
      Message 2 of 4 , Apr 4, 2005
      • 0 Attachment
        Hi everyone!

        With regards the problem I previously posted how might I capture the
        incoming request as seen from the server? I have been analysing the
        input structures for SOAP::Server::handle and there are considerable
        differences in each case.

        Thanks
        Jay

        --- In soaplite@yahoogroups.com, "jameshargreavesgmail"
        <james.hargreaves@g...> wrote:
        >
        > Hi everyone!
        >
        > I'm having a few teething problems getting my SOAP::Lite server to
        > respond to a simple client I have written in PHP using NuSOAP. Does
        > anyone have any experience of these two working together?
        >
        > I've included the HTTP requests involved below - can anyone see what
        > is wrong with the NuSOAP request the would cause the failure? My only
        > thought is that it might be to do with the encoding but I don't know
        > how to change this is NuSOAP? Plus I'm probably wrong :)
        >
        > Thanks
        > Jay
        >
        > ---
        >
        > Request Sent By SOAP::Lite Perl Client - WORKS
        >
        > SOAP::Transport::HTTP::Client::send_receive:
        > POST http://test.rigadon.com:7627 HTTP/1.1
        > Accept: text/xml
        > Accept: multipart/*
        > Content-Length: 541
        > Content-Type: text/xml; charset=utf-8
        > SOAPAction: "SOAPAtlas#login"
        >
        > <?xml version="1.0" encoding="UTF-8"?>
        > <SOAP-ENV:Envelope
        > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
        > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
        > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
        > xmlns:xsd="http://www.w3.org/1999/XMLSchema"
        > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        > <SOAP-ENV:Body>
        > <namesp1:login xmlns:namesp1="SOAPAtlas">
        > <login xsi:type="xsd:string">HPW</login>
        > <password xsi:type="xsd:string">3os0wnGCm</password>
        > </namesp1:login>
        > </SOAP-ENV:Body>
        > </SOAP-ENV:Envelope>
        >
        > ---
        >
        > Request Sent By NuSOAP PHP Client - FAILS
        >
        > POST HTTP/1.0
        > Host: test.rigadon.com:7627
        > User-Agent: NuSOAP/0.6.8 (1.85)
        > Content-Type: text/xml; charset=ISO-8859-1
        > SOAPAction: "SOAPAtlas#login"
        > Content-Length: 581
        >
        > <?xml version="1.0" encoding="ISO-8859-1"?>
        > <SOAP-ENV:Envelope
        > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
        > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
        > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
        > xmlns:si="http://soapinterop.org/xsd">
        > <SOAP-ENV:Body>
        > <ns5732:login xmlns:ns5732="SOAPAtlas">
        > <login xsi:type="xsd:string">HPW</login>
        > <password xsi:type="xsd:string">3os0wnGCm</password>
        > </ns5732:login>
        > </SOAP-ENV:Body>
        > </SOAP-ENV:Envelope>
        >
        > ---
        >
        > <?xml version="1.0" encoding="UTF-8"?>
        > <SOAP-ENV:Envelope
        > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
        > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
        > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
        > xmlns:xsd="http://www.w3.org/1999/XMLSchema"
        > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
        > <SOAP-ENV:Body>
        > <SOAP-ENV:Fault>
        > <faultcode>SOAP-ENV:Client</faultcode>
        > <faultstring>Application failed during request deserialization:
        > no element found at line 1, column 0, byte -1 at
        > /usr/lib/perl5/vendor_perl/5.8.4/i586-linux/XML/Parser.pm line
        > 187</faultstring>
        > <faultactor>http://npc74:7627/</faultactor>
        > </SOAP-ENV:Fault>
        > </SOAP-ENV:Body>
        > </SOAP-ENV:Envelope>
      • jameshargreavesgmail
        Thanks Byrne for replying to my last post! I ve now added the following line to the SOAP::Server::handle method in order output the HTTP::Request object: print
        Message 3 of 4 , Apr 4, 2005
        • 0 Attachment
          Thanks Byrne for replying to my last post!

          I've now added the following line to the SOAP::Server::handle method
          in order output the HTTP::Request object:

          print Dumper($self->request);

          The output in each case is shown below. You'll note that in the PHP
          case very little data is stored in the HTTP::Request. Can anyone see
          how this might have occurred?

          Thanks
          Jay

          ---

          HTTP::Request object sent by NuSOAP PHP client - FAILS

          $VAR1 = bless( {
          '_protocol' => 'HTTP/0.9',
          '_content' => '',
          '_uri' => bless( do{\(my $o = 'HTTP/1.0')},
          'URI::http' ),
          '_headers' => bless( {}, 'HTTP::Headers' ),
          '_method' => 'POST'
          }, 'HTTP::Request' );

          ---

          HTTP::Request object sent by SOAP::Lite Perl client - WORKS

          $VAR1 = bless( {
          '_protocol' => 'HTTP/1.1',
          '_content' => '<?xml version="1.0"
          encoding="UTF-8"?><SOAP-ENV:Envelope
          xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
          xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
          xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
          xmlns:xsd="http://www.w3.org/1999/XMLSchema"
          SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><namesp1:login
          xmlns:namesp1="SOAPAtlas"><login
          xsi:type="xsd:string">HPW</login><password
          xsi:type="xsd:string">3os0wnGCm</password></namesp1:login></SOAP-ENV:Body></SOAP-ENV:Envelope>',
          '_uri' => bless( do{\(my $o = '/')}, 'URI::http' ),
          '_headers' => bless( {
          'user-agent' =>
          'SOAP::Lite/Perl/0.60',
          'connection' => 'TE, close',
          'accept' => [
          'text/xml',
          'multipart/*'
          ],
          'te' => 'deflate,gzip;q=0.3',
          'content-length' => '541',
          'host' =>
          'test.rigadon.com:7627',
          'soapaction' =>
          '"SOAPAtlas#login"',
          'content-type' => 'text/xml;
          charset=utf-8'
          }, 'HTTP::Headers' ),
          '_method' => 'POST'
          }, 'HTTP::Request' );

          ---
        • Juan Fco Rodriguez
          Hello, I use the following to see the server response when using NuSOAP: $s = new soapclient( http://192.168.11.58/mywsdlfile.wsdl , wsdl ); $p =
          Message 4 of 4 , Apr 4, 2005
          • 0 Attachment
            Hello,

            I use the following to see the server response when using NuSOAP:

            $s = new soapclient('http://192.168.11.58/mywsdlfile.wsdl', 'wsdl');
            $p = $s->getProxy();
            $result = $p->myRemoteMethod( ..params here... );

            echo '<xmp>'.$p->request.'</xmp>';
            echo '<xmp>'.$p->response.'</xmp>';

            Hope this helps.

            On Mon, 4 Apr 2005, jameshargreavesgmail wrote:

            >
            >
            >
            > Hi everyone!
            >
            > With regards the problem I previously posted how might I capture the
            > incoming request as seen from the server? I have been analysing the
            > input structures for SOAP::Server::handle and there are considerable
            > differences in each case.
            >
            > Thanks
            > Jay
            >
            > --- In soaplite@yahoogroups.com, "jameshargreavesgmail"
            > <james.hargreaves@g...> wrote:
            >>
            >> Hi everyone!
            >>
            >> I'm having a few teething problems getting my SOAP::Lite server to
            >> respond to a simple client I have written in PHP using NuSOAP. Does
            >> anyone have any experience of these two working together?
            >>
            >> I've included the HTTP requests involved below - can anyone see what
            >> is wrong with the NuSOAP request the would cause the failure? My only
            >> thought is that it might be to do with the encoding but I don't know
            >> how to change this is NuSOAP? Plus I'm probably wrong :)
            >>
            >> Thanks
            >> Jay
            >>
            >> ---
            >>
            >> Request Sent By SOAP::Lite Perl Client - WORKS
            >>
            >> SOAP::Transport::HTTP::Client::send_receive:
            >> POST http://test.rigadon.com:7627 HTTP/1.1
            >> Accept: text/xml
            >> Accept: multipart/*
            >> Content-Length: 541
            >> Content-Type: text/xml; charset=utf-8
            >> SOAPAction: "SOAPAtlas#login"
            >>
            >> <?xml version="1.0" encoding="UTF-8"?>
            >> <SOAP-ENV:Envelope
            >> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
            >> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
            >> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
            >> xmlns:xsd="http://www.w3.org/1999/XMLSchema"
            >> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
            >> <SOAP-ENV:Body>
            >> <namesp1:login xmlns:namesp1="SOAPAtlas">
            >> <login xsi:type="xsd:string">HPW</login>
            >> <password xsi:type="xsd:string">3os0wnGCm</password>
            >> </namesp1:login>
            >> </SOAP-ENV:Body>
            >> </SOAP-ENV:Envelope>
            >>
            >> ---
            >>
            >> Request Sent By NuSOAP PHP Client - FAILS
            >>
            >> POST HTTP/1.0
            >> Host: test.rigadon.com:7627
            >> User-Agent: NuSOAP/0.6.8 (1.85)
            >> Content-Type: text/xml; charset=ISO-8859-1
            >> SOAPAction: "SOAPAtlas#login"
            >> Content-Length: 581
            >>
            >> <?xml version="1.0" encoding="ISO-8859-1"?>
            >> <SOAP-ENV:Envelope
            >> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            >> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
            >> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            >> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
            >> xmlns:si="http://soapinterop.org/xsd">
            >> <SOAP-ENV:Body>
            >> <ns5732:login xmlns:ns5732="SOAPAtlas">
            >> <login xsi:type="xsd:string">HPW</login>
            >> <password xsi:type="xsd:string">3os0wnGCm</password>
            >> </ns5732:login>
            >> </SOAP-ENV:Body>
            >> </SOAP-ENV:Envelope>
            >>
            >> ---
            >>
            >> <?xml version="1.0" encoding="UTF-8"?>
            >> <SOAP-ENV:Envelope
            >> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
            >> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
            >> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
            >> xmlns:xsd="http://www.w3.org/1999/XMLSchema"
            >> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
            >> <SOAP-ENV:Body>
            >> <SOAP-ENV:Fault>
            >> <faultcode>SOAP-ENV:Client</faultcode>
            >> <faultstring>Application failed during request deserialization:
            >> no element found at line 1, column 0, byte -1 at
            >> /usr/lib/perl5/vendor_perl/5.8.4/i586-linux/XML/Parser.pm line
            >> 187</faultstring>
            >> <faultactor>http://npc74:7627/</faultactor>
            >> </SOAP-ENV:Fault>
            >> </SOAP-ENV:Body>
            >> </SOAP-ENV:Envelope>
            >
            >
            >
            >
            >
            >
            > Yahoo! Groups Links
            >
            >
            >
            >
            >
            >
            >
            >
            > ____________________________________________________________________
            > Mensaje analizado y protegido, tecnologia antivirus www.trendmicro.es
            >

            ____________________________________________________________________
            Mensaje analizado y protegido, tecnologia antivirus www.trendmicro.es
          Your message has been successfully submitted and would be delivered to recipients shortly.