Sunday, November 6, 2011

Getting file info from JCA File Poller

logging $inbound/ctx:transport/ctx:request/tp:headers gives this:

<tran:headers xsi:type="jca:JCARequestHeadersXML" xmlns:jca="http://www.bea.com/wli/sb/transports/jca" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <tran:user-header name="jca.file.CreationTime" value="0"/>
  <jca:SOAPAction>Read</jca:SOAPAction>
  <jca:jca.file.FileName>po000000001.dat</jca:jca.file.FileName>
  <jca:jca.file.Directory>C:\acme\po\in</jca:jca.file.Directory>
  <jca:jca.file.Size>113</jca:jca.file.Size>
  <jca:jca.file.Batch>z_qjc5GlR6b6iHDgdbExXlDoQiEkb7g2BnTbpmrhd7E.</jca:jca.file.Batch>
  <jca:jca.file.BatchIndex>1</jca:jca.file.BatchIndex>
  <jca:jca.file.LastModifiedTime>1320482562574</jca:jca.file.LastModifiedTime>
</tran:headers>



Filename can be retrieved this way:

$inbound/ctx:transport/ctx:request/tp:headers/tp:headers/jca:jca.file.FileName/text()

where
ctx="http://www.bea.com/wli/sb/context"
tp="http://www.bea.com/wli/sb/transports"
jca="http://www.bea.com/wli/sb/transports/jca"

4 comments:

Victor Serrano M said...

Hello

How can I read only for FileAdapter files with data?

Pierluigi Vernetto said...

sorry Victor, are you asking how to ignore 0-length files?

Victor Serrano M said...

Yes.

Excuse my English but I want to ignore the null reading files, and execute another task with these files

Pierluigi Vernetto said...

Hola Victor, mejor que me llames al +41766418183 o me escribes al publicpierre at gmail dot com asi nos ententemos mejor...

ciao