public Map<String, Object> getResponseContext() { return new WrappedMessageContext(client.getResponseContext(), null, Scope.APPLICATION); } public Binding getBinding() {
public Map<String, Object> getResponseContext() { if (client == null) { throw new IllegalStateException("The client has been closed."); } return new WrappedMessageContext(this.getClient().getResponseContext(), null, Scope.APPLICATION); }
Map<String, Object> respContext = client.getResponseContext(); Map<String, Scope> scopes = CastUtils.cast((Map<?, ?>)respContext.get(WrappedMessageContext.SCOPES)); if (scopes != null) {
@Override public Map<String, Object> getResponseContext() { return Client.this.getResponseContext(); } };
@Override public Map<String, Object> getResponseContext() { return Client.this.getResponseContext(); } };
public Map<String, Object> getResponseContext() { if (client == null) { throw new IllegalStateException("The client has been closed."); } return client.getResponseContext(); }
public void handleFault(Message message) { client.getResponseContext().clear(); } }
public Map<String, Object> getResponseContext() { if (client == null) { throw new IllegalStateException("The client has been closed."); } return client.getResponseContext(); }
public void handleMessage(Message message) throws Fault { client.getResponseContext().clear(); }
public Map<String, Object> getResponseContext() { return new WrappedMessageContext(client.getResponseContext(), null, Scope.APPLICATION); } public Binding getBinding() {
protected void cleanup() { // MULE-4899: cleans up client's request and response context to avoid a // memory leak. Map<String, Object> requestContext = client.getRequestContext(); requestContext.clear(); Map<String, Object> responseContext = client.getResponseContext(); responseContext.clear(); }
public Map<String, Object> getResponseContext() { if (client == null) { throw new IllegalStateException("The client has been closed."); } return new WrappedMessageContext(this.getClient().getResponseContext(), null, Scope.APPLICATION); }
private Object sendDocument(org.dom4j.Document doc) throws Exception { Client client = getClient(); if (null != soapHeaders) { LOG.fine("Generic consumer sendDocument soapHeaders: " + Arrays.toString(soapHeaders.toArray())); client.getRequestContext().put(org.apache.cxf.headers.Header.HEADER_LIST, soapHeaders); } Object[] result = null; try { result = client.invoke(operationName, DOM4JMarshaller.documentToSource(doc)); } catch (Exception ex) { LOG.fine("Generic consumer client.invoke throwed exception " + ex.getMessage() + " trace: " + Arrays.toString(ex.getStackTrace())); throw ex; } if (result != null) { org.dom4j.Document response = DOM4JMarshaller.sourceToDocument((Source) result[0]); if (enhancedResponse) { Map<String, Object> enhancedBody = new HashMap<String, Object>(); enhancedBody.put("payload", response); enhancedBody.put(CorrelationIDFeature.MESSAGE_CORRELATION_ID, client.getResponseContext().get(CorrelationIDFeature.MESSAGE_CORRELATION_ID)); return enhancedBody; } else { return response; } } return null; }
private Object sendDocument(org.dom4j.Document doc) throws Exception { Client client = getClient(); if (null != soapHeaders) { LOG.fine("Generic consumer sendDocument soapHeaders: " + Arrays.toString(soapHeaders.toArray())); client.getRequestContext().put(org.apache.cxf.headers.Header.HEADER_LIST, soapHeaders); } Object[] result = null; try { result = client.invoke(operationName, DOM4JMarshaller.documentToSource(doc)); } catch (Exception ex) { LOG.fine("Generic consumer client.invoke throwed exception " + ex.getMessage() + " trace: " + Arrays.toString(ex.getStackTrace())); throw ex; } if (result != null) { org.dom4j.Document response = DOM4JMarshaller.sourceToDocument((Source) result[0]); if (enhancedResponse) { Map<String, Object> enhancedBody = new HashMap<String, Object>(); enhancedBody.put("payload", response); enhancedBody.put(CorrelationIDFeature.MESSAGE_CORRELATION_ID, client.getResponseContext().get(CorrelationIDFeature.MESSAGE_CORRELATION_ID)); return enhancedBody; } else { return response; } } return null; }
private Map<String, List<String>> getResponseHeaders(final BookStoreService service) { final Client proxy = ClientProxy.getClient(service); return CastUtils.cast((Map<?, ?>)proxy.getResponseContext().get(Message.PROTOCOL_HEADERS)); }
Map<String, Object> respContext = client.getResponseContext(); Map<String, Scope> scopes = CastUtils.cast((Map<?, ?>)respContext.get(WrappedMessageContext.SCOPES)); if (scopes != null) {