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

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

Expand Messages
  • kgoess
    Aug 16, 2005
    • 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";
      }
    • Show all 3 messages in this topic