How to Read SOAP Attachments in BPEL
947645Aug 7 2012 — edited Feb 26 2020Hi,
I am currently working on SOAP Attachments. Can any one explain me the way to read attachments in BPEL?
Following describes about the use case:
I have created a synchronous bpel process( exposed as a SOAP Service). This BPEL will take two Integers and perform addition operation on the two Integers and replies back to the client with the result(result here will be sum of two Integers ).Deployed the composite and I am able to test it through SOAP UI by passing SOAP request(containing Inputs).
My actual requirement is to send an IMAGE of JPEG FORMAT as an attachment along with the SOAP request and read the attachment content in BPEL.So that I can write the attachment to some file location by Invoking File Adapter.
So far my approach towards this is:-
I have updated BPEL.wsdl with
*<wsdl:input message="tns:requestMessage">*
*<mime:multipartRelated>*
*<mime:part>*
*<soap:body use="literal"/>*
*</mime:part>*
*<mime:part>*
*<mime:content part="addPhoto" type="image/jpeg"/>*
*</mime:part>*
*</mime:multipartRelated>*
*</wsdl:input>*
*<wsdl:output message="tns:replyMessage">*
*<mime:multipartRelated>*
*<mime:part>*
*<soap:body use="literal"/>*
*</mime:part>*
*<mime:part>*
*<mime:content part="status" type="text/plain"/>*
*<mime:content part="status" type="text/xml"/>*
*</mime:part>*
*</mime:multipartRelated>*
*</wsdl:output>*
In BPEL we do have a property ora:getAttachmentContent() , but this requires the source variable containing the attachments.Kindly let me know the way to create a variable to read the attachment in BPEL.
Thanks