Synapse fails to process soap messages when MIME boundary exists in the http
header
-----------------------------------------------------------------------------------
Key: SYNAPSE-71
URL: https://issues.apache.org/jira/browse/SYNAPSE-71
Project: Synapse
Issue Type: Bug
Components: Processor
Environment: Apache tomcat6, Axis2-1.2 (Nightly), Synapse nightly
build, Jdk15
Reporter: Charitha Kankanamge
Priority: Critical
Following exception thrown when synapse trying to process a soap envelope which
includes MIME boundary in the http headers.
==================================================================================================================================
[I/O reactor worker thread 1] DEBUG Axis2HttpRequest - get source channel of
the pipe on which the outgoing response is written
[I/O reactor worker thread 1] DEBUG ConnectionPool - Released a connection to
host: localhost on port : 8080 to the connection pool of current size : 1
[HttpClientWorker-1] ERROR ClientWorker - Fault creating response SOAP envelope
org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxUnexpectedCharException:
Unexpected character '-' (code 45) in prolog; expected '<'
at [row,col {unknown-source}]: [1,1]; nested exception is:
org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException:
Unexpected ch
aracter '-' (code 45) in prolog; expected '<' at [row,col {unknown-source}]:
[1,1]
at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:126)
at
org.apache.axis2.transport.nhttp.ClientWorker.run(ClientWorker.java:115)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.axiom.om.OMException:
com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '-' (code
45) in prolog; expected '<'
at [row,col {unknown-source}]: [1,1]
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:194)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:159)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.identifySOAPVersion(StAXSOAPModelBuilder.java:133)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:
108)
at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:120)
... 4 more
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character
'-' (code 45) in prolog; expected '<'
at [row,col {unknown-source}]: [1,1]
at
com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:623)
at
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2047)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:111)
... 8 more
===============================================================================================
The soap response with mime boundary is given below. This message cannot be
parsed by synapse.
--MIMEBoundaryurn_uuid_108121878C47E694A61174024721520
content-type: application/xop+xml; charset=UTF-8; type="text/xml"
content-transfer-encoding: binary
content-id: <0.urn:uuid:[EMAIL PROTECTED]>
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><ns:multiplyResponse
xmlns:ns="http://ws.apache.org/axis2/xsd"><ns:return>200.0</ns:return></ns:multiplyResponse></soapenv:Body></soapenv:Envelope>
--MIMEBoundaryurn_uuid_108121878C47E694A61174024721520--
Steps to reproduce:
----------------------------
1. Deploy a service on axis2/tomcat
2. Globally enable MTOM in axis2.xml
3. Send a request to the service via Synapse
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]