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)) { Collection<Attachment> atts = inMessage.getAttachments(); if (atts != null) {
boolean getRequest = "GET".equals(message.get(Message.HTTP_REQUEST_METHOD)); boolean emptyRequest = getRequest || PropertyUtils.isTrue(message.get(EMPTY_REQUEST_PROPERTY)); Object setCtForEmptyRequestProp = message.getContextualProperty(SET_EMPTY_REQUEST_CT_PROPERTY); dropContentType = PropertyUtils.isFalse(setCtForEmptyRequestProp);
String newURL, Message message) throws IOException { Map<String, Integer> visitedURLs = CastUtils.cast((Map<?, ?>)message.get(KEY_VISITED_URLS)); if (visitedURLs == null) { visitedURLs = new HashMap<>(); message.put(KEY_VISITED_URLS, visitedURLs); Integer maxSameURICount = PropertyUtils.getInteger(message, AUTO_REDIRECT_MAX_SAME_URI_COUNT);
public static XMLStreamReader configureReader(XMLStreamReader xreader, Message message) throws XMLStreamException { Integer messageMaxChildElements = PropertyUtils.getInteger(message, MAX_CHILD_ELEMENTS); Integer messageMaxElementDepth = PropertyUtils.getInteger(message, MAX_ELEMENT_DEPTH); Integer messageMaxAttributeCount = PropertyUtils.getInteger(message, MAX_ATTRIBUTE_COUNT); Integer messageMaxAttributeSize = PropertyUtils.getInteger(message, MAX_ATTRIBUTE_SIZE); Integer messageMaxTextLength = PropertyUtils.getInteger(message, MAX_TEXT_LENGTH); Long messageMaxElementCount = PropertyUtils.getLong(message, MAX_ELEMENT_COUNT); Long messageMaxXMLCharacters = PropertyUtils.getLong(message, MAX_XML_CHARACTERS); return configureReader(xreader, messageMaxChildElements, messageMaxElementDepth, messageMaxAttributeCount, messageMaxAttributeSize, messageMaxTextLength, messageMaxElementCount, messageMaxXMLCharacters); }
public void handleMessage(Message message) { OutputStream out = message.getContent(OutputStream.class); XMLStreamWriter writer = message.getContent(XMLStreamWriter.class); if (out == null || writer != null) { return; Object o = message.getContextualProperty(FI_ENABLED); if (!req) { if (message.getExchange().getInMessage() != null) { String s = (String)message.getExchange().getInMessage().get(Message.ACCEPT_CONTENT_TYPE); if (s != null && s.contains("fastinfoset")) { o = Boolean.TRUE; || PropertyUtils.isTrue(o)) { StAXDocumentSerializer serializer = getOutput(out); message.setContent(XMLStreamWriter.class, serializer);
Object o = message.getContextualProperty(USE_ASYNC); if (o == null) { o = factory.getUseAsyncPolicy(); case ASYNC_ONLY: default: o = !message.getExchange().isSynchronous(); break; TLSClientParameters clientParameters = message.get(TLSClientParameters.class); if (clientParameters == null) { clientParameters = tlsClientParameters; if (!PropertyUtils.isTrue(o)) { message.put(USE_ASYNC, Boolean.FALSE); super.setupConnection(message, addressChanged ? new Address(uriString, uri) : address, csPolicy);
public void handleMessage(Message message) throws Fault { if (PropertyUtils.isTrue(message.getExchange().get(JAXRSUtils.SECOND_JAXRS_EXCEPTION))) { return; final Fault f = (Fault) message.getContent(Exception.class); message.setContent(List.class, new MessageContentsList(r)); if (message.getExchange().getOutMessage() == null && message.getExchange().getOutFaultMessage() != null) { message.getExchange().setOutMessage(message.getExchange().getOutFaultMessage());
protected Object[] preProcessResult(Message message) throws Exception { Exchange exchange = message.getExchange(); Exception ex = message.getContent(Exception.class); if (ex != null || PropertyUtils.isTrue(exchange.get(SERVICE_NOT_AVAIL_PROPERTY)) && PropertyUtils.isTrue(exchange.get(COMPLETE_IF_SERVICE_NOT_AVAIL_PROPERTY))) { getConfiguration().getConduitSelector().complete(exchange); } if (ex != null) { checkClientException(message, ex); } checkClientException(message, exchange.get(Exception.class)); List<?> result = exchange.get(List.class); return result != null ? result.toArray() : null; }
.get(org.apache.cxf.message.Message.PROTOCOL_HEADERS)); !PropertyUtils.isTrue(outMessage.getExchange().get(org.apache.cxf.message.Message.REST_MESSAGE)); boolean isFault = outMessage.getContent(Exception.class) != null; messageHeaders.setSOAPJMSIsFault(isFault);
if (pf.isParamConverterContextsAvailable()) { m = new MessageImpl(); m.put(Message.REQUESTOR_ROLE, Boolean.TRUE); m.setExchange(new ExchangeImpl()); m.getExchange().setOutMessage(m); m.getExchange().put(Endpoint.class, cfg.getEndpoint()); if (null != pp) { Object allowEmptyProp = getConfiguration().getBus().getProperty(ALLOW_EMPTY_PATH_VALUES); if (!PropertyUtils.isTrue(allowEmptyProp)) { throw new IllegalArgumentException("Value for " + pp.value() + " is not specified");
public void handleMessage(final Message message) { final Exchange exchange = message.getExchange(); final Endpoint endpoint = exchange.get(Endpoint.class); final Service service = endpoint.getService(); final Invoker invoker = service.getInvoker(); Executor executor2 = exchange.get(Executor.class); if (executor2 == executor || executor == null) { exchange.put(Executor.class, executor); FutureTask<Object> o = new FutureTask<Object>(invocation, null) { @Override if (PropertyUtils.isTrue(exchange.remove(Message.SUSPENDED_INVOCATION))) { message.getInterceptorChain().suspend();
/** * Called on completion of the MEP for which the Conduit was required. * * @param exchange represents the completed MEP */ public void complete(Exchange exchange) { // Clients expecting explicit InputStream responses // will need to keep low level conduits operating on InputStreams open // and will be responsible for closing the streams if (PropertyUtils.isTrue(exchange.get(KEEP_CONDUIT_ALIVE))) { return; } try { if (exchange.getInMessage() != null) { Conduit c = exchange.getOutMessage().get(Conduit.class); if (c == null) { getSelectedConduit(exchange.getInMessage()).close(exchange.getInMessage()); } else { c.close(exchange.getInMessage()); } } } catch (IOException e) { //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); }
&& !PropertyUtils.isTrue(message.get(MAPAggregator.ACTION_VERIFIED))) { if (sa.startsWith("\"")) { sa = sa.substring(1, sa.lastIndexOf('"')); if (!message.getExchange().isOneWay() && (messageID == null || messageID.getValue() == null) && valid) {
@Override public void handleFault(Message message) { message.put(MAPAggregator.class.getName(), true); if (RMContextUtils.getProtocolVariation(message) != null) { if (PropertyUtils.isTrue(message.get(RMMessageConstants.DELIVERING_ROBUST_ONEWAY))) { && !PropertyUtils.isTrue(message.get(RMMessageConstants.DELIVERING_ROBUST_ONEWAY))) { Exchange exchange = message.getExchange(); exchange.setOneWay(false); exchange.setDestination(ContextUtils.createDecoupledDestination(exchange, maps.getFaultTo()));
if (PropertyUtils.isTrue(message.get(RMMessageConstants.DELIVERING_ROBUST_ONEWAY))) { return; message.getInterceptorChain().abort(); if (seq.sendAcknowledgement()) { ackImmediately(seq, message); Exchange exchange = message.getExchange(); Conduit conduit = exchange.getDestination().getBackChannel(message); if (conduit != null) {
public static Message getContextMessage(Message m) { Message contextMessage = m.getExchange() != null ? m.getExchange().getInMessage() : m; if (contextMessage == null && !PropertyUtils.isTrue(m.get(Message.INBOUND_MESSAGE))) { contextMessage = m; } return contextMessage; }
private void doSoap(Message message) { MessageContentsList list = (MessageContentsList)message.getContent(List.class); if (list == null || list.isEmpty()) { return; message.put("write.attachments", Boolean.TRUE); Object enc = soapMessage.getProperty(SOAPMessage.CHARACTER_SET_ENCODING); if (enc instanceof String) { message.put(Message.ENCODING, enc); Object xmlDec = soapMessage.getProperty(SOAPMessage.WRITE_XML_DECLARATION); if (xmlDec != null) { boolean b = PropertyUtils.isTrue(xmlDec); message.put(StaxOutInterceptor.FORCE_START_DOCUMENT, b);
protected void handleHeadersTrustCaching() throws IOException { // Need to set the headers before the trust decision // because they are set before the connect(). setProtocolHeaders(); // // This point is where the trust decision is made because the // Sun implementation of URLConnection will not let us // set/addRequestProperty after a connect() call, and // makeTrustDecision needs to make a connect() call to // make sure the proper information is available. // makeTrustDecision(); // Trust is okay, set up for writing the request. String method = getMethod(); if (KNOWN_HTTP_VERBS_WITH_NO_CONTENT.contains(method) || PropertyUtils.isTrue(outMessage.get(Headers.EMPTY_REQUEST_PROPERTY))) { handleNoOutput(); return; } setupWrappedStream(); }
CURRENT_MESSAGE.set(message); if (oldMessage != null && !message.containsKey(PREVIOUS_MESSAGE) && message != oldMessage && message.getExchange() != oldMessage.getExchange()) { message.put(PREVIOUS_MESSAGE, new WeakReference<Message>(oldMessage)); Object suspendProp = message.remove("suspend.chain.on.current.interceptor"); if ((suspendProp == null || PropertyUtils.isFalse(suspendProp)) && iterator.hasPrevious()) { iterator.previous();