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("http://127.0.0.1:8080/abc/abc?WSDL");

      # 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
      at
      com.sun.xml.rpc.encoding.SimpleTypeSerializer.dese
      rialize(SimpleTypeSerializer.java:
      140)
      at
      com.sun.xml.rpc.encoding.AttachmentSerializer.dese
      rialize(AttachmentSerializer.java:
      158)
      at
      com.sun.xml.rpc.encoding.ReferenceableSerializerIm
      pl.deserialize(ReferenceableSeria
      lizerImpl.java:141)


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