Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-5013

Issue in Mail transport for In-Out MEP

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Duplicate
    • None
    • None
    • transports
    • None

    Description

      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

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            isurues Isuru Suriarachchi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment