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

3036ampersand and friends

Expand Messages
  • Simon Lok
    Oct 2, 2003
    • 0 Attachment
      I've got a JWSDP-1.2 backend running
      a JAXRPC service that exposes a WSDL.
      I've got a frontend that uses PERL to
      generate web pages and SOAP::Lite
      to connect to the back end.

      Most of the time everything is fine. Once
      in a while, somebody types in an
      ampersand and blows something up.
      I've isolated the problem down to what
      appears to be an issue with encoding, but
      I'm not sure. I have written a little program
      that deterministically causes a fault
      to occur. You can imagine that
      in my "real code" the only thing that is
      difference is that I am basically taking
      input from the user, checking it for
      some basic stuff and then putting it
      into the function where below you see
      hardcoded strings.

      #!/usr/bin/perl -w

      use strict;
      use SOAP::Lite;

      use Data::Dumper;

      my $abc = SOAP::Lite->service("");

      # this one works
      @results = $abc->myfunc($token, 'Soccer');
      print Dumper(@results);

      # this one does not work
      @results = $abc->myfunc($token, 'a & b');
      print Dumper(@results);

      I get the same results no matter which function I run...

      On the back end, I get a massive stack trace dump... it
      starts with:

      SEVERE: deserialization error: XML parsing error:
      com.sun.xml.rpc.sp.ParseException:1: Illegal character or entity
      reference syntax
      deserialization error: XML parsing error: com.sun.
      xml.rpc.sp.ParseException:1: Illegal
      character or entity reference syntax

      Does anybody have any ideas for me? Thanks in advance.
    • Show all 6 messages in this topic