Examples of UnmarshallingInHandler


Examples of org.jibx.ws.io.handler.UnmarshallingInHandler

     *
     * @param factory the JiBX binding factory to use for reading the inbound SOAP body
     * @throws WsBindingException if unmarshaller cannot be created due to an error with the JiBX bindings
     */
    public void addInFaultDetailsBindingFactory(IBindingFactory factory) throws WsBindingException {
        addInFaultDetailsHandler(new UnmarshallingInHandler(factory));
    }
View Full Code Here

Examples of org.jibx.ws.io.handler.UnmarshallingInHandler

    }

    private Welcome sayHello(Greetee s) throws WsException, IOException {
        SoapClient client = new SoapClient(m_location, m_fact);
        client.addOutHeader(new Locale("fr"));
        UnmarshallingInHandler headerHandler = new UnmarshallingInHandler(QOS.class);
        client.addInHeaderHandler(headerHandler);
        Welcome welcome = (Welcome) client.call(s);
        System.out.println("QOS: " + headerHandler.getPayload());
        return welcome;
    }
View Full Code Here

Examples of org.jibx.ws.io.handler.UnmarshallingInHandler

    /**
     * Tests that a SOAP fault without SOAP details is received correctly.
     * @throws Exception
     */
    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"));
View Full Code Here

Examples of org.jibx.ws.io.handler.UnmarshallingInHandler

     * @throws Throwable
     */
    public void testCallUnmarshalsSOAPHeader() throws Throwable {
        StubbedChannel.setInput(TestHeaderObjects.RESPONSE_SOAP);

        UnmarshallingInHandler headerReader = new UnmarshallingInHandler(Locale.class);
        m_soapClient.addInHeaderHandler(headerReader);
        Customer result = invokeCall();

        Object header = headerReader.getPayload();
        assertEquals("Header object", TestHeaderObjects.EN_US, header);

        assertEquals("Response Object:", TestObjects.RESPONSE_OBJECT, result);
    }
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.