Package org.apache.handlers.types

Examples of org.apache.handlers.types.ObjectFactory


        addHandlersProgrammatically(disp, sh, soapHandler);
     
        org.apache.handlers.types.AddNumbers req = new org.apache.handlers.types.AddNumbers();       
        req.setArg0(10);
        req.setArg1(20);       
        ObjectFactory factory = new ObjectFactory();       
        JAXBElement e = factory.createAddNumbers(req);       

        JAXBElement response = (JAXBElement)disp.invoke(e);
        assertNotNull(response);
        AddNumbersResponse value = (AddNumbersResponse)response.getValue();
        assertEquals(200, value.getReturn());
View Full Code Here


        addHandlersProgrammatically(disp, handler, soapHandler);

        org.apache.handlers.types.AddNumbers req = new org.apache.handlers.types.AddNumbers();
        req.setArg0(10);
        req.setArg1(20);
        ObjectFactory factory = new ObjectFactory();
        JAXBElement e = factory.createAddNumbers(req);

        JAXBElement response = (JAXBElement)disp.invoke(e);
        assertNotNull(response);
        AddNumbersResponse value = (AddNumbersResponse)response.getValue();
        assertEquals(222, value.getReturn());
View Full Code Here

                    assertEquals(10, req.getArg0());
                    assertEquals(20, req.getArg1());
                   
                    req.setArg0(11);
                    req.setArg1(21);
                    ObjectFactory of = new ObjectFactory();
                    of.createAddNumbers(req);
                    msg.setPayload(of.createAddNumbers(req), jaxbContext);
                   
                } else {
                    LogicalMessage msg = ctx.getMessage();
                    JAXBContext jaxbContext = JAXBContext.newInstance(ObjectFactory.class);
                    Object payload = ((JAXBElement)msg.getPayload(jaxbContext)).getValue();
                    org.apache.handlers.types.AddNumbersResponse res =
                        (org.apache.handlers.types.AddNumbersResponse)payload;

                    assertEquals(333, res.getReturn());
                   
                    res.setReturn(222);
                   
                    ObjectFactory of = new ObjectFactory();
                    msg.setPayload(of.createAddNumbersResponse(res), jaxbContext);                    
                   
                }
            } catch (Exception e) {
                e.printStackTrace();
                fail(e.toString());
View Full Code Here

        addHandlersProgrammatically(disp, sh, soapHandler);
     
        org.apache.handlers.types.AddNumbers req = new org.apache.handlers.types.AddNumbers();       
        req.setArg0(10);
        req.setArg1(20);       
        ObjectFactory factory = new ObjectFactory();       
        JAXBElement e = factory.createAddNumbers(req);       

        JAXBElement response = (JAXBElement)disp.invoke(e);
        assertNotNull(response);
        AddNumbersResponse value = (AddNumbersResponse)response.getValue();
        assertEquals(200, value.getReturn());
View Full Code Here

        addHandlersProgrammatically(disp, handler, soapHandler);

        org.apache.handlers.types.AddNumbers req = new org.apache.handlers.types.AddNumbers();
        req.setArg0(10);
        req.setArg1(20);
        ObjectFactory factory = new ObjectFactory();
        JAXBElement e = factory.createAddNumbers(req);

        JAXBElement response = (JAXBElement)disp.invoke(e);
        assertNotNull(response);
        AddNumbersResponse value = (AddNumbersResponse)response.getValue();
        assertEquals(222, value.getReturn());
View Full Code Here

                    assertEquals(10, req.getArg0());
                    assertEquals(20, req.getArg1());
                   
                    req.setArg0(11);
                    req.setArg1(21);
                    ObjectFactory of = new ObjectFactory();
                    of.createAddNumbers(req);
                    msg.setPayload(of.createAddNumbers(req), jaxbContext);
                   
                } else {
                    LogicalMessage msg = ctx.getMessage();
                    JAXBContext jaxbContext = JAXBContext.newInstance(ObjectFactory.class);
                    Object payload = ((JAXBElement)msg.getPayload(jaxbContext)).getValue();
                    org.apache.handlers.types.AddNumbersResponse res =
                        (org.apache.handlers.types.AddNumbersResponse)payload;

                    assertEquals(333, res.getReturn());
                   
                    res.setReturn(222);
                   
                    ObjectFactory of = new ObjectFactory();
                    msg.setPayload(of.createAddNumbersResponse(res), jaxbContext);                    
                   
                }
            } catch (Exception e) {
                e.printStackTrace();
                fail(e.toString());
View Full Code Here

        Message message = new MessageImpl();
        Exchange e = new ExchangeImpl();
        message.setExchange(e);
        LogicalMessageContextImpl lmci = new LogicalMessageContextImpl(message);

        JAXBElement<AddNumbers> el = new ObjectFactory().createAddNumbers(req);
       
        LogicalMessageImpl lmi = new LogicalMessageImpl(lmci);
        lmi.setPayload(el, ctx);
       
        Object obj = lmi.getPayload(ctx);
View Full Code Here

        addHandlersProgrammatically(disp, sh, soapHandler);
     
        org.apache.handlers.types.AddNumbers req = new org.apache.handlers.types.AddNumbers();       
        req.setArg0(10);
        req.setArg1(20);       
        ObjectFactory factory = new ObjectFactory();       
        JAXBElement<org.apache.handlers.types.AddNumbers> e = factory.createAddNumbers(req);       

        JAXBElement<?> response = (JAXBElement<?>)disp.invoke(e);
        assertNotNull(response);
        AddNumbersResponse value = (AddNumbersResponse)response.getValue();
        assertEquals(200, value.getReturn());
View Full Code Here

        addHandlersProgrammatically(disp, sh, soapHandler);
     
        org.apache.handlers.types.AddNumbers req = new org.apache.handlers.types.AddNumbers();       
        req.setArg0(10);
        req.setArg1(20);       
        ObjectFactory factory = new ObjectFactory();       
        JAXBElement<org.apache.handlers.types.AddNumbers> e = factory.createAddNumbers(req);       

        JAXBElement<?> response = (JAXBElement<?>)disp.invoke(e);
        assertNotNull(response);
        AddNumbersResponse value = (AddNumbersResponse)response.getValue();
        assertEquals(200, value.getReturn());
View Full Code Here

        addHandlersProgrammatically(disp, handler, soapHandler);

        org.apache.handlers.types.AddNumbers req = new org.apache.handlers.types.AddNumbers();
        req.setArg0(10);
        req.setArg1(20);
        ObjectFactory factory = new ObjectFactory();
        JAXBElement<AddNumbers> e = factory.createAddNumbers(req);

        JAXBElement<?> response = (JAXBElement<?>)disp.invoke(e);
        assertNotNull(response);
        AddNumbersResponse value = (AddNumbersResponse)response.getValue();
        assertEquals(222, value.getReturn());
View Full Code Here

TOP

Related Classes of org.apache.handlers.types.ObjectFactory

Copyright © 2018 www.massapicom. 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.