Non-ASCII characters garbled in JAX-WS/JMS request

Solution Unverified - Updated -

Issue

  • My application on JBoss EAP has a JAX-WS Message Driven Bean service. The client delivers the message via JMS, specifically as a JMS "TextMessage."
  • When the incoming SOAP message contains only ASCII characters, the message is fine. When it contains non-ASCII characters, it is decoded improperly. For instance, here is the tail of server.log:
2013-04-02 13:44:59,460 TRACE [org.jboss.ws.core.MessageTrace] (http-0.0.0.0-8080-3) Incoming Request Message
<soapenv:Envelope xmlns:soapenc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:wsa='http://www.w3.org/2005/08/addressing' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
 <soapenv:Header/>
 <soapenv:Body>
  <ns1:getSecureCustomerById xmlns:ns1='http://mycompany.com/customerservice'>
   <custId>12345</custId>
   <accessName>??</accessName>
   <password>xxxxxxxx</password>
  </ns1:getSecureCustomerById>
 </soapenv:Body>
</soapenv:Envelope>
  • Notice the <accessName>??</accessName> element. The question mark characters should be two Japanese unicode characters (as they are in the client). As JMS is transporting the SOAP as a TextMessage -- which is a String, not bytes -- I don't see why there should be any encoding issues.

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.