Saving message to a folder structure

fkhursheed's picture
Hello I am trying to save incoming messages on a proxy service to a fodler on the server's c drive the proxy recieves xml messages from a queue (this works) but then i want to save it to a folder, this is not working - I am attaching the excerpt from the synapse.xsl that shows this proxy service. Attaching a file with the proxy as well. i have already uncommented out the vfs reciever and sender sections in the axis2.xml file text/xml MOVE text/xml FDCAdapterInQueue@celestramq thank you
AttachmentSize
proxy.txt962 bytes
axis2.xml36.81 KB
indika's picture

 Hi  Are you seeing any

 Hi  Are you seeing any warnning message in the console ?    Please try by putting following mediator in the inSequence of the proxy service    <property action="set" name="OUT_ONLY" value="true"/>  Thanks Indika   
rajika's picture

Can you enable DEBUG logs for

Can you enable DEBUG logs for the vfs-transport and attach the debug log? Rajika
fkhursheed's picture

I get the following error

I get the following error 16:58:41,077 [-] [jms-Worker-2] WARN ERROR_DETAIL : org.apache.synapse.SynapseException: Unexpected error during sending message out at org.apache.synapse.core.axis2.Axis2Sender.handleException(Axis2Sender.java:147) at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:63) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:191) at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:202) at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:59) at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:75) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:60) at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:115) at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:152) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:178) at org.apache.axis2.transport.base.AbstractTransportListener.handleIncomingMessage(AbstractTransportListener.java:314) at org.apache.axis2.transport.jms.JMSMessageReceiver.processThoughEngine(JMSMessageReceiver.java:217) at org.apache.axis2.transport.jms.JMSMessageReceiver.onMessage(JMSMessageReceiver.java:127) at org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask.handleMessage(ServiceTaskManager.java:512) at org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask.run(ServiceTaskManager.java:424) at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:58) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: org.apache.axis2.AxisFault: The system cannot infer the transport information from the vfs:file:///c:/out URL. at org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.java:82) at org.apache.axis2.client.OperationClient.prepareMessageContext(OperationClient.java:304) at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:250) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:347) at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:56) ... 17 more
fkhursheed's picture

attaching the new proxy service configuration

I have attached the new configuration but the error that the folder end point can not be resolved
indika's picture

Following error is occurred

Following error is occurred when there is no transportSender for the vfs in the axis2.xml ( or have commented) org.apache.axis2.AxisFault: The system cannot infer the transport information from the vfs:file:///c:/out URL. Corresponding Code ................ String uri = epr.getAddress(); int index = uri.indexOf(':'); String transport = (index > 0) ? uri.substring(0, index) : null; if (transport != null && ac.getTransportOut(transport) != null) { return ac.getTransportOut(transport); } else { log.error(Messages.getMessage("cannotInferTransport", uri)); throw new AxisFault(Messages.getMessage("cannotInferTransport", uri)); } ........................... You never want to enable vfs on the proxy service if you are not reading files ... and If you want to add parameters such as transport.vfs.Append,transport.vfs.MaxRetryCount when sending files , you have to specify those in the endpoint EPR (same as JMS epr). Tx Indika
rajika's picture

Did you uncomment, the VFS

Did you uncomment, the VFS transport sender/listner from axis2.xml ? Rajika
fkhursheed's picture

yes I ahave uncommented the listener and sender from Axis2.xml

Attaching axis2.xml file i uncommented the sections and then restarted the esb -Farhan
indika's picture

 Please check your axis2.xml

 Please check your axis2.xml ... It is incorrect , you have specified as   transportSender name="vfs" class="org.apache.synapse.transport.vfs.VFSTransportSender"/  Above is a TEXT not XML ... Please correct it as      <transportSender name="vfs" class="org.apache.synapse.transport.vfs.VFSTransportSender"/>   Tx Indika   
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)