• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Special Character Encoding Problem with WebService Base64Binary Data

 
Tulsi Ram Lokku
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.

Regards,
Tulsi Ram
 
R Srini
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thanks.
- Srini
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic