Tuesday, March 24, 2009

retrieving header information using header functions

There is always a misconception that file name can be retrieved only if we use File adapter and not FTP adapter. The problem is that people use the same namespace for retrieving header information in both File adapter and FTP adapter.

I will bring out the difference in namespaces that needs to be done when we use the header functions for File adapter and for FTP adapter.

I am highlighting the differences in red.

For FileAdapter


<xsl:variable select="ehdr:getRequestHeader('/fhdr:InboundFileHeaderType/fhdr:fileName','fhdr=http://xmlns.oracle.com/pcbpel/adapter/file/;’)” />


FTP adater


<xsl:value-of select="ehdr:getRequestHeader("/fhdr:InboundFTPHeaderType/fhdr:fileName","fhdr=http://xmlns.oracle.com/pcbpel/adapter/ftp/;")" />

Hope this helps.

No comments: