Package org.apache.cxf.transport

Examples of org.apache.cxf.transport.MessageObserver.onMessage()


                            .getContent(XMLStreamReader.class));                       
                       
                        message.getExchange().setInMessage(responseMsg);
                        responseMsg.put(PhaseInterceptorChain.STARTING_AT_INTERCEPTOR_ID,
                                        LogicalHandlerInInterceptor.class.getName());
                        observer.onMessage(responseMsg);
                    }
                } else {
                    // server side - abort
                    //System.out.println("Logical handler server side aborting");
                }
View Full Code Here


                        XMLStreamReader xmlReader = createXMLStreamReaderFromSOAPMessage(soapMessage);
                        responseMsg.setContent(XMLStreamReader.class, xmlReader);
                    }
                    responseMsg.put(PhaseInterceptorChain.STARTING_AT_INTERCEPTOR_ID,
                                    SOAPHandlerInterceptor.class.getName());
                    observer.onMessage(responseMsg);
                }

                //We dont call onCompletion here, as onCompletion will be called by inbound
                //LogicalHandlerInterceptor
            } else {
View Full Code Here

        outMessage.setInterceptorChain(chain);
        chain.abort();
        EasyMock.expectLastCall();
        MessageObserver observer = control1.createMock(MessageObserver.class);
        expect(exchange1.get(MessageObserver.class)).andReturn(observer).anyTimes();
        observer.onMessage(isA(Message.class));
        EasyMock.expectLastCall();

        control1.replay();

        LogicalHandlerInInterceptor<Message> li = new LogicalHandlerInInterceptor<Message>(binding1);
View Full Code Here

                if (message.getContent(Exception.class) != null) {
                    // return the fault over the response fault channel
                    MessageObserver faultObserver = chain.getFaultObserver();
                    if (faultObserver != null) {
                        message.getExchange().setOneWay(false);
                        faultObserver.onMessage(message);
                    }
                    return;
                }
            }
           
View Full Code Here

                        .getContent(XMLStreamReader.class));                       
                   
                    message.getExchange().setInMessage(responseMsg);
                    responseMsg.put(PhaseInterceptorChain.STARTING_AT_INTERCEPTOR_ID,
                                    LogicalHandlerInInterceptor.class.getName());
                    observer.onMessage(responseMsg);
                }
            } else {
                // server side - abort
                //System.out.println("Logical handler server side aborting");
            }
View Full Code Here

                        XMLStreamReader xmlReader = createXMLStreamReaderFromSOAPMessage(soapMessage);
                        responseMsg.setContent(XMLStreamReader.class, xmlReader);
                    }
                    responseMsg.put(PhaseInterceptorChain.STARTING_AT_INTERCEPTOR_ID,
                                    SOAPHandlerInterceptor.class.getName());
                    observer.onMessage(responseMsg);
                }
               
                //We dont call onCompletion here, as onCompletion will be called by inbound
                //LogicalHandlerInterceptor
            } else {
View Full Code Here

                        ((PhaseInterceptorChain)outMessage.getInterceptorChain()).unwind(outMessage);
                        MessageObserver mo = outMessage.getInterceptorChain().getFaultObserver();
                        if (mo == null) {
                            mo = outMessage.getExchange().get(MessageObserver.class);
                        }
                        mo.onMessage(outMessage);
                    }
                }
            };
            HTTPClientPolicy policy = getClient(outMessage);
            boolean exceptionSet = outMessage.getContent(Exception.class) != null;
View Full Code Here

        outMessage.setInterceptorChain(chain);
        chain.abort();
        EasyMock.expectLastCall();
        MessageObserver observer = control1.createMock(MessageObserver.class);
        expect(exchange1.get(MessageObserver.class)).andReturn(observer).anyTimes();
        observer.onMessage(isA(Message.class));
        EasyMock.expectLastCall();

        control1.replay();

        LogicalHandlerInInterceptor<Message> li = new LogicalHandlerInInterceptor<Message>(binding1);
View Full Code Here

                        inMessage.getInterceptorChain().resume();
                        MessageObserver faultObserver = inMessage.getInterceptorChain().getFaultObserver();
                        if (null != inMessage.getContent(Exception.class) && null != faultObserver) {
                            // return the fault over the response fault channel
                            inMessage.getExchange().setOneWay(false);
                            faultObserver.onMessage(inMessage);
                            return;
                        }
                        // restore the BOI for the partial response handling
                        exchange.put(BindingOperationInfo.class, boi);
                    }
View Full Code Here

                if (message.getContent(Exception.class) != null) {
                    // return the fault over the response fault channel
                    MessageObserver faultObserver = chain.getFaultObserver();
                    if (faultObserver != null) {
                        message.getExchange().setOneWay(false);
                        faultObserver.onMessage(message);
                    }
                    return;
                }
            }
           
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.