How can I retrieve the details of the file from an outbound operation in BPEL 11g

Posted by [email protected] on Oracle Blogs See other posts from Oracle Blogs or by [email protected]
Published on Mon, 12 Apr 2010 08:49:58 +0000 Indexed on 2010/04/12 9:34 UTC
Read the original article Hit count: 375

Filed under:

Several times, we come across requirements where we need to capture the details of the file that got written out as a part of a BPEL process invoking a File/Ftp Adapter. Consider a case where we're using FileNamingConvention as "PurchaseOrder_%SEQ%.txt" and we need to do some post processing based on the filename (please remember that we wouldn't know the filename until the adapter invocation completes)

In order to achieve this, we need to manually tweak the WSDL so that the File/Ftp Adapter can return the metadata of the file that was written out.

In general, the File/Ftp Write/Put WSDL operations are one way as shown below:

 

 

 

FileWriteWSDL.jpg

 

The File/Ftp Adapters are designed to return the metadata back if this WSDL is tweaked into a two-way WSDL. In addition, the <wsdl:output/> must import the fileread.xsd schema (see below). You will need to copy fileread.xsd from  here into the xsd folder of your composite.

 

fileread.jpg 

 

Finally, we will need to tweak the  WSDL. (highlighted below)

 

 

 

 

FileOutWSDL.jpg 

Finally, the BPEL <invoke> would look as shown below. Please note that the file metadata would be returned as a part of the BPEL output variable:

FileInvoke.jpg

© Oracle Blogs or respective owner