use of org.apache.cxf.binding.corba.CorbaMessage in project cxf by apache.
the class CorbaStreamInInterceptor method handleReply.
private void handleReply(Message msg) {
ORB orb;
ServiceInfo service;
CorbaDestination destination;
if (msg.getDestination() != null) {
destination = (CorbaDestination) msg.getDestination();
} else {
destination = (CorbaDestination) msg.getExchange().getDestination();
}
service = destination.getBindingInfo().getService();
CorbaMessage message = (CorbaMessage) msg;
if (message.getStreamableException() != null || message.getSystemException() != null) {
message.setContent(Exception.class, message.getExchange().getOutMessage().getContent(Exception.class));
Endpoint ep = message.getExchange().getEndpoint();
message.getInterceptorChain().abort();
if (ep.getInFaultObserver() != null) {
ep.getInFaultObserver().onMessage(message);
return;
}
}
CorbaMessage outMessage = (CorbaMessage) message.getExchange().getOutMessage();
orb = message.getExchange().get(ORB.class);
HandlerIterator paramIterator = new HandlerIterator(outMessage, false);
CorbaTypeEventProducer eventProducer = null;
Exchange exchange = message.getExchange();
BindingOperationInfo bindingOpInfo = exchange.getBindingOperationInfo();
BindingMessageInfo msgInfo = bindingOpInfo.getOutput();
boolean wrap = false;
if (bindingOpInfo.isUnwrappedCapable()) {
wrap = true;
}
if (wrap) {
// wrapper element around our args
// REVISIT, bravi, message name same as the element name
QName wrapperElementQName = msgInfo.getMessageInfo().getName();
eventProducer = new WrappedParameterSequenceEventProducer(wrapperElementQName, paramIterator, service, orb);
} else {
eventProducer = new ParameterEventProducer(paramIterator, service, orb);
}
CorbaStreamReader reader = new CorbaStreamReader(eventProducer);
message.setContent(XMLStreamReader.class, reader);
}
use of org.apache.cxf.binding.corba.CorbaMessage in project cxf by apache.
the class CorbaStreamOutEndingInterceptor method handleMessage.
public void handleMessage(Message msg) {
CorbaMessage message = (CorbaMessage) msg;
orb = (org.omg.CORBA.ORB) message.get(CorbaConstants.ORB);
Exchange exchange = message.getExchange();
BindingOperationInfo boi = exchange.getBindingOperationInfo();
service = exchange.getEndpoint().getEndpointInfo().getService();
typeMap = message.getCorbaTypeMap();
if (ContextUtils.isRequestor(message)) {
handleOutBoundMessage(message, boi);
} else {
handleInBoundMessage(message, boi);
}
}
Aggregations