Special Character Encoding Problem with WebService Base64Binary Data
Tulsi Ram Lokku
Joined: May 04, 2010
I have deployed a webservices in OAS9i application server. I am encoding data that has special characters (non ascii/unicode) using Base64Encoder in the xml and sending the webservices request. The type of the xml payload element is mentioned as Base64Binary in the schema.
In java implementation code, the payload data is retrieved as a new String(payloadData) which return the value of the decoded string. The string returned loses the special character which is not a key board character and displays a junk letter like ï¿½ ï¿½. This seems to be an encoding issue. Can anyone please help us resolving the issue.
Joined: Feb 19, 2010
Hi Tulsi Ram. In the past, I have used xs:base64Binary (in xmlbeans) by mapping it to byte arrays, i.e. byte. Can you try byte instead of String?
For example, for this element
xjc generates this code:
Hope that addresses your question.