/** * This is called when we receive a message. * * @param msgContext the (response) MessageContext */ public void onMessage(MessageContext msgContext) { // Transport input stream gets closed after calling setComplete // method. Have to build the whole envelope including the // attachments at this stage. Data might get lost if the input // stream gets closed before building the whole envelope. // TODO: Shouldn't need to do this - need to hook up stream closure to Axiom completion this.envelope = msgContext.getEnvelope(); this.envelope.buildWithAttachments(); }
/** * This is called when we receive a message. * * @param msgContext the (response) MessageContext */ public void onMessage(MessageContext msgContext) { // Transport input stream gets closed after calling setComplete // method. Have to build the whole envelope including the // attachments at this stage. Data might get lost if the input // stream gets closed before building the whole envelope. // TODO: Shouldn't need to do this - need to hook up stream closure to Axiom completion this.envelope = msgContext.getEnvelope(); this.envelope.buildWithAttachments(); }
/** * This is called when we receive a message. * * @param msgContext the (response) MessageContext */ @Override public void onMessage(MessageContext msgContext) { // Transport input stream gets closed after calling setComplete // method. Have to build the whole envelope including the // attachments at this stage. Data might get lost if the input // stream gets closed before building the whole envelope. // TODO: Shouldn't need to do this - need to hook up stream closure to Axiom completion this.envelope = msgContext.getEnvelope(); this.envelope.buildWithAttachments(); }
private boolean checkAndReplaceEnvelope(OMElement resultElement, MessageContext synCtx) { OMElement firstChild = resultElement.getFirstElement(); QName resultQName = firstChild.getQName(); if (resultQName.getLocalPart().equals("Envelope") && ( resultQName.getNamespaceURI().equals(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI) || resultQName.getNamespaceURI(). equals(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI))) { SOAPEnvelope soapEnvelope = AXIOMUtils.getSOAPEnvFromOM(resultElement.getFirstElement()); if (soapEnvelope != null) { try { soapEnvelope.buildWithAttachments(); synCtx.setEnvelope(soapEnvelope); } catch (AxisFault axisFault) { handleException("Unable to attach SOAPEnvelope", axisFault, synCtx); } } } else { return false; } return true; }
public boolean storeMessage(MessageContext synCtx) { boolean result = false; if (synCtx != null) { synCtx.getEnvelope().buildWithAttachments(); synchronized (queueLock) { result = queue.offer(synCtx); } if (!result) { logger.warn(getId() + " ignored MessageID : " + synCtx.getMessageID()); } } if (logger.isDebugEnabled()) { logger.debug(getId() + " stored MessageID: " + synCtx.getMessageID()); } if (result) { store.enqueued(); } return result; }
try { RelayUtils.buildMessage(responseMsgContext, false); responseMsgContext.getEnvelope().buildWithAttachments(); } catch (Exception e) { throw new AxisFault(e.getMessage());
msgCtx.getEnvelope().buildWithAttachments(); msgCtx.setProperty("NIO-ACK-Requested", "true"); msgCtx.setProperty("HTTP_SC", HttpServletResponse.SC_UNAUTHORIZED);
msgCtx.getEnvelope().buildWithAttachments(); msgCtx.setProperty("NIO-ACK-Requested", "true"); msgCtx.setProperty("HTTP_SC", HttpServletResponse.SC_UNAUTHORIZED);
/** * This is to create a separate thread to process business logic invocation. We create a AsyncMessageReceiverWorker * which internally calls the message receiver specified for the operation. * * We send the ACK through the incoming transport and reply through the address specified in replyTo address. * @param messageCtx msgContext the current MessageContext */ private void processAsAsync(MessageContext messageCtx) { AsyncMessageReceiverWorker worker = new AsyncMessageReceiverWorker( messageCtx); if (messageCtx.isDoingMTOM() || messageCtx.isDoingSwA()) { // If we are doing MTOM or SWA then we need to build with attachment, because we are going to close the incoming connection messageCtx.getEnvelope().buildWithAttachments(); } else { // We need to build the envelop since we are going to close the input stream messageCtx.getEnvelope().build(); } messageCtx.getConfigurationContext().getThreadPool().execute( worker); }
/** * This is to create a separate thread to process business logic invocation. We create a AsyncMessageReceiverWorker * which internally calls the message receiver specified for the operation. * * We send the ACK through the incoming transport and reply through the address specified in replyTo address. * @param messageCtx msgContext the current MessageContext */ private void processAsAsync(MessageContext messageCtx) { AsyncMessageReceiverWorker worker = new AsyncMessageReceiverWorker( messageCtx); if (messageCtx.isDoingMTOM() || messageCtx.isDoingSwA()) { // If we are doing MTOM or SWA then we need to build with attachment, because we are going to close the incoming connection messageCtx.getEnvelope().buildWithAttachments(); } else { // We need to build the envelop since we are going to close the input stream messageCtx.getEnvelope().build(); } messageCtx.getConfigurationContext().getThreadPool().execute( worker); }
messageContext.getEnvelope().buildWithAttachments(); if (messageContext.getEnvelope().getBody().getFirstElement() != null) { messageContext.getEnvelope().getBody().getFirstElement().buildNext();
synCtx.getEnvelope().buildWithAttachments();
synCtx.getEnvelope().buildWithAttachments();
synCtx.getEnvelope().buildWithAttachments();
buildMessage(synCtx); synCtx.getEnvelope().buildWithAttachments();