Skip to main content

Development

OSB JCA file adapter cannot consume messages with UTF-16 schema

Scenario: There is a requirement that need to consume file message from a file location, but the message schema for consume file was using UTF-16 encoding. Generate the JCA adapter in Jdeveloper with a UTF-16 xsd schema defined at the last step, then you will get a wsdl associate with this xsd schema, then import these files in OSB, generate the related OSB proxy service. But OSB proxy service can not read the input messages with UTF-16 schema associated, because the default of the message encoding is UTF-8. Also tried “Encoding” and “jca.message.encoding” binding property, but these are binding property used for BPEL, not for OSB JCA file.

 

Solution: Use File protocol instead – OSB File adapter to archive this requirement, because there is an configuration setting for “Encoding” in OSB proxy for file adapter.

 

  1. Create a new Proxy service with file protocol for consuming, definitely you need to use the UTF-16 schema in your proxy service
  2. Set the listening file location or archive file location if you want to
  3. Set the UTF-16 for encoding setting when you create the Proxy service.
  4. Save the changes and activate the session.

 untitled

Tags

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Categories
Follow Us