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

XML::Parser reports a mess of XML tags instead of SOAP server die arguments

Expand Messages
  • sergey_lukashevich
    It seems that die() in the SOAP lite server sometimes could confuse client side ever it is wrapped by eval{}. My problem looks like this, please consider:
    Message 1 of 3 , Aug 15 5:51 AM
    • 0 Attachment
      It seems that die() in the SOAP lite server sometimes could confuse
      client side ever it is wrapped by eval{}.

      My problem looks like this, please consider:

      mismatched tag at line 2, column 2, byte 497 at
      /usr/local/lib/perl5/site_perl/5.8.7/i686-linux-th
      read-multi/XML/Parser.pm
      line 187
      <?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><f
      aultcode>SOAP-ENV:Server</faultcode><faultstring>
      THE REASON FOR DIE HERE at /PathToServerModules/Server.pm line 99,
      <STDIN> line 1.
      </faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> at
      /PathToTheClient/RPC.pm line 50

      Yes, the client outputs this instead of just "THE REASON FOR DIE HERE"
      when I call die("THE REASON FOR DIE HERE") on the server side.
      Please note <STDIN> in the output above. Seems that XML::Parser
      considers it as an XML tag! But <STDIN> is not a tag but a perl's
      commandfile name.

      I have latest versions installed: SOAP::Lite, expat, XML::Parser.
      I do know what else to fix. How to make clear my $som-faultstring?
    • kgoess
      Sergey, this problem exists in version 0.60, they ve fixed it in version 0.65_4 (a development version). You said you re using the latest version but you
      Message 2 of 3 , Aug 16 8:35 AM
      • 0 Attachment
        Sergey, this problem exists in version 0.60, they've fixed it in
        version 0.65_4 (a development version). You said you're using the
        latest version but you didn't say which one.

        The problem is that SOAP::Lite isn't escaping XML characters
        (specifically '<' in error messages.

        Here's a patch for 0.60 that should fix it. If you're actually
        using 0.65+ then never mind.

        --- x/SOAP-Lite-0.60/lib/SOAP/Lite.pm Mon Aug 18 11:44:18 2003
        +++ SOAP-Lite-0.60/lib/SOAP/Lite.pm Thu May 12 16:52:36 2005
        @@ -1194,21 +1194,21 @@
        $body->set_value($parameters ? \$parameters : ());
        } elsif ($type eq 'fault') {
        SOAP::Trace::fault(@parameters);
        $body = SOAP::Data
        -> name(SOAP::Serializer::qualify($self->envprefix =>
        'Fault'))
        # commented on 2001/03/28 because of failing in ApacheSOAP
        # need to find out more about it
        # -> attr({'xmlns' => ''})
        -> value(\SOAP::Data->set_value(
        SOAP::Data->name(faultcode =>
        SOAP::Serializer::qualify($self->envprefix =>
        $parameters[0]))->type(""),
        - SOAP::Data->name(faultstring => $parameters[1])->type(""),
        + SOAP::Data->name(faultstring =>
        SOAP::Utils::encode_data($parameters[1]))->type(""),
        defined($parameters[2]) ? SOAP::Data->name(detail => do{my
        $detail = $parameters[2]; ref $detail ? \$detail : $detail}) : (),
        defined($parameters[3]) ? SOAP::Data->name(faultactor =>
        $parameters[3])->type("") : (),
        ));
        } elsif ($type eq 'freeform') {
        SOAP::Trace::freeform(@parameters);
        $body = SOAP::Data->set_value(@parameters);
        } else {
        die "Wrong type of envelope ($type) for SOAP call\n";
        }
      • sergey_lukashevich
        The error goes away after my changing from version 0.60 to 0.65beta, but another one arise: Application failed during request deserialization: Unrecognized
        Message 3 of 3 , Aug 17 7:12 AM
        • 0 Attachment
          The error goes away after my changing from version 0.60 to 0.65beta,
          but another one arise:

          Application failed during request deserialization: Unrecognized type
          '{http://www.w3.org/1999/XMLSchema}base64Binary'

          My application fails so it can not continue.



          --- In soaplite@yahoogroups.com, "sergey_lukashevich" <lukash33@m...>
          wrote:
          > It seems that die() in the SOAP lite server sometimes could confuse
          > client side ever it is wrapped by eval{}.
          >
          > My problem looks like this, please consider:
          >
          > mismatched tag at line 2, column 2, byte 497 at
          > /usr/local/lib/perl5/site_perl/5.8.7/i686-linux-th
          > read-multi/XML/Parser.pm
          > line 187
          > <?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><f
          > aultcode>SOAP-ENV:Server</faultcode><faultstring>
          > THE REASON FOR DIE HERE at /PathToServerModules/Server.pm line 99,
          > <STDIN> line 1.
          > </faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> at
          > /PathToTheClient/RPC.pm line 50
          >
          > Yes, the client outputs this instead of just "THE REASON FOR DIE HERE"
          > when I call die("THE REASON FOR DIE HERE") on the server side.
          > Please note <STDIN> in the output above. Seems that XML::Parser
          > considers it as an XML tag! But <STDIN> is not a tag but a perl's
          > commandfile name.
          >
          > I have latest versions installed: SOAP::Lite, expat, XML::Parser.
          > I do know what else to fix. How to make clear my $som-faultstring?
        Your message has been successfully submitted and would be delivered to recipients shortly.