/** * extract attachments from the current request * * @return a list of attachmentparts or an empty array for no attachments support in this axis * buid/runtime */ private AttachmentPart[] getMessageAttachments() throws AxisFault { Attachments messageAttachments = MessageContext.getCurrentContext().getRequestMessage().getAttachmentsImpl(); if (null == messageAttachments) { log.warn("No attachment support"); return new AttachmentPart[0]; } else { int attachmentCount = messageAttachments.getAttachmentCount(); AttachmentPart attachments[] = new AttachmentPart[attachmentCount]; Iterator it = messageAttachments.getAttachments().iterator(); int count = 0; while (it.hasNext()) { AttachmentPart part = (AttachmentPart) it.next(); attachments[count++] = part; } return attachments; } }
/** * Set the response message, and make sure that message is associated * with this MessageContext. * * @param respMsg the new response Message. */ public void setResponseMessage(Message respMsg) { responseMessage = respMsg; if (responseMessage != null) { responseMessage.setMessageContext(this); //if we have received attachments of a particular type // than that should be the default type to send. Message reqMsg = getRequestMessage(); if (null != reqMsg) { Attachments reqAttch = reqMsg.getAttachmentsImpl(); Attachments respAttch = respMsg.getAttachmentsImpl(); if (null != reqAttch && null != respAttch) { if (respAttch.getSendType() == Attachments.SEND_TYPE_NOTSET) //only if not explicity set. respAttch.setSendType(reqAttch.getSendType()); } } } }
/** * Set the response message, and make sure that message is associated * with this MessageContext. * * @param respMsg the new response Message. */ public void setResponseMessage(Message respMsg) { responseMessage = respMsg; if (responseMessage != null) { responseMessage.setMessageContext(this); //if we have received attachments of a particular type // than that should be the default type to send. Message reqMsg = getRequestMessage(); if (null != reqMsg) { Attachments reqAttch = reqMsg.getAttachmentsImpl(); Attachments respAttch = respMsg.getAttachmentsImpl(); if (null != reqAttch && null != respAttch) { if (respAttch.getSendType() == Attachments.SEND_TYPE_NOTSET) //only if not explicity set. respAttch.setSendType(reqAttch.getSendType()); } } } }
/** * Set the response message, and make sure that message is associated * with this MessageContext. * * @param respMsg the new response Message. */ public void setResponseMessage(Message respMsg) { responseMessage = respMsg; if (responseMessage != null) { responseMessage.setMessageContext(this); //if we have received attachments of a particular type // than that should be the default type to send. Message reqMsg = getRequestMessage(); if (null != reqMsg) { Attachments reqAttch = reqMsg.getAttachmentsImpl(); Attachments respAttch = respMsg.getAttachmentsImpl(); if (null != reqAttch && null != respAttch) { if (respAttch.getSendType() == Attachments.SEND_TYPE_NOTSET) //only if not explicity set. respAttch.setSendType(reqAttch.getSendType()); } } } }
class MultiRefItem { String id; QName xmlType; Boolean sendType; Object value; MultiRefItem(String id, QName xmlType, Boolean sendType, Object value) { this.id = id; this.xmlType = xmlType; this.sendType = sendType; this.value = value; } } /**
class MultiRefItem { String id; QName xmlType; Boolean sendType; Object value; MultiRefItem(String id, QName xmlType, Boolean sendType, Object value) { this.id = id; this.xmlType = xmlType; this.sendType = sendType; this.value = value; } } /**
class MultiRefItem { String id; QName xmlType; Boolean sendType; Object value; MultiRefItem(String id, QName xmlType, Boolean sendType, Object value) { this.id = id; this.xmlType = xmlType; this.sendType = sendType; this.value = value; } } /**
Attachments attachments=msg.getAttachmentsImpl(); if(null != attachments) { if( ATTACHMENT_ENCAPSULATION_FORMAT_MIME.equals(attachformat)) { Attachments attachments= msg.getAttachmentsImpl(); if(null == attachments) { throw new RuntimeException(
Attachments attachments=msg.getAttachmentsImpl(); if(null != attachments) { if( ATTACHMENT_ENCAPSULATION_FORMAT_MIME.equals(attachformat)) { Attachments attachments= msg.getAttachmentsImpl(); if(null == attachments) { throw new RuntimeException(
Attachments attachments=msg.getAttachmentsImpl(); if(null != attachments) { if( ATTACHMENT_ENCAPSULATION_FORMAT_MIME.equals(attachformat)) { Attachments attachments= msg.getAttachmentsImpl(); if(null == attachments) { throw new RuntimeException(
if(null != (msg=msgContext.getCurrentMessage())){ Attachments attch= null; if( null != (attch= msg.getAttachmentsImpl())){ try{ ret= attch.getAttachmentByReference(href);
if(null != (msg=msgContext.getCurrentMessage())){ Attachments attch= null; if( null != (attch= msg.getAttachmentsImpl())){ try{ ret= attch.getAttachmentByReference(href);
if(null != (msg=msgContext.getCurrentMessage())){ Attachments attch= null; if( null != (attch= msg.getAttachmentsImpl())){ try{ ret= attch.getAttachmentByReference(href);
((org.apache.axis.Message)request).setMessageContext(call.getMessageContext()); Attachments attachments = ((org.apache.axis.Message) request).getAttachmentsImpl(); if (attachments != null) { Iterator iterator = attachments.getAttachments().iterator();
Attachments attachments = msg.getAttachmentsImpl(); boolean useAttachments = (attachments != null) && mUseAttachments; if (useAttachments) {
((org.apache.axis.Message)request).setMessageContext(call.getMessageContext()); Attachments attachments = ((org.apache.axis.Message) request).getAttachmentsImpl(); if (attachments != null) { Iterator iterator = attachments.getAttachments().iterator();
Attachments attachments= context.getCurrentMessage().getAttachmentsImpl();
((org.apache.axis.Message)request).setMessageContext(call.getMessageContext()); Attachments attachments = ((org.apache.axis.Message) request).getAttachmentsImpl(); if (attachments != null) { Iterator iterator = attachments.getAttachments().iterator();
Attachments attachments= context.getCurrentMessage().getAttachmentsImpl();
Attachments attachments= context.getCurrentMessage().getAttachmentsImpl();