• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Special Character Encoding Problem with WebService Base64Binary Data  RSS feed

 
Greenhorn
Posts: 2
  • 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
 
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
Boost this thread!