0 Replies Latest reply on Jul 31, 2007 2:13 PM by Alexey Malkovskiy

    Problem with encoding '§' character ((char)167)

    Alexey Malkovskiy Newbie

      I have a simple DTO object:

      public class TestDTO {
      private String name;

      public String getName() {
      return name;

      public void setName(String name) {
      this.name = name;

      and q simple web-service method:

      public String test(TestDTO t) {
      String string = "Hello " + t.getName() + " special char = " + (char)167;
      return string;

      When I use this method

      TestDTO t = new TestDTO();
      t.setName("Test §");
      String str = entitySrv.test(t);

      I receive a string "Hello Test ?§ special char = §" instead "Hello Test § special char = §".
      I saw that 'B' before '§' is added by JAXB when this object is being marshalled to XML. But in a request to the server a message looks like:
      <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
      <ns1:test xmlns:ns1="http://services.workflow.midtier.complinet.com/">
      Test ???§
      Inside the web-service method the field name is "Test ?§" instead of "Test §". It looks like double encoding of '§' character.

      I use JBossWS 1.2.1.GA and JBoss 4.2.0GA.