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.
- Create a new Proxy service with file protocol for consuming, definitely you need to use the UTF-16 schema in your proxy service
- Set the listening file location or archive file location if you want to
- Set the UTF-16 for encoding setting when you create the Proxy service.
- Save the changes and activate the session.