Refine search
@Override public void handleMessage(SoapMessage message) throws Fault { HttpServletResponse response = (HttpServletResponse) message.getExchange() .getInMessage().get(AbstractHTTPDestination.HTTP_RESPONSE); response.setStatus(200); // message.put(SoapMessage.RESPONSE_CODE, 200); } }
protected void updateMessageForSuspend() { inMessage.getExchange().getInMessage().getInterceptorChain().suspend(); } public void redispatch() {
@Override public void handleFault(Message message) { Exception ex = message.getContent(Exception.class); if (ex instanceof AuthenticationException) { HttpServletResponse resp = (HttpServletResponse)message.getExchange() .getInMessage().get(AbstractHTTPDestination.HTTP_RESPONSE); resp.setStatus(HttpServletResponse.SC_UNAUTHORIZED); resp.setHeader("WWW-Authenticate", authenticationType + " realm=\"" + realm + "\""); resp.setContentType("text/plain"); try { resp.getOutputStream().write(ex.getMessage().getBytes()); resp.getOutputStream().flush(); message.getInterceptorChain().setFaultObserver(null); //avoid return soap fault message.getInterceptorChain().abort(); } catch (IOException e) { // TODO } } }
public void handleMessage(Message message) throws Fault { MessageContentsList outObjects = MessageContentsList.getContentsList(message); Exchange exchange = message.getExchange(); OperationInfo op = exchange.getBindingOperationInfo() == null ? null if (!Boolean.TRUE.equals(message.get(Message.REQUESTOR_ROLE))) { List<MessagePartInfo> parts = op.getOutput().getMessageParts(); MessageContentsList inObjects = MessageContentsList.getContentsList(exchange.getInMessage()); if (inObjects != null) { if (!(inObjects == outObjects)) {
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 close(Message msg) throws IOException { super.close(msg); if (msg.getExchange() == null) { return; } Message m = msg.getExchange().getInMessage(); if (m == null) { return; } InputStream is = m.getContent(InputStream.class); if (is != null) { try { is.close(); m.removeContent(InputStream.class); } catch (IOException ioex) { //ignore } } } }
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 static Message getContextMessage(Message m) { Message contextMessage = m.getExchange() != null ? m.getExchange().getInMessage() : m; if (contextMessage == null && Boolean.FALSE.equals(m.get(Message.INBOUND_MESSAGE))) { contextMessage = m; } return contextMessage; }
@Override protected void updateMessageForSuspend() { Message currentMessage = PhaseInterceptorChain.getCurrentMessage(); if (currentMessage.get(WriteListener.class) != null) { // CXF Continuation WriteListener will likely need to be introduced // for NIO supported with non-Servlet specific mechanisms getOutputStream().setWriteListener(currentMessage.get(WriteListener.class)); currentMessage.getInterceptorChain().suspend(); } else { inMessage.getExchange().getInMessage().getInterceptorChain().suspend(); } }
protected Message getMessage() { Message m = message; if (m != null && m.getExchange().getInMessage() != null) { m = m.getExchange().getInMessage(); } return m; }
private void changeToOneway(Exchange exchange) { exchange.setOneWay(true); exchange.setOutMessage(null); javax.servlet.http.HttpServletResponse httpresp = (javax.servlet.http.HttpServletResponse)exchange.getInMessage(). get("HTTP.RESPONSE"); if (httpresp != null) { httpresp.setStatus(202); } }
@Override public boolean suspend(final long timeout) { isNew = false; resumed = false; pending = true; message.getExchange().getInMessage().getInterceptorChain().suspend(); return true; }
public <T> T getContent(Class<T> format) { if (MessageUtils.isRequestor(m) && m.getExchange().getInMessage() != null) { Message inMessage = m.getExchange().getInMessage(); return inMessage.getContent(format); } return m.getContent(format); }
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); }
private ContinuationProvider getContinuationProvider() { return (ContinuationProvider)JAXRSUtils.getCurrentMessage().getExchange() .getInMessage().get(ContinuationProvider.class.getName()); } }
if (outMessage.getExchange() == null) { return; Message inMessage = outMessage.getExchange().getInMessage(); if (inMessage == null) { return; Object o = inMessage.get("cxf.io.cacheinput"); DelegatingInputStream in = inMessage.getContent(DelegatingInputStream.class); if (PropertyUtils.isTrue(o)) {
protected Message getMessage() { Message m = message; if (m != null && m.getExchange().getInMessage() != null) { m = m.getExchange().getInMessage(); } return m; }
return ret; ContinuationProvider cp = ex.getInMessage().get(ContinuationProvider.class); .getContextualBoolean(ex.getInMessage(), PARTIAL_RESPONSE_SENT_PROPERTY, false); if ((cp == null) && uam.always() || decoupledEndpoints) { JaxwsServerHandler handler = new JaxwsServerHandler(null);
protected void updateMessageForSuspend() { inMessage.getExchange().getInMessage().getInterceptorChain().suspend(); } public void redispatch() {
public <T> T getContent(Class<T> format) { if (MessageUtils.isRequestor(m) && m.getExchange().getInMessage() != null) { Message inMessage = m.getExchange().getInMessage(); return inMessage.getContent(format); } return m.getContent(format); }