本文整理了Java中org.apache.cxf.jaxrs.client.WebClient.setResponseBuilder()
方法的一些代码示例,展示了WebClient.setResponseBuilder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebClient.setResponseBuilder()
方法的具体详情如下:
包路径:org.apache.cxf.jaxrs.client.WebClient
类名称:WebClient
方法名:setResponseBuilder
暂无
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
protected Response handleResponse(Message outMessage, Class<?> responseClass, Type genericType) {
try {
ResponseBuilder rb = setResponseBuilder(outMessage, outMessage.getExchange());
Response currentResponse = rb.clone().build();
代码示例来源:origin: apache/cxf
protected Response handleResponse(Message outMessage, Class<?> responseClass, Type genericType) {
try {
ResponseBuilder rb = setResponseBuilder(outMessage, outMessage.getExchange());
Response currentResponse = rb.clone().build();
((ResponseImpl)currentResponse).setOutMessage(outMessage);
Object entity = readBody(currentResponse, outMessage, responseClass, genericType,
new Annotation[]{});
if (entity == null) {
int status = currentResponse.getStatus();
if (status >= 400) {
entity = currentResponse.getEntity();
}
}
rb = JAXRSUtils.fromResponse(currentResponse, false);
rb.entity(entity instanceof Response
? ((Response)entity).getEntity() : entity);
Response r = rb.build();
getState().setResponse(r);
((ResponseImpl)r).setOutMessage(outMessage);
return r;
} catch (Throwable ex) {
throw (ex instanceof ProcessingException) ? (ProcessingException)ex
: new ProcessingException(ex);
} finally {
ClientProviderFactory.getInstance(outMessage).clearThreadLocalProxies();
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-rs-client
protected Response handleResponse(Message outMessage, Class<?> responseClass, Type genericType) {
try {
ResponseBuilder rb = setResponseBuilder(outMessage, outMessage.getExchange());
Response currentResponse = rb.clone().build();
((ResponseImpl)currentResponse).setOutMessage(outMessage);
Object entity = readBody(currentResponse, outMessage, responseClass, genericType,
new Annotation[]{});
if (entity == null) {
int status = currentResponse.getStatus();
if (status >= 400) {
entity = currentResponse.getEntity();
}
}
rb = JAXRSUtils.fromResponse(currentResponse, false);
rb.entity(entity instanceof Response
? ((Response)entity).getEntity() : entity);
Response r = rb.build();
getState().setResponse(r);
((ResponseImpl)r).setOutMessage(outMessage);
return r;
} catch (Throwable ex) {
throw (ex instanceof ProcessingException) ? (ProcessingException)ex
: new ProcessingException(ex);
} finally {
ClientProviderFactory.getInstance(outMessage).clearThreadLocalProxies();
}
}
内容来源于网络,如有侵权,请联系作者删除!