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

<ns1:FileName>

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

</ns1:FileName>

FTP adater

<ns1:FileName>

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

Hope this helps.

No comments: