本文整理了Java中org.apache.cxf.endpoint.Client.getResponseContext()
方法的一些代码示例,展示了Client.getResponseContext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Client.getResponseContext()
方法的具体详情如下:
包路径:org.apache.cxf.endpoint.Client
类名称:Client
方法名:getResponseContext
[英]Gets the response context from the last invocation on this thread
[中]
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
public Map<String, Object> getResponseContext() {
return new WrappedMessageContext(client.getResponseContext(),
null,
Scope.APPLICATION);
}
public Binding getBinding() {
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
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);
}
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
Map<String, Object> respContext = client.getResponseContext();
Map<String, Scope> scopes = CastUtils.cast((Map<?, ?>)respContext.get(WrappedMessageContext.SCOPES));
if (scopes != null) {
代码示例来源:origin: apache/cxf
@Override
public Map<String, Object> getResponseContext() {
return Client.this.getResponseContext();
}
};
代码示例来源:origin: org.apache.cxf/cxf-core
@Override
public Map<String, Object> getResponseContext() {
return Client.this.getResponseContext();
}
};
代码示例来源:origin: apache/cxf
public Map<String, Object> getResponseContext() {
if (client == null) {
throw new IllegalStateException("The client has been closed.");
}
return client.getResponseContext();
}
代码示例来源:origin: org.apache.servicemix/servicemix-cxf-se
public void handleFault(Message message) {
client.getResponseContext().clear();
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-simple
public Map<String, Object> getResponseContext() {
if (client == null) {
throw new IllegalStateException("The client has been closed.");
}
return client.getResponseContext();
}
代码示例来源:origin: org.apache.servicemix/servicemix-cxf-se
public void handleMessage(Message message) throws Fault {
client.getResponseContext().clear();
}
代码示例来源:origin: apache/cxf
public Map<String, Object> getResponseContext() {
return new WrappedMessageContext(client.getResponseContext(),
null,
Scope.APPLICATION);
}
public Binding getBinding() {
代码示例来源:origin: org.mule.modules/mule-module-cxf
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();
}
代码示例来源:origin: apache/cxf
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);
}
代码示例来源:origin: Talend/tesb-rt-se
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;
}
代码示例来源:origin: org.talend.esb.job/org.talend.esb.job.controller
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;
}
代码示例来源:origin: apache/cxf
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));
}
代码示例来源:origin: apache/cxf
Map<String, Object> respContext = client.getResponseContext();
Map<String, Scope> scopes = CastUtils.cast((Map<?, ?>)respContext.get(WrappedMessageContext.SCOPES));
if (scopes != null) {
内容来源于网络,如有侵权,请联系作者删除!