axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marzio Pisetta (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-4933) Response in call method of SOAPConnectionImpl returned attachment input instead of attachment output
Date Wed, 19 Jan 2011 07:32:43 GMT
Response in call method  of  SOAPConnectionImpl returned attachment input instead of attachment
output 
-------------------------------------------------------------------------------------------------------

                 Key: AXIS2-4933
                 URL: https://issues.apache.org/jira/browse/AXIS2-4933
             Project: Axis2
          Issue Type: Bug
          Components: saaj
    Affects Versions: 1.5.4
         Environment: jdk1.6
            Reporter: Marzio Pisetta


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;



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


Mime
View raw message