Examples of SOAPService


Examples of org.apache.hello_world_doc_lit_bare.SOAPService

    @Test
    public void testBasicConnection() throws Exception {
        URL wsdl = getClass().getResource("/wsdl/doc_lit_bare.wsdl");
        assertNotNull("WSDL is null", wsdl);

        SOAPService service = new SOAPService(wsdl, serviceName);
        assertNotNull("Service is null", service);

        PutLastTradedPricePortType putLastTradedPrice = service.getPort(portName,
            PutLastTradedPricePortType.class);
        updateAddressPort(putLastTradedPrice, PORT);
               
        TradePriceData priceData = new TradePriceData();
        priceData.setTickerPrice(1.0f);
View Full Code Here

Examples of org.apache.hello_world_mixedstyle.SOAPService

    }
   
    @Test
    public void testVersionBasedRouting() throws Exception {

        SOAPService service = new SOAPService();
        assertNotNull(service);

        try {
            Greeter greeter = service.getPort(portName, Greeter.class);
            updateAddressPort(greeter, PORT);

            GreetMe1 request = new GreetMe1();
            request.setRequestType("Bonjour");
            GreetMeResponse greeting = greeter.greetMe(request);
View Full Code Here

Examples of org.apache.hello_world_soap12_http.SOAPService

    private Greeter getGreeter() throws NumberFormatException, MalformedURLException {
        URL wsdl = getClass().getResource("/wsdl/hello_world_soap12.wsdl");
        assertNotNull("WSDL is null", wsdl);

        SOAPService service = new SOAPService(wsdl, serviceName);
        assertNotNull("Service is ull ", service);
       
        Greeter g = service.getPort(portName, Greeter.class);
        updateAddressPort(g, PORT);
        return g;
    }
View Full Code Here

Examples of org.apache.hello_world_soap_http.SOAPService

        request = builder.toString();
       
        URL wsdl = AsyncHTTPConduitTest.class.getResource("/wsdl/hello_world_services.wsdl");
        assertNotNull("WSDL is null", wsdl);

        SOAPService service = new SOAPService();
        assertNotNull("Service is null", service);

        g = service.getSoapPort();
        assertNotNull("Port is null", g);
    }
View Full Code Here

Examples of org.apache.hello_world_soap_http.SOAPService

            new HugeResponseInterceptor(ResponseInterceptorType.overflow);
        getBus().getInInterceptors().add(hugeResponseInterceptor);
        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
        assertNotNull(wsdl);

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

        Dispatch<SOAPMessage> disp = service
            .createDispatch(PORT_NAME, SOAPMessage.class, Service.Mode.MESSAGE);
        disp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                     "http://localhost:"
                                     + greeterPort
                                     + "/SOAPDispatchService/SoapDispatchPort");
View Full Code Here

Examples of org.apache.hello_world_soap_http.SOAPService

            new HugeResponseInterceptor(ResponseInterceptorType.ElementLevelThreshold);
        getBus().getInInterceptors().add(hugeResponseInterceptor);
        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
        assertNotNull(wsdl);

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

        Dispatch<SOAPMessage> disp = service
            .createDispatch(PORT_NAME, SOAPMessage.class, Service.Mode.MESSAGE);
        disp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                     "http://localhost:"
                                     + greeterPort
                                     + "/SOAPDispatchService/SoapDispatchPort");
View Full Code Here

Examples of org.apache.hello_world_soap_http.SOAPService

            new HugeResponseInterceptor(ResponseInterceptorType.ElementCountThreshold);
        getBus().getInInterceptors().add(hugeResponseInterceptor);
        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
        assertNotNull(wsdl);

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

        Dispatch<SOAPMessage> disp = service
            .createDispatch(PORT_NAME, SOAPMessage.class, Service.Mode.MESSAGE);
        disp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                     "http://localhost:"
                                     + greeterPort
                                     + "/SOAPDispatchService/SoapDispatchPort");
View Full Code Here

Examples of org.apache.hello_world_soap_http.SOAPService

    @Test
    public void testAsyncPollingCall() throws Exception {
        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
        assertNotNull(wsdl);
       
        SOAPService service = new SOAPService(wsdl, serviceName);
       
        assertNotNull(service);
       
        Greeter greeter = service.getPort(portName, Greeter.class);
       
        assertNotNull(service);
        updateAddressPort(greeter, PORT);

        long before = System.currentTimeMillis();
View Full Code Here

Examples of org.apache.hello_world_soap_http.SOAPService

    @Test
    public void testAsyncSynchronousPolling() throws Exception {
        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
        assertNotNull(wsdl);
       
        SOAPService service = new SOAPService(wsdl, serviceName);
        assertNotNull(service);
       
        final String expectedString = new String("Hello, finally!");
         
        class Poller extends Thread {
            Response<GreetMeLaterResponse> response;
            int tid;
           
            Poller(Response<GreetMeLaterResponse> r, int t) {
                response = r;
                tid = t;
            }
            public void run() {
                if (tid % 2 > 0) {
                    while (!response.isDone()) {
                        try {
                            Thread.sleep(100);
                        } catch (InterruptedException ex) {
                            // ignore
                        }
                    }
                }
                GreetMeLaterResponse reply = null;
                try {
                    reply = response.get();
                } catch (Exception ex) {
                    fail("Poller " + tid + " failed with " + ex);
                }
                assertNotNull("Poller " + tid + ": no response received from service", reply);
                String s = reply.getResponseType();
                assertEquals(expectedString, s);  
            }
        }
       
        Greeter greeter = service.getPort(portName, Greeter.class);
        updateAddressPort(greeter, PORT);
        long before = System.currentTimeMillis();

       
        long delay = 3000;
View Full Code Here

Examples of org.apache.hello_world_soap_http.SOAPService

    @Test
    public void testAsyncCallUseProperAssignedExecutor() throws Exception {
        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
        assertNotNull(wsdl);
       
        SOAPService service = new SOAPService(wsdl, serviceName);
       
        class TestExecutor implements Executor {
           
            private AtomicInteger count = new AtomicInteger();
           
            public void execute(Runnable command) {
                int c = count.incrementAndGet();
                LOG.info("asyn call time " + c);
                command.run();
            }
           
            public int getCount() {
                return count.get();
            }
        }
        Executor executor = new TestExecutor();
        service.setExecutor(executor);
        assertNotNull(service);
        assertSame(executor, service.getExecutor());
       
       
        assertEquals(((TestExecutor)executor).getCount(), 0);
        Greeter greeter = service.getPort(portName, Greeter.class);
        updateAddressPort(greeter, PORT);
        List<Response<GreetMeResponse>> responses = new ArrayList<Response<GreetMeResponse>>();
        for (int i = 0; i < 5; i++) {
            responses.add(greeter.greetMeAsync("asyn call" + i));
        }
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.