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;
System.out.println(string);
System.out.println(string.length());
return string;
}
When I use this method
TestDTO t = new TestDTO();
t.setName("Test §");
String str = entitySrv.test(t);
System.out.println(str);
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/">
<env:Header/>
<env:Body>
<ns1:test
xmlns:ns1="http://services.workflow.midtier.complinet.com/">
<arg0>
Test ???§
</arg0>
</ns1:test>
</env:Body>
</env:Envelope>
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.
Regards,
Alexey
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069307#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...