本文整理了Java中org.apache.cxf.binding.Binding.createMessage()
方法的一些代码示例,展示了Binding.createMessage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binding.createMessage()
方法的具体详情如下:
包路径:org.apache.cxf.binding.Binding
类名称:Binding
方法名:createMessage
[英]Create a Message for this Binding.
[中]为此绑定创建消息。
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
private Message createResponseMessage(Exchange exchange) {
if (exchange == null) {
return null;
}
Message m = exchange.getOutMessage();
if (m == null && !exchange.isOneWay()) {
Endpoint ep = exchange.getEndpoint();
m = new MessageImpl();
m.setExchange(exchange);
m = ep.getBinding().createMessage(m);
exchange.setOutMessage(m);
}
return m;
}
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
m = new org.apache.cxf.message.MessageImpl();
m.setExchange(exchange);
m = ep.getBinding().createMessage(m);
exchange.setInMessage(m);
m = new org.apache.cxf.message.MessageImpl();
m.setExchange(exchange);
m = ep.getBinding().createMessage(m);
exchange.setOutMessage(m);
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
private void handleAbort(Message message, W3CDOMStreamWriter writer) {
message.getInterceptorChain().abort();
if (!message.getExchange().isOneWay()) {
//server side inbound
Endpoint e = message.getExchange().getEndpoint();
Message responseMsg = new MessageImpl();
responseMsg.setExchange(message.getExchange());
responseMsg = e.getBinding().createMessage(responseMsg);
message.getExchange().setOutMessage(responseMsg);
XMLStreamReader reader = message.getContent(XMLStreamReader.class);
if (reader == null && writer != null) {
reader = StaxUtils.createXMLStreamReader(writer.getDocument());
}
InterceptorChain chain = OutgoingChainInterceptor
.getOutInterceptorChain(message.getExchange());
responseMsg.setInterceptorChain(chain);
responseMsg.put("LogicalHandlerInterceptor.INREADER", reader);
chain.doIntercept(responseMsg);
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
Message responseMsg = new MessageImpl();
responseMsg.setExchange(message.getExchange());
responseMsg = e.getBinding().createMessage(responseMsg);
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
Message responseMsg = new MessageImpl();
responseMsg.setExchange(message.getExchange());
responseMsg = e.getBinding().createMessage(responseMsg);
Message responseMsg = new MessageImpl();
responseMsg.setExchange(message.getExchange());
responseMsg = e.getBinding().createMessage(responseMsg);
message.getExchange().setOutMessage(responseMsg);
SOAPMessage soapMessage = ((SOAPMessageContext)context).getMessage();
代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws
faultMessage = new MessageImpl();
faultMessage.setExchange(message.getExchange());
faultMessage = exchange.getEndpoint().getBinding().createMessage(faultMessage);
代码示例来源:origin: apache/cxf
private static Message createMessage(Exchange exchange) {
Endpoint ep = exchange.getEndpoint();
Message msg = null;
if (ep != null) {
msg = new MessageImpl();
msg.setExchange(exchange);
msg = ep.getBinding().createMessage(msg);
}
return msg;
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
private static Message createMessage(Exchange exchange) {
Endpoint ep = exchange.get(Endpoint.class);
Message msg = null;
if (ep != null) {
msg = new MessageImpl();
msg.setExchange(exchange);
msg = ep.getBinding().createMessage(msg);
}
return msg;
}
代码示例来源:origin: apache/cxf
private static Message createMessage(Exchange exchange) {
Endpoint ep = exchange.getEndpoint();
Message msg = null;
if (ep != null) {
msg = new MessageImpl();
msg.setExchange(exchange);
msg = ep.getBinding().createMessage(msg);
}
return msg;
}
}
代码示例来源:origin: org.apache.cxf/cxf-core
private static Message createMessage(Exchange exchange) {
Endpoint ep = exchange.getEndpoint();
Message msg = null;
if (ep != null) {
msg = new MessageImpl();
msg.setExchange(exchange);
msg = ep.getBinding().createMessage(msg);
}
return msg;
}
代码示例来源:origin: org.apache.cxf/cxf-api
private static Message createMessage(Exchange exchange) {
Endpoint ep = exchange.get(Endpoint.class);
Message msg = null;
if (ep != null) {
msg = new MessageImpl();
msg.setExchange(exchange);
msg = ep.getBinding().createMessage(msg);
}
return msg;
}
代码示例来源:origin: geoserver/geofence
private Message getOutMessage(Message inMessage) {
Exchange exchange = inMessage.getExchange();
Message outMessage = exchange.getOutMessage();
if (outMessage == null) {
Endpoint endpoint = exchange.get(Endpoint.class);
outMessage = endpoint.getBinding().createMessage();
exchange.setOutMessage(outMessage);
}
outMessage.putAll(inMessage);
return outMessage;
}
代码示例来源:origin: roskart/dropwizard-jaxws
private Message getOutMessage(Message inMessage) {
Exchange exchange = inMessage.getExchange();
Message outMessage = exchange.getOutMessage();
if (outMessage == null) {
Endpoint endpoint = exchange.get(Endpoint.class);
outMessage = endpoint.getBinding().createMessage();
exchange.setOutMessage(outMessage);
}
outMessage.putAll(inMessage);
return outMessage;
}
代码示例来源:origin: apache/cxf
private Message createResponseMessage(Exchange exchange) {
if (exchange == null) {
return null;
}
Message m = exchange.getOutMessage();
if (m == null && !exchange.isOneWay()) {
Endpoint ep = exchange.getEndpoint();
m = new MessageImpl();
m.setExchange(exchange);
m = ep.getBinding().createMessage(m);
exchange.setOutMessage(m);
}
return m;
}
代码示例来源:origin: apache/cxf
private Message createOutMessage(Message inMessage, Response r) {
Endpoint e = inMessage.getExchange().getEndpoint();
Message mout = e.getBinding().createMessage();
mout.setContent(List.class, new MessageContentsList(r));
mout.setExchange(inMessage.getExchange());
mout.setInterceptorChain(
OutgoingChainInterceptor.getOutInterceptorChain(inMessage.getExchange()));
inMessage.getExchange().setOutMessage(mout);
if (r.getStatus() >= Response.Status.BAD_REQUEST.getStatusCode()) {
inMessage.getExchange().put("cxf.io.cacheinput", Boolean.FALSE);
}
return mout;
}
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
private Message createOutMessage(Message inMessage, Response r) {
Endpoint e = inMessage.getExchange().get(Endpoint.class);
Message mout = new MessageImpl();
mout.setContent(List.class, new MessageContentsList(r));
mout.setExchange(inMessage.getExchange());
mout = e.getBinding().createMessage(mout);
mout.setInterceptorChain(
OutgoingChainInterceptor.getOutInterceptorChain(inMessage.getExchange()));
inMessage.getExchange().setOutMessage(mout);
if (r.getStatus() >= Response.Status.BAD_REQUEST.getStatusCode()) {
inMessage.getExchange().put("cxf.io.cacheinput", Boolean.FALSE);
}
return mout;
}
}
代码示例来源:origin: apache/cxf
private Message getOutMessage() {
Message message = m.getExchange().getOutMessage();
if (message == null) {
Endpoint ep = m.getExchange().getEndpoint();
message = new org.apache.cxf.message.MessageImpl();
message.setExchange(m.getExchange());
message = ep.getBinding().createMessage(message);
m.getExchange().setOutMessage(message);
}
return message;
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
private Message getOutMessage() {
Message message = m.getExchange().getOutMessage();
if (message == null) {
Endpoint ep = m.getExchange().get(Endpoint.class);
message = new org.apache.cxf.message.MessageImpl();
message.setExchange(m.getExchange());
message = ep.getBinding().createMessage(message);
m.getExchange().setOutMessage(message);
}
return message;
}
代码示例来源:origin: org.apache.cxf/cxf-rt-features-throttling
private Message createOutMessage(Message inMessage) {
Endpoint e = inMessage.getExchange().getEndpoint();
Message mout = e.getBinding().createMessage();
mout.setExchange(inMessage.getExchange());
mout.setInterceptorChain(
OutgoingChainInterceptor.getOutInterceptorChain(inMessage.getExchange()));
inMessage.getExchange().setOutMessage(mout);
inMessage.getExchange().put("cxf.io.cacheinput", Boolean.FALSE);
return mout;
}
}
代码示例来源:origin: apache/cxf
private Message createOutMessage(Message inMessage) {
Endpoint e = inMessage.getExchange().getEndpoint();
Message mout = e.getBinding().createMessage();
mout.setExchange(inMessage.getExchange());
mout.setInterceptorChain(
OutgoingChainInterceptor.getOutInterceptorChain(inMessage.getExchange()));
inMessage.getExchange().setOutMessage(mout);
inMessage.getExchange().put("cxf.io.cacheinput", Boolean.FALSE);
return mout;
}
}
内容来源于网络,如有侵权,请联系作者删除!