Note that there are some explanatory texts on larger screens.

plurals
  1. POwso2 esb transport vfs, read xml file with Doctype fails
    primarykey
    data
    text
    <p>I have a WSO2ESB 4.7 proxy with vfs transport. I need to read some xml files like this one:</p> <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt; &lt;!DOCTYPE Header PUBLIC "/usr/xxx.dtd" "/usr/xxx.dtd"&gt; &lt;Header xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; ... </code></pre> <p>Proxy:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;proxy xmlns="http://ws.apache.org/ns/synapse" name="test" statistics="disable" trace="disable" transports="vfs"&gt; &lt;parameter name="transport.PollInterval"&gt;5&lt;/parameter&gt; &lt;parameter name="transport.vfs.FileURI"&gt;C:\WSO2&lt;/parameter&gt; &lt;parameter name="transport.vfs.FileNamePattern"&gt;.*[.][xX][mM][lL]$&lt;/parameter&gt; &lt;parameter name="transport.vfs.ContentType"&gt;application/xml&lt;/parameter&gt; &lt;target&gt; &lt;inSequence&gt; &lt;property name="OUT_ONLY" value="true"/&gt; &lt;log level="full"/&gt; &lt;send&gt; &lt;endpoint&gt; ... &lt;/endpoint&gt; &lt;/send&gt; &lt;/inSequence&gt; &lt;/target&gt; &lt;/proxy&gt; </code></pre> <p>Wso2 returns this error:</p> <pre><code>[2013-10-15 11:23:03,670] ERROR - VFSTransportListener Error processing File URI : file:///C:/WSO2/1_CHRG_2713540.XML org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: DOCTYPE is not allowed at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296) at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:109) at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:570) at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:566) at org.apache.axis2.builder.ApplicationXMLBuilder.processDocument(ApplicationXMLBuilder.java:81) at org.apache.synapse.transport.vfs.VFSTransportListener.processFile(VFSTransportListener.java:574) at org.apache.synapse.transport.vfs.VFSTransportListener.scanFileOrDirectory(VFSTransportListener.java:324) at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:158) at org.apache.synapse.transport.vfs.VFSTransportListener.poll(VFSTransportListener.java:107) at org.apache.axis2.transport.base.AbstractPollingTransportListener$1$1.run(AbstractPollingTransportListener.java:67) at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) 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:662) Caused by: javax.xml.stream.XMLStreamException: DOCTYPE is not allowed at org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper.next(DisallowDoctypeDeclStreamReaderWrapper.java:36) at org.apache.axiom.util.stax.wrapper.XMLStreamReaderWrapper.next(XMLStreamReaderWrapper.java:225) at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681) at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214) ... 13 more </code></pre> <p>Is there a possibility to get wso2 ignoring the Doctype?</p> <p>I dont want to read the file as text/plain, remove doctype, convert to xml, work with it, convert to text/plain, add doctype. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload