Why I am getting various SAXParseException?
Issue
We are transforming a SOAP XML message to JSON using a message filter. In the process of experimentation we hit several SAXParseExceptions, enumerated below.
SAXParseExceptions
Exception 1:
Failed delivery for (MessageId: ID-xxx-2-xxx-49329-1426612266001-0-19 on ExchangeId: ID-xxx-2-xxx-49329-1426612266001-0-20). Exhausted after delivery attempt: 1 caught: org.apache.camel.TypeConversionException: Error during type conversion from type: org.apache.camel.converter.stream.InputStreamCache to the required type: org.w3c.dom.Document with value org.apache.camel.converter.stream.InputStreamCache@706e0d63 due org.xml.sax.SAXParseException: Premature end of file.
Exception 2
Failed delivery for (MessageId: ID-xxx-2-xxx-49329-1426612266001-0-22 on ExchangeId: ID-xxx-2-xxx-49329-1426612266001-0-23). Exhausted after delivery attempt: 1 caught: org.apache.camel.TypeConversionException: Error during type conversion from type: org.apache.camel.converter.stream.InputStreamCache to the required type: org.w3c.dom.Document with value org.apache.camel.converter.stream.InputStreamCache@6d09f5d1 due org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
Exception 3
Failed delivery for (MessageId: ID-xxx-2-xxx-49329-1426612266001-0-6 on ExchangeId: ID-xxx-2-xxx-49329-1426612266001-0-7). Exhausted after delivery attempt: 1 caught: org.apache.camel.TypeConversionException: Error during type conversion from type: org.apache.camel.converter.stream.InputStreamCache to the required type: org.w3c.dom.Document with value org.apache.camel.converter.stream.InputStreamCache@3f46768 due org.xml.sax.SAXParseException: Content is not allowed in prolog."
Example 4.
Failed delivery for (MessageId: ID-xxx-2-xxx-49329-1426612266001-1-5 on ExchangeId: ID-xxx-2-xxx-49329-1426612266001-1-6). Exhausted after delivery attempt: 1 caught: org.apache.camel.TypeConversionException: Error during type conversion from type: org.apache.camel.converter.stream.InputStreamCache to the required type: org.w3c.dom.Document with value org.apache.camel.converter.stream.InputStreamCache@68077424 due org.xml.sax.SAXParseException: Element type "soa" must be followed by either attribute specifications, ">" or "/>"."
Environment
- JBoss Fuse
- 6.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.