Daniel
I tried your example, and it worked as expected. For simplicity, I
removed the script mediator, and invoked the Axis2 "echo" service, which
simply returns my request. My updated config is attached. Note that I
removed the "OUT_ONLY" property, since it seems like you want to get a
response from the web service, and write it to the "out" directory.
I then copied a CSV into the "/tmp/in" and using TCPMon, I could see the
file contents being sent to the Echo service as:
POST http://localhost:9001/axis2/services/MyService HTTP/1.1
FILE_PATH: /tmp/in/SqlSample.csv
FILE_NAME: SqlSample.csv
SOAPAction: urn:echo
Content-Type: text/xml; charset=UTF-8
Transfer-Encoding: chunked
Host: 127.0.0.1
Connection: Keep-Alive
User-Agent: Synapse-HttpComponents-NIO
d9e
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<axis2ns1:text
xmlns:axis2ns1="http://ws.apache.org/commons/ns/payload">... CSV Data
....</axis2ns1:text>
</soapenv:Body>
</soapenv:Envelope>0
Then I could see the response in
/tmp/out/87C3A627E1CC6E6AB61217483035786279001-1925780599.xml with the
same original CSV data
I am using Synapse 1.2 release
asankha
--
Asankha C. Perera
WSO2 - http://wso2.org
http://esbmagic.blogspot.com
<definitions xmlns="http://ws.apache.org/ns/synapse">
<sequence name="updatecase">
<!--property action="set" name="OUT_ONLY" value="true"/-->
<header name="Action" value="urn:echo"/>
<send>
<endpoint>
<address uri="http://localhost:9001/axis2/services/MyService" format="soap11"/>
</endpoint>
</send>
</sequence>
<proxy name="FileProxy" transports="vfs">
<parameter name="transport.vfs.FileURI">file:///tmp/in</parameter>
<parameter name="transport.vfs.ContentType">text/plain; charset=ISO-8859-1</parameter>
<parameter name="transport.vfs.FileNamePattern">.*\.csv</parameter>
<parameter name="transport.PollInterval">15</parameter>
<parameter name="transport.vfs.MoveAfterProcess">file:///tmp/suceeded</parameter>
<parameter name="transport.vfs.MoveAfterFailure">file:///tmp/failed</parameter>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
<target inSequence="updatecase">
<outSequence>
<log level="full">
<property name="Message ID" expression="get-property('MessageID')"/>
</log>
<property name="transport.vfs.ReplyFileName"
expression="fn:concat(fn:substring-after(get-property('MessageID'), 'urn:uuid:'), '.xml')" scope="transport"/>
<send>
<endpoint>
<address uri="vfs:file:///tmp/out"/>
</endpoint>
</send>
</outSequence>
</target>
</proxy>
</definitions>