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()))
}
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;