Issue in Mail transport for In-Out MEP
--------------------------------------
Key: AXIS2-5013
URL: https://issues.apache.org/jira/browse/AXIS2-5013
Project: Axis2
Issue Type: Bug
Components: transports
Reporter: Isuru Eranga Suriarachchi
Priority: Critical
I tried to Invoke a simple echo service using Axis2 Mail transport. Request
message went into the service properly and the service returns the response
value. So the "In" path is OK. But on the out path, I get the following
exception on the client side.
org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxEOFException: Unexpected
EOF in prolog
at [row,col {unknown-source}]: [1,0]
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:204)
at
org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:154)
at
org.apache.axiom.om.impl.AbstractOMMetaFactory.createStAXSOAPModelBuilder(AbstractOMMetaFactory.java:73)
at
org.apache.axiom.om.impl.AbstractOMMetaFactory.createSOAPModelBuilder(AbstractOMMetaFactory.java:79)
at
org.apache.axiom.om.OMXMLBuilderFactory.createSOAPModelBuilder(OMXMLBuilderFactory.java:196)
at
org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:55)
at
org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:179)
at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:145)
at
org.apache.axis2.transport.mail.MailTransportListener.processMail(MailTransportListener.java:516)
at
org.apache.axis2.transport.mail.MailTransportListener.access$000(MailTransportListener.java:63)
So I did some investigation on this issue. When I log into the gmail mail
account that I've used in this sample, the request and response messages are
correct. But when I build the client side input stream (for the response
message), it shows as follows.
<?xml version=3D'1.0' encoding=3D'UTF-8'?><soapenv:Envelope xmlns:soapenv=
=3D"http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header xmlns:wsa=3D=
"http://www.w3.org/2005/08/addressing"><wsa:Action>urn:echoResponse</wsa:Ac=
tion><wsa:RelatesTo>urn:uuid:71bddf37-73ba-42f0-bae2-7de4738ccac8</wsa:Rela=
tesTo></soapenv:Header><soapenv:Body><ns:echoResponse xmlns:ns=3D"http://se=
rvice.sample.mail.wso2.org"><ns:return>Helloo...</ns:return></ns:echoRespon=
se></soapenv:Body></soapenv:Envelope>
The message is broken into lines and there are additional characters added at
the end of each line. But I couldn't find out why this happens. Same
MailTransportSender and MailTransportListener codes are used in both client and
server sides. But this happens only on response path.
I'll attach everything needed to reproduce this issue.
Thanks,
~Isuru
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]