Shiv
Shiv

Reputation: 25

WSO2 ESB File connector 2 search returns empty response

I use file connector 2 provided by WSO2 ESB (v 5.0.0) to search for a file in the given directory. isFileExist function returns true but when I search for the same file, it returns empty response. Is this a bug or am I missing something?

This is my code

<fileconnector.isFileExist>
 <source>file:///home/test/abc.OUT</source>
</fileconnector.isFileExist>
<log level="full"/>
<fileconnector.search>
 <source>file:///home/test/</source>
 <filePattern>abc.OUT</filePattern>
 <recursiveSearch>false</recursiveSearch>
</fileconnector.search>
<log level="full"/>

This is the response I get

To: , WSAction: mediate, SOAPAction: mediate, MessageID: urn:uuid:2391811e-5c83-4b98-a801-a60fe55b6fd0, Direction: request, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><fileExist>true</fileExist></soapenv:Body></soapenv:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}
To: , WSAction: mediate, SOAPAction: mediate, MessageID: urn:uuid:2391811e-5c83-4b98-a801-a60fe55b6fd0, Direction: request, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns:result xmlns:ns="http://org.wso2.esbconnectors.FileConnector"/></soapenv:Body></soapenv:Envelope> {org.apache.synapse.mediators.builtin.LogMediator}

I get the same result when I use .*\.txt file pattern in search too.

Please help, TIA

Upvotes: 1

Views: 558

Answers (1)

Can you try "abc.out" for file pattern in the search operation?

<filePattern>abc.out</filePattern>

Upvotes: 1

Related Questions