Package org.objectweb.hello_world_soap_http.types

Examples of org.objectweb.hello_world_soap_http.types.GreetMe


       
        JAXBContext jc = JAXBContext.newInstance("org.objectweb.hello_world_soap_http.types")
        Dispatch<Object> disp = service.createDispatch(portName, jc, Service.Mode.PAYLOAD);
       
        String expected = "Hello Jeeves";  
        GreetMe greetMe = new GreetMe();
        greetMe.setRequestType("Jeeves")
       
        Object response = disp.invoke(greetMe);
        assertNotNull(response);
        String responseValue = ((GreetMeResponse)response).getResponseType();   
        assertTrue("Expected string, " + expected , expected.equals(responseValue));
View Full Code Here


            fail("Should have thrown a ProtocolException");
        } catch (ProtocolException ex) {
            //expected - not a valid object
        }

        GreetMe obj = new GreetMe();
        obj.setRequestType("Hello");
        QName elName = new QName(wrapperAnnotation.targetNamespace(),
                                 wrapperAnnotation.localName());
        JAXBEncoderDecoder.marshall(context, null, obj, elName, elNode);
        node = elNode.getLastChild();
        //The XML Tree Looks like
View Full Code Here

        ctx.put(ObjectMessageContext.MESSAGE_INPUT, false);
        ctx.put(MessageContext.MESSAGE_OUTBOUND_PROPERTY, true);

        final String testArg = "test argument set";
        GreetMe wrapper = new GreetMe();
        wrapper.setRequestType(testArg);
        lm.setPayload(wrapper, jaxbCtx);
       
        GreetMe payload = (GreetMe)lm.getPayload(jaxbCtx);
        assertEquals(wrapper.getRequestType(), payload.getRequestType());
       
        Object[] args = ctx.getMessageObjects();

        assertNotNull(args);
        assertEquals(1, args.length);
View Full Code Here

       
        JAXBContext jc = JAXBContext.newInstance("org.objectweb.hello_world_soap_http.types")
        TestDynamicDataBindingCallback callback = 
            new TestDynamicDataBindingCallback(jc, Mode.PAYLOAD);       
        TestSOAPBodyDataWriter<SOAPBody> soapBodyDataWriter = new TestSOAPBodyDataWriter<SOAPBody>(callback);
        GreetMe greetMe = new GreetMe();
        greetMe.setRequestType("DIPLO");
        soapBodyDataWriter.write(greetMe, soapMsg.getSOAPBody());
        SOAPBody soapBody = soapBodyDataWriter.getTestSOAPBody();
        assertTrue("TextContent should be DIPLO",
                   "DIPLO".equals(soapBody.getFirstChild().getTextContent()));
     
View Full Code Here

TOP

Related Classes of org.objectweb.hello_world_soap_http.types.GreetMe

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.