axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Isuru Eranga Suriarachchi (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-5013) Issue in Mail transport for In-Out MEP
Date Tue, 26 Apr 2011 14:59:03 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-5013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025262#comment-13025262
] 

Isuru Eranga Suriarachchi commented on AXIS2-5013:
--------------------------------------------------

"Unexpected EOF in prolog" is the original exception in client side. After getting that, I
hacked into the mail transport code and printed the incoming stream from the very beginning
of the "processMail" method of MailTransportListener. So I found out that it contains some
illegal characters as shown in my first comment. Then I forwarded that stream into Axiom without
calling "updateMetrics" method. That is how I got unexpected characters exception which is
as follows.

org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected
character '3' (code 51); expected a quote character enclosing value for 'version'
 at [row,col {unknown-source}]: [1,15]
	at org.apache.axiom.om.impl.AbstractOMMetaFactory.createXMLStreamReader(AbstractOMMetaFactory.java:54)
	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:501)
	at org.apache.axis2.transport.mail.MailTransportListener.access$000(MailTransportListener.java:61)
	at org.apache.axis2.transport.mail.MailTransportListener$MailProcessor.run(MailTransportListener.java:331)

So there should be something wrong with the received message.

Anyway, should this work fine for asynchronous case? It also failed with the same error for
me.

> 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
>         Attachments: mail-issue.zip
>
>
> 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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message