Examples of SOAPService


Examples of org.objectweb.hello_world_soap_http.SOAPService

    public void testStreamSourceMESSAGE() throws Exception {

        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
        assertNotNull(wsdl);

        SOAPService service = new SOAPService(wsdl, serviceName);
        assertNotNull(service);

        InputStream is =  getClass().getResourceAsStream("resources/GreetMeDocLiteralReq.xml");
        StreamSource streamSourceReq = new StreamSource(is);
        assertNotNull(streamSourceReq);
       
        InputStream is1 =  getClass().getResourceAsStream("resources/GreetMeDocLiteralReq1.xml");
        StreamSource streamSourceReq1 = new StreamSource(is1);
        assertNotNull(streamSourceReq1);
       
        InputStream is2 =  getClass().getResourceAsStream("resources/GreetMeDocLiteralReq2.xml");
        StreamSource streamSourceReq2 = new StreamSource(is2);
        assertNotNull(streamSourceReq2);
       
        InputStream is3 =  getClass().getResourceAsStream("resources/GreetMeDocLiteralReq3.xml");
        StreamSource streamSourceReq3 = new StreamSource(is3);
        assertNotNull(streamSourceReq3);
       
       
   

        Dispatch<StreamSource> disp = service.createDispatch(portName,
                                                            StreamSource.class, Service.Mode.MESSAGE);
        StreamSource streamSourceResp = disp.invoke(streamSourceReq);
        assertNotNull(streamSourceResp);
        String expected = "Hello TestSOAPInputMessage";
        checkStreamSource(expected, streamSourceResp);
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.SOAPService

    public void testStreamSourcePAYLOAD() throws Exception {

        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
        assertNotNull(wsdl);

        SOAPService service = new SOAPService(wsdl, serviceName);
        assertNotNull(service);

        InputStream is =  getClass().getResourceAsStream("resources/GreetMeDocLiteralSOAPBodyReq.xml");
        StreamSource streamSourceReq = new StreamSource(is);
        assertNotNull(streamSourceReq);
       
        InputStream is1 =  getClass().getResourceAsStream("resources/GreetMeDocLiteralSOAPBodyReq1.xml");
        StreamSource streamSourceReq1 = new StreamSource(is1);
        assertNotNull(streamSourceReq1);
       
        InputStream is2 =  getClass().getResourceAsStream("resources/GreetMeDocLiteralSOAPBodyReq2.xml");
        StreamSource streamSourceReq2 = new StreamSource(is2);
        assertNotNull(streamSourceReq2);
       
        InputStream is3 =  getClass().getResourceAsStream("resources/GreetMeDocLiteralSOAPBodyReq3.xml");
        StreamSource streamSourceReq3 = new StreamSource(is3);
        assertNotNull(streamSourceReq3);

        Dispatch<StreamSource> disp = service.createDispatch(portName,
                                                            StreamSource.class, Service.Mode.PAYLOAD);
        StreamSource streamSourceResp = disp.invoke(streamSourceReq);
        assertNotNull(streamSourceResp);
        String expected = "Hello TestSOAPInputMessage";
        checkStreamSource(expected, streamSourceResp);
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.SOAPService

    public void testJAXBObjectPAYLOAD() throws Exception {

        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
        assertNotNull(wsdl);

        SOAPService service = new SOAPService(wsdl, serviceName);
        assertNotNull(service);
       
        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")
       
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.SOAPService

            System.exit(1);
        }
       
        try {
            File wsdl = new File(args[0]);
            SOAPService service = new SOAPService(wsdl.toURL(), SERVICE_NAME);
            Greeter port = service.getSoapPort();

            implicitPropagation(port);

            explicitPropagation(port);
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.SOAPService

            System.exit(1);
        }

        File wsdl = new File(args[0]);
       
        SOAPService ss = new SOAPService(wsdl.toURL(), SERVICE_NAME);
        Greeter port = ss.getSoapPort();
        String resp;

        System.out.println("Invoking sayHi...");
        resp = port.sayHi();
        System.out.println("Server responded with: " + resp);
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.SOAPService

        } else {
            wsdlURL = new URL(args[0]);
        }
       
        System.out.println(wsdlURL);
        SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME);
        Greeter port;
       
        if ((args[1] != null) && (args[1].equalsIgnoreCase("secure_user"))) {
            System.out.println("The secure_user credentials will be used for the invocation.");
            System.out.println();
            port = ss.getPort(SECURE_PORT_NAME, Greeter.class);
        } else if ((args[1] != null) && (args[1].equalsIgnoreCase("strict_secure_user"))) {
            String configurerProperty = "celtix.security.configurer"
                        + ".celtix.{http://objectweb.org/hello_world_soap_http}"
                        + "SOAPService/StrictSecurePort.http-client";
            String configurerClass = "demo.hw_https.common.DemoSecurityConfigurer";
            System.setProperty(configurerProperty, configurerClass);
            System.out.println("The strict_secure_user credentials will be used for the invocation.");
            System.out.println("Extra security data will be provided by the class, " + configurerClass
                               + " because the system property  " + configurerProperty
                               + " has been set.");
            System.out.println();
            port = ss.getPort(STRICT_SECURE_PORT_NAME, Greeter.class);
        } else {
            System.out.println("The insecure_user credentials will be used for the invocation.");
            System.out.println();
            port = ss.getPort(INSECURE_PORT_NAME, Greeter.class);
        }
       
        String resp;

        System.out.println("Invoking greetMe...");
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.SOAPService

            System.exit(1);
        }
       
        try {
            File wsdl = new File(args[0]);
            SOAPService service = new SOAPService(wsdl.toURL(), SERVICE_NAME);
            Greeter port = service.getSoapPort();

            // make a sequence of 8 invocations
            for (int i = 0; i < 4; i++) {
                System.out.println("Invoking sayHi...");
                String resp = port.sayHi();
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.SOAPService

        } else {
            wsdlURL = new URL(args[0]);
        }
       
        System.out.println(wsdlURL);
        SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME);
        Greeter port = ss.getSoapPort();
        String resp;

        System.out.println("Invoking sayHi...");
        resp = port.sayHi();
        System.out.println("Server responded with: " + resp);
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.SOAPService

    public void setUp() {
        try {
            super.setUp();
           
            wsdl = RegistrationTest.class.getResource("/wsdl/hello_world.wsdl");
            service = new SOAPService(wsdl, serviceName);
            greeter = service.getPort(portName, Greeter.class);
        } catch (Exception ex) {
            ex.printStackTrace();
            fail(ex.toString());
        }
View Full Code Here

Examples of org.objectweb.hello_world_soap_http.SOAPService

        } else {
            wsdlURL = new URL(args[0]);
        }
       
        System.out.println(wsdlURL);
        SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME);
        Greeter port = ss.getSoapPort();
        String resp;

        System.out.println("Invoking sayHi...");
        resp = port.sayHi();
        System.out.println("Server responded with: " + resp);
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.