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

RE: [soaplite] application failed during deserialization: xml processing instruction not at...

Expand Messages
  • Amit_Sharma04
    Thanks, Duncan. The server is able to find cgi scripts, including the one we are using. WE checked that by printing html in it and opening it in the browser.
    Message 1 of 7 , Jul 7, 2004
    • 0 Attachment
      Thanks, Duncan.

      The server is able to find cgi scripts, including the one we are using.
      WE checked that by printing html in it and opening it in the browser.

      What else could be the problem- any ideas?

      -----Original Message-----
      From: Duncan Cameron [mailto:duncan_cameron2002@...]
      Sent: Wednesday, July 07, 2004 1:00 PM
      To: Amit_Sharma04; soaplite@yahoogroups.com
      Subject: Re: [soaplite] application failed during deserialization: xml
      processing instruction not at...

      Sorry to post again but I hit send to soon.

      At 2004-07-07, 07:46:57 Amit Sharma <amit_sharma04@...> wrote:

      >Hello All,
      >
      >We are accessing a SOAP service from a SOAP Client. The error we get
      >is this:
      >
      >"application failed during deserialization: xml processing
      >instruction not at start of external entity at line 3, column 0,byte
      >4 at C:/Perl/site/lib/XML/Parser.pm line 168"
      >
      >Please suggest where the problem could be. WE have tried this on
      >Windows as well as Linux.
      >
      Well, the error message is pretty clear as to where the problem is.
      line 3, column 0,byte 4 refers to the received data.
      Have you turned trace on and looked at the received data?
      Possibly the server is not finding the cgi script and is sending back
      an HTML error page.

      Regards
      Duncan
    • Amit_Sharma04
      To detail, these are our requests and responses (through TcpTrace) Request: POST /cgi-bin/hibye.cgi HTTP/1.1 TE: deflate,gzip;q=0.3 Connection: TE, close
      Message 2 of 7 , Jul 7, 2004
      • 0 Attachment

        To detail, these are our requests and responses (through TcpTrace)

         

        Request:

         

        POST /cgi-bin/hibye.cgi HTTP/1.1

        TE: deflate,gzip;q=0.3

        Connection: TE, close

        Accept: text/xml

        Accept: multipart/*

        Host: localhost:81

        User-Agent: SOAP::Lite/Perl/0.55

        Content-Length: 446

        Content-Type: text/xml; charset=utf-8

        SOAPAction: "http://localhost:81/Demo#hi"

         

        <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><namesp1:hi xmlns:namesp1="http://localhost:81/Demo"/></SOAP-ENV:Body></SOAP-ENV:Envelope>

         

         

        Response:

         

        HTTP/1.1 200 OK

        Status: 500 Internal Server Error

        SOAPServer: SOAP::Lite/Perl/0.55

        Content-Type: text/xml; charset=utf-8

        Content-Length: 716

        Date: Wed, 07 Jul 2004 11:44:50 GMT

        Server: Apache Coyote/1.0

        Connection: close

         

        <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xsi:type="xsd:string">SOAP-ENV:Client</faultcode><faultstring xsi:type="xsd:string">Application failed during request deserialization:

        xml processing instruction not at start of external entity at line 3, column 0, byte 4 at C:/Perl/site/lib/XML/Parser.pm line 168

        </faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>

         

         

         

        -----Original Message-----
        From: Amit_Sharma04
        Sent: Wednesday, July 07, 2004 5:12 PM
        To: Duncan Cameron; soaplite@yahoogroups.com
        Subject: RE: [soaplite] application failed during deserialization: xml processing instruction not at...

         

        Thanks, Duncan.

        The server is able to find cgi scripts, including the one we are using.
        WE checked that by printing html in it and opening it in the browser.

        What else could be the problem- any ideas?

        -----Original Message-----
        From: Duncan Cameron [mailto:duncan_cameron2002@...]
        Sent: Wednesday, July 07, 2004 1:00 PM
        To: Amit_Sharma04; soaplite@yahoogroups.com
        Subject: Re: [soaplite] application failed during deserialization: xml
        processing instruction not at...

        Sorry to post again but I hit send to soon.

        At 2004-07-07, 07:46:57 Amit Sharma <amit_sharma04@...> wrote:

        >Hello All,
        >
        >We are accessing a SOAP service from a SOAP Client. The error we get
        >is this:
        >
        >"application failed during deserialization: xml processing
        >instruction not at start of external entity at line 3, column 0,byte
        >4 at C:/Perl/site/lib/XML/Parser.pm line 168"
        >
        >Please suggest where the problem could be. WE have tried this on
        >Windows as well as Linux.
        >
        Well, the error message is pretty clear as to where the problem is.
        line 3, column 0,byte 4 refers to the received data.
        Have you turned trace on and looked at the received data?
        Possibly the server is not finding the cgi script and is sending back
        an HTML error page.

        Regards
        Duncan




      • Amit_Sharma04
        Another development- We modified the parser.pm file, and put the xml SOAP message we intended to be generated by it directly into the parser code. And the
        Message 3 of 7 , Jul 7, 2004
        • 0 Attachment

          Another development-

           

          We modified the parser.pm file, and put the xml SOAP message we intended to be generated by it directly into the parser code. And the thing worked, except that it did not display us the output. We are able to see it in the response SOAP message using trace.

           

          $arg = "<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:bye xmlns:namesp1=\"Demo\"/></SOAP-ENV:Body></SOAP-ENV:Envelope> ";

           

          The above line was added befor the line displayed below, in the XML parser.

           

          $result = $expat->parse($arg);

           

          We are placing the package code on server side within the cgi itself.

           

          -Amit

           

          -----Original Message-----
          From:
          Amit_Sharma04
          Sent: Wednesday, July 07, 2004 5:16 PM
          To:
          Duncan Cameron; soaplite@yahoogroups.com
          Subject: RE: [soaplite] application failed during deserialization: xml processing instruction not at...

           

          To detail, these are our requests and responses (through TcpTrace)

           

          Request:

           

          POST /cgi-bin/hibye.cgi HTTP/1.1

          TE: deflate,gzip;q=0.3

          Connection: TE, close

          Accept: text/xml

          Accept: multipart/*

          Host: localhost:81

          User-Agent: SOAP::Lite/Perl/0.55

          Content-Length: 446

          Content-Type: text/xml; charset=utf-8

          SOAPAction: "http://localhost:81/Demo#hi"

           

          <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><namesp1:hi xmlns:namesp1="http://localhost:81/Demo"/></SOAP-ENV:Body></SOAP-ENV:Envelope>

           

           

          Response:

           

          HTTP/1.1 200 OK

          Status: 500 Internal Server Error

          SOAPServer: SOAP::Lite/Perl/0.55

          Content-Type: text/xml; charset=utf-8

          Content-Length: 716

          Date: Wed, 07 Jul 2004 11:44:50 GMT

          Server: Apache Coyote/1.0

          Connection: close

           

          <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode xsi:type="xsd:string">SOAP-ENV:Client</faultcode><faultstring xsi:type="xsd:string">Application failed during request deserialization:

          xml processing instruction not at start of external entity at line 3, column 0, byte 4 at C:/Perl/site/lib/XML/Parser.pm line 168

          </faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>

           

           

           

          -----Original Message-----
          From:
          Amit_Sharma04
          Sent: Wednesday, July 07, 2004 5:12 PM
          To:
          Duncan Cameron; soaplite@yahoogroups.com
          Subject: RE: [soaplite] application failed during deserialization: xml processing instruction not at...

           

          Thanks, Duncan.

          The server is able to find cgi scripts, including the one we are using.
          WE checked that by printing html in it and opening it in the browser.

          What else could be the problem- any ideas?

          -----Original Message-----
          From:
          Duncan Cameron [mailto:duncan_cameron2002@...]
          Sent:
          Wednesday, July 07, 2004 1:00 PM
          To:
          Amit_Sharma04; soaplite@yahoogroups.com
          Subject: Re: [soaplite] application failed during deserialization: xml
          processing instruction not at...

          Sorry to post again but I hit send to soon.

          At 2004-07-07,
          07:46:57 Amit Sharma <amit_sharma04@...> wrote:

          >Hello All,
          >
          >We are accessing a SOAP service from a SOAP Client. The error we get
          >is this:
          >
          >"application failed during deserialization: xml processing
          >instruction not at start of external entity at line 3, column 0,byte
          >4 at C:/Perl/site/lib/XML/Parser.pm line 168"
          >
          >Please suggest where the problem could be. WE have tried this on
          >Windows as well as Linux.
          >
          Well, the error message is pretty clear as to where the problem is.
          line 3, column 0,byte 4 refers to the received data.
          Have you turned trace on and looked at the received data?
          Possibly the server is not finding the cgi script and is sending back
          an HTML error page.

          Regards
          Duncan






        • Duncan Cameron
          ... This trace doesn t seem to correspond to the code that you originally sent. print SOAP::Lite - uri( http://localhost:8080/cgi-bin/Demo/Demo ) -
          Message 4 of 7 , Jul 7, 2004
          • 0 Attachment
            At 2004-07-07, 13:16:29 Amit_Sharma04 <amit_sharma04@...> wrote:

            >To detail, these are our requests and responses (through TcpTrace)
            >
            >Request:
            >
            >POST /cgi-bin/hibye.cgi HTTP/1.1
            >TE: deflate,gzip;q=0.3
            >Connection: TE, close
            >Accept: text/xml
            >Accept: multipart/*
            >Host: localhost:81
            >User-Agent: SOAP::Lite/Perl/0.55
            >Content-Length: 446
            >Content-Type: text/xml; charset=utf-8
            >SOAPAction: "http://localhost:81/Demo#hi"
            >
            ><?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
            >xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
            >SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
            >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
            >xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
            >xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><namesp1:hi
            >xmlns:namesp1="http://localhost:81/Demo"/></SOAP-ENV:Body></SOAP-
            >ENV:Env
            >elope>

            This trace doesn't seem to correspond to the code that you originally
            sent.

            print SOAP::Lite
            -> uri('http://localhost:8080/cgi-bin/Demo/Demo')
            -> proxy('http://localhost:8080/cgi-bin/hibye.cgi')
            -> hi()
            -> result;

            The code should generate a SOAPAction of

            SOAPAction: "http://localhost:8080/cgi-bin/Demo/Demo#hi"

            The uri() in effect specifies the class, so I am not sure that you
            should even have the cgi-bin in your value. I would suggest
            'urn:/Demo/Demo'.

            From your original example you should have the following for your Demo
            class:

            /Demo (directory)
            Demo.pm (file)
            hi() method

            Are all your files in the right place?

            Regards
            Duncan
          • Your message has been successfully submitted and would be delivered to recipients shortly.