Package org.jibx.ws.process

Examples of org.jibx.ws.process.Processor.receiveMessage()


     * @throws Exception
     */
    public void testReceiveFaultMessageWithoutErrorDetail() throws Exception {
        Processor processor = SoapProtocol.SOAP1_1.createProcessor(ExchangeContext.createInOnlyExchange(m_inCtx));
        StubbedChannel.setInput(TestObjects.SIMPLE_SOAP_FAULT);
        processor.receiveMessage(StubbedChannel.getInConnection());
        SoapFault expected = new SoapFault(SoapFault.FAULT_CODE_SERVER, TestObjects.FAULT_RESPONSE_FAULTSTRING, null);
        assertEquals(expected, m_inCtx.getBody());
    }

    /**
 
View Full Code Here


     * @throws Exception
     */
    public void testReceiveFaultMessageWithErrorDetailWithoutHandlers() throws Exception {
        Processor processor = SoapProtocol.SOAP1_1.createProcessor(ExchangeContext.createInOnlyExchange(m_inCtx));
        StubbedChannel.setInput(TestObjects.DETAILED_SOAP_FAULT);
        processor.receiveMessage(StubbedChannel.getInConnection());
        SoapFault expected = new SoapFault(SoapFault.FAULT_CODE_CLIENT, "Invalid message format", "http://example.org/someactor");
        assertEquals(expected, m_inCtx.getBody());
    }

    /**
 
View Full Code Here

     */
    public void testReceiveFaultMessageWithErrorDetailWithHandler() throws Exception {
        m_inCtx.addHandler(SoapPhase.BODY_FAULT, new UnmarshallingInHandler(ErrorMessage.class));
        Processor processor = SoapProtocol.SOAP1_1.createProcessor(ExchangeContext.createInOnlyExchange(m_inCtx));
        StubbedChannel.setInput(TestObjects.DETAILED_SOAP_FAULT);
        processor.receiveMessage(StubbedChannel.getInConnection());
        SoapFault expected = new SoapFault(SoapFault.FAULT_CODE_CLIENT, "Invalid message format", "http://example.org/someactor");
        expected.addDetail(new ErrorMessage("There were lots of elements in the message that I did not understand"));
        expected.addDetail(new ErrorType("Severe"));
       
        assertEquals(expected, m_inCtx.getBody());
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.