This blog is about using soap with attachments and the use of MTOM within the OSB (11g).
A service is created that accepts a soap with attachment and translates it to a service that accepts a binary element. MTOM is used for performance reasons for the second.
A service is created that accepts a soap with attachment and translates it to a service that accepts a binary element. MTOM is used for performance reasons for the second.
* For the use of attachments you need RPC-style document instead of the usual document-style. This due to the fact that the document-style limits a message to a single .
Oracle Fusion 11g is an enterprise ready family of integration products from Oracle. Oracle Service Bus (OSB) 11g is one of the components in Fusion middleware product. OSB can do routing, transformation and orchestration of messages. Messages can be of xml or non xml. Here we are concerned about sending files as attachments along with the messages. We will discuss how OSB handles attachments and the configurations done for the same.
Types of Attachment handling: Attachment handling can be of two types.
- Inline attachment handling
Here the attachment file will be encoded into some format, say base64 format and send it as part of the main xml message
2. MIME attachment handling
Here the attachment will be send as part of attachment headers along wth the normal xml message. The attachments can be received in multiple formats by OSB, but one of the common format is base64 encoded binary format.
- Include Binary Data by Reference: (Default) In an outbound response message, replace elements with elements when setting up the $body message context variable.
- Include Binary Data by Value: In an outbound response message, replace elements with Base64-encoded text versions of corresponding binary data when setting up the context variable.

On the second local proxy service:
Here we have done with proxy part, Now we will test this service by SOAP UI with some attachment.
Here is SOAP UI result:
Now we see how this worked:
In our local proxy where we are receiving message as binary and returning text, so when this local proxy will be called on main proxy, following will happen.
As you see in this image, the variable "attachedBodyRequest" is request variable for local proxy where binary to text conversion is done, and "attachedBodyResponse" is response variable of same. so in the attachedBodyResponse variable local proxy is returning reference binary data.
Point to remember: As you will see in main proxy there is a delete activity whose task is to delete "./ctx:attachment" variable from header as this proxy does not support attachment return in response, so if you will not delete this variable you will get following error.
So for solving this error, add delete activity with following code.
This is done, if you want to upload this file to a folder in server location or you want to use some FTP server, then create a business service and upload it.
Hi Sandeep, Images seem to be not showing up. can you let me know where i can find them?
ReplyDeleteImages are here,
Deletehttps://www.linkedin.com/pulse/mtom-based-osb-proxy-business-serviceattachment-using-pachauri/
Thanks a lot very much for the high quality and results-oriented help. I won’t think twice to endorse your blog post to anybody who wants and needs support in this area. same as your blog i found another one Oracle OSB Training .Actually I was looking for the same information on internet for Oracle OSB and came across your blog. I am impressed by the information that you have on this blog. Thanks once more for all the details.
ReplyDelete