Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Send attachment along with other data to target DMS (Document Management Sys)

Vidya Bhushan TipparajuFeb 17 2017 — edited Mar 23 2017

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:

pastedImage_0.png

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

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 20 2017
Added on Feb 17 2017
7 comments
1,297 views