Hi All ,
I have a requirement where we need to send attachment + some other data to our target from OSB.
From postman rest client , it works:

I have followed Oracle documentation to achieve it
| |
Please find below note from Oracle:
Ref:https://docs.oracle.com/cd/E23943_01/admin.1111/e15867/context.htm#OSBAG310
Attachments Variable
The attachments variable holds the attachments associated with a message. The attachments variable is defined by an XML schema. It consists of a single root node: <ctx:attachments>, with a <ctx:attachment> sub-element for each attachment. The sub-elements contain information about the attachment (derived from MIME headers) as well as the attachment content. As with most of the other message-related variables, attachments is always set, but if there are no attachments, the attachments variable consists of an empty <ctx:attachments> element.
So to pass values i have added in request in <ctx:attachments> array as
<ctx:attachments>
<ctx:attachment>
<ctx:Content-Disposition>form-data; name="type"</ctx:Content-Disposition>
<ctx:body>144</ctx:body>
</ctx:attachment>
<ctx:attachment>
<ctx:Content-Disposition>form-data; name="parent_id"</ctx:Content-Disposition>
<ctx:body>30667132</ctx:body>
</ctx:attachment>
<ctx:attachment>
<ctx:Content-Disposition>form-data; name="name"</ctx:Content-Disposition>
<ctx:body>TicketwithSpecs_v3</ctx:body>
</ctx:attachment>
<ctx:attachment>
<ctx:Content-Type>application/msword</ctx:Content-Type>
<ctx:Content-Disposition>form-data; name="TicketwithSpecs_v3"</ctx:Content-Disposition>
<ctx:body>{$GetDocResponse}</ctx:body>
</ctx:attachment>
</ctx:attachments>
|
I get error as Content length is missing , as i am passing everything from attachments.
Please share your valuable thoughts and suggestions.
Thanks,
Vidya