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

Response in call method of SOAPConnectionImpl returned attachment input instead of attachment output

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.4
    • 1.5.5, 1.6.0
    • saaj
    • None
    • jdk1.6

    Description

      package -> org.apache.axis2.saaj;

      class -> SOAPConnectionImpl extends SOAPConnection {

      metod -> SOAPMessage call(SOAPMessage request, Object endpoint) throws SOAPException {

      Call method return attachment of requestMsgCtx instead of responseMsgCtx :

      SOAPMessage response = getSOAPMessage(responseMsgCtx.getEnvelope());
      Attachments attachments = requestMsgCtx.getAttachmentMap();
      for (String contentId : attachments.getAllContentIDs()) {
      if (!contentId.equals(attachments.getSOAPPartContentID()))

      { AttachmentPart ap = response.createAttachmentPart( attachments.getDataHandler(contentId)); ap.setContentId(contentId); response.addAttachmentPart(ap); }
      }

      return response;

      Correct code :

      SOAPMessage response = getSOAPMessage(responseMsgCtx.getEnvelope());
      Attachments attachments = responseMsgCtx.getAttachmentMap();
      for (String contentId : attachments.getAllContentIDs()) {
      if (!contentId.equals(attachments.getSOAPPartContentID())) { AttachmentPart ap = response.createAttachmentPart( attachments.getDataHandler(contentId)); ap.setContentId(contentId); response.addAttachmentPart(ap); }

      }

      return response;

      Attachments

        Activity

          People

            veithen Andreas Veithen
            pisettam Marzio Pisetta
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: