Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
NIGHTLY
-
None
Description
When the VFS transport (listener) is used with transport.vfs.ContentType set to "text/xml", the following exception is triggered when a file is received:
org.apache.synapse.transport.base.BaseTransportException: Charset encoding of transport differs from that of the payload
at org.apache.synapse.transport.base.BaseUtils.handleException(BaseUtils.java:331)
at org.apache.synapse.transport.base.BaseUtils.setSOAPEnvelope(BaseUtils.java:228)
at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:412)
at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:229)
at org.apache.synapse.transport.vfs.VFSTransportListener.onPoll(VFSTransportListener.java:135)
at org.apache.synapse.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:77)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:613)
Specifying the charset in the content type (e.g. "text/xml; charset=ISO-8859-1") avoids the problem, but the VFS transport should be able to receive XML without a priori knowledge of the encoding.