WSO2 ESB File connector 2 search returns empty response

扶醉桌前 提交于 2019-12-11 07:14:17

问题


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


回答1:


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

<filePattern>abc.out</filePattern>


来源:https://stackoverflow.com/questions/42798837/wso2-esb-file-connector-2-search-returns-empty-response

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!