Refine search
private boolean isResponseRedirected(Message outMessage) { Exchange exchange = outMessage.getExchange(); return exchange != null && Boolean.TRUE.equals(exchange.get(REQUEST_REDIRECTED)); }
public Servlet3Continuation() { req.setAttribute(AbstractHTTPDestination.CXF_CONTINUATION_MESSAGE, inMessage.getExchange().getInMessage()); callback = inMessage.getExchange().get(ContinuationCallback.class); blockRestart = PropertyUtils.isTrue(inMessage.getContextualProperty(BLOCK_RESTART)); context = req.startAsync(); context.addListener(this); }
public void onComplete(AsyncEvent event) throws IOException { inMessage.getExchange().getInMessage() .remove(AbstractHTTPDestination.CXF_CONTINUATION_MESSAGE); if (callback != null) { final Exception ex = inMessage.getExchange().get(Exception.class); if (ex == null) { callback.onComplete(); } else { callback.onError(ex); } } isResumed = false; isPending = false; } public void onError(AsyncEvent event) throws IOException {
@Override public void handleMessage(Message message) throws Fault { @SuppressWarnings("unchecked") final TraceScopeHolder<TraceScope> holder = (TraceScopeHolder<TraceScope>)message.getExchange().get(TRACE_SPAN); Integer responseCode = (Integer)message.get(Message.RESPONSE_CODE); if (responseCode == null) { responseCode = 200; } super.stopTraceSpan(holder, responseCode); } }
public void handleMessage(Message message) throws Fault { W3CDOMStreamWriter domWriter = (W3CDOMStreamWriter)message.getContent(XMLStreamWriter.class); XMLStreamWriter origWriter = (XMLStreamWriter)message .get(LogicalHandlerOutInterceptor.ORIGINAL_WRITER); XMLStreamReader reader = (XMLStreamReader)message.get("LogicalHandlerInterceptor.INREADER"); SOAPMessage origMessage = null; if (reader != null) { if (!message.getExchange().isOneWay()) { Endpoint e = message.getExchange().getEndpoint(); Message responseMsg = new MessageImpl(); responseMsg.setExchange(message.getExchange()); responseMsg = e.getBinding().createMessage(responseMsg); MessageObserver observer = message.getExchange() .get(MessageObserver.class); if (observer != null) {
private DispatchingRequest getDispatchingRequest(Message message) { Exchange exchange = message.getExchange(); String action = (String) exchange.get(MULE_SOAP_ACTION); Map<String, String> headers = new HashMap<>(); headers.put(SOAP_ACTION, action); // It's important that content type is bundled with the headers headers.put(CONTENT_TYPE, (String) message.get(CONTENT_TYPE)); headers.putAll((Map) exchange.get(MULE_TRANSPORT_HEADERS_KEY)); InputStream content = new ByteArrayInputStream(message.getContent(OutputStream.class).toString().getBytes()); return new DispatchingRequest(content, (String) exchange.get(MULE_WSC_ADDRESS), headers); } }
public void run() { try { handleResponseInternal(); } catch (Throwable e) { ((PhaseInterceptorChain)outMessage.getInterceptorChain()).abort(); outMessage.setContent(Exception.class, e); ((PhaseInterceptorChain)outMessage.getInterceptorChain()).unwind(outMessage); MessageObserver mo = outMessage.getInterceptorChain().getFaultObserver(); if (mo == null) { mo = outMessage.getExchange().get(MessageObserver.class); } mo.onMessage(outMessage); } } };
public void handleMessage(Message message) throws Fault { Exchange ex = message.getExchange(); BindingOperationInfo boi = ex.getBindingOperationInfo(); if (Boolean.TRUE.equals(message.get(Message.PARTIAL_RESPONSE_MESSAGE)) || boi == null) { return; Method method = ex.get(Method.class); BindingMessageInfo bmi; MessageInfo wrappedMessageInfo = message.get(MessageInfo.class); MessageInfo messageInfo; if (wrappedMessageInfo == boi.getOperationInfo().getInput()) { Service service = ServiceModelUtil.getService(message.getExchange()); DataBinding dataBinding = service.getDataBinding(); if (dataBinding instanceof WrapperCapableDatabinding) {
if (!exceptionSet) { try { Executor ex = outMessage.getExchange().get(Executor.class); if (forceWQ && ex != null) { final Executor ex2 = ex; WorkQueueManager mgr = outMessage.getExchange().getBus() .getExtension(WorkQueueManager.class); AutomaticWorkQueue qu = mgr.getNamedWorkQueue("http-conduit"); outMessage.getExchange().put(Executor.class.getName() + ".USING_SPECIFIED", Boolean.TRUE); ex.execute(runnable);
public Source getPayload() { Source source = null; Service.Mode mode = msgContext.getWrappedMessage().getExchange().get(Service.Mode.class);
public Object getContextualProperty(Object key) { Object value = m.getContextualProperty(key.toString()); if (value == null && key.getClass() == Class.class) { return m.getExchange().get((Class<?>)key); } return value; }
private Message getOutMessage() { Message message = m.getExchange().getOutMessage(); if (message == null) { Endpoint ep = m.getExchange().get(Endpoint.class); message = new org.apache.cxf.message.MessageImpl(); message.setExchange(m.getExchange()); message = ep.getBinding().createMessage(message); m.getExchange().setOutMessage(message); } return message; }
public void handleMessage(Message message) throws Fault { MuleEvent event = (MuleEvent) message.getExchange().get(CxfConstants.MULE_EVENT); MuleMessage muleMsg = event.getMessage(); Collection<Attachment> atts = message.getAttachments(); if (atts != null && !atts.isEmpty()) { muleMsg.setInvocationProperty(CxfConstants.ATTACHMENTS, atts); muleMsg.setOutboundProperty(HttpConstants.HEADER_CONTENT_TYPE, muleMsg.getInboundProperty(HttpConstants.HEADER_CONTENT_TYPE)); } }
public void reset() { isComplete = true; try { context.complete(); } catch (IllegalStateException ex) { // ignore } isPending = false; isResumed = false; isNew = false; isTimeout = false; obj = null; if (callback != null) { final Exception ex = inMessage.getExchange().get(Exception.class); Throwable cause = isCausedByIO(ex); if (cause != null && isClientDisconnected(cause)) { callback.onDisconnect(); } } }
@Override public void handleMessage(Message message) throws Fault { @SuppressWarnings("unchecked") final TraceScopeHolder<TraceScope> holder = (TraceScopeHolder<TraceScope>)message.getExchange().get(TRACE_SPAN); Integer responseCode = (Integer)message.get(Message.RESPONSE_CODE); if (responseCode == null) { responseCode = 200; } super.stopTraceSpan(holder, responseCode); } }
private WebSocketContinuation(final Message message, final HttpServletRequest request, final HttpServletResponse response, final WebSocketRegistry registry) { this.message = message; this.request = request; this.response = response; this.registry = registry; this.request .setAttribute(AbstractHTTPDestination.CXF_CONTINUATION_MESSAGE, message.getExchange().getInMessage()); this.callback = message.getExchange().get(ContinuationCallback.class); }