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: [email protected]
For additional commands, e-mail: [email protected]