3 Replies Latest reply on Aug 22, 2005 6:22 PM by Keenan Ross

    Deserialization loses data when HTML looking data is passed

    Keenan Ross Newbie

      I'm seeing data loss when deserializing a document that has HTML data in a string typed element. I'm using Document Literal, JWSDP 1.6 and have tested with JBoss 4.0.2 and 4.0.3RC2.

      I can reproduce the problem with a slight modification to the JBossWS test suite. In the test client named /org/jboss/test/webservice/marshalltest/MarshallDocLiteralTestCase.java, if you change the test data in the first part of the testEchoString method from "Hello" to

      "Hello <em> Mom </em>"
      in both the call and the assert, you'll see the effects.

      I don't think the problem is simply that this results in an invalid XML document, intercepting the SOAP reveals that the special characters were serialized into < notation. Instead, looking at what happens in a debugger, it seems that the value object's set method is being called repeatedly with different parts of the string, so that the last part of the string overwrites all the previous parts.

      Can someone confirm the problem, or tell me what I'm doing wrong. Thanks,
      --keenan