Package org.apache.cxf.jaxws

Examples of org.apache.cxf.jaxws.ServiceImpl


        JAXBElement<String> param =
             new JAXBElement<String>(CUSTOMER_NAME, String.class, CUSTOMER_KEY);
        params.getAny().add(param);
        target.setReferenceParameters(params);
        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
        ServiceImpl serviceImpl =
            ServiceDelegateAccessor.get(new SOAPService(wsdl, SERVICE_NAME));
        greeter = serviceImpl.getPort(target, Greeter.class);

        mapVerifier.verificationCache = this;
        headerVerifier.verificationCache = this;
    }
View Full Code Here


        EndpointReferenceType numberTwoRef = factory.create("20");
        assertNotNull("reference", numberTwoRef);
       
        // use getPort with epr api on service
        NumberService numService = new NumberService();
        ServiceImpl serviceImpl = ServiceDelegateAccessor.get(numService);
       
        Number num =  (Number)serviceImpl.getPort(numberTwoRef, Number.class);
        assertTrue("20 is even", num.isEven().isEven());
       
        EndpointReferenceType numberTwentyThreeRef = factory.create("23");
        num =  (Number)serviceImpl.getPort(numberTwentyThreeRef, Number.class);
        assertTrue("23 is not even", !num.isEven().isEven());
    }
View Full Code Here

       
        NumberFactoryService service = new NumberFactoryService();
        NumberFactory factory = service.getNumberFactoryPort();
       
        NumberService numService = new NumberService();
        ServiceImpl serviceImpl = ServiceDelegateAccessor.get(numService);
       
        EndpointReferenceType numberTwoRef = factory.create("20");
        assertNotNull("reference", numberTwoRef);
          
        Number num =  (Number)serviceImpl.getPort(numberTwoRef, Number.class);
        assertTrue("20 is even", num.isEven().isEven());
       
        EndpointReferenceType numberTwentyThreeRef = factory.create("23");
        num =  (Number)serviceImpl.getPort(numberTwentyThreeRef, Number.class);
        assertTrue("23 is not even", !num.isEven().isEven());
    }
View Full Code Here

       
        NumberFactoryService service = new NumberFactoryService();
        NumberFactory factory = service.getNumberFactoryPort();
       
        NumberService numService = new NumberService();
        ServiceImpl serviceImpl = ServiceDelegateAccessor.get(numService);
       
        EndpointReferenceType numberTwoRef = factory.create("20");
        assertNotNull("reference", numberTwoRef);
          
        Number num =  (Number)serviceImpl.getPort(numberTwoRef, Number.class);
        assertTrue("20 is even", num.isEven().isEven());
       
        EndpointReferenceType numberTwentyThreeRef = factory.create("23");
        num =  (Number)serviceImpl.getPort(numberTwentyThreeRef, Number.class);
        assertTrue("23 is not even", !num.isEven().isEven());
    }
View Full Code Here

        // use values >= 30 to create JMS eprs - see NumberFactoryImpl.create
       
        // verify it is JMS, 999 for JMS will throw a fault
        EndpointReferenceType ref = factory.create("999");
        assertNotNull("reference", ref);
        ServiceImpl serviceImpl = ServiceDelegateAccessor.get(numService);   
        Number num =  (Number)serviceImpl.getPort(ref, Number.class);
        try {
            num.isEven().isEven();
            fail("there should be a fault on val 999");
        } catch (Exception expected) {
            assertTrue("match on exception message", expected.getMessage().indexOf("999") != -1);
        }
       
        ref = factory.create("37");
        assertNotNull("reference", ref);
        num =  (Number)serviceImpl.getPort(ref, Number.class);
        assertTrue("37 is not even", !num.isEven().isEven());
    }
View Full Code Here

    @Override
    public ServiceDelegate createServiceDelegate(URL url,
                                                 QName qname,
                                                 Class cls) {
        Bus bus = BusFactoryHelper.newInstance().getDefaultBus();
        return new ServiceImpl(bus, url, qname, cls);
    }
View Full Code Here

        JAXBElement<String> param =
             new JAXBElement<String>(CUSTOMER_NAME, String.class, CUSTOMER_KEY);
        params.getAny().add(param);
        target.setReferenceParameters(params);
        URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
        ServiceImpl serviceImpl =
            ServiceDelegateAccessor.get(new SOAPService(wsdl, SERVICE_NAME));
        greeter = serviceImpl.getPort(target, Greeter.class);

        mapVerifier.verificationCache = this;
        headerVerifier.verificationCache = this;
    }
View Full Code Here

            e.printStackTrace();
        }
       
        String address = "http://" + hostName + ":9999/GreeterBean";

        ServiceImpl ss = new ServiceImpl(bus, null, serviceQName, null);
        ss.addPort(portQName, bindingId, address);
        //Hello port = ss.createPort(portQName, Hello.class);
        org.apache.hello_world_soap_http.Greeter port = ss.getPort(portQName,
            org.apache.hello_world_soap_http.Greeter.class);
        String response = port.greetMe(" CXF");
        System.out.println(" server return: " + response);
    }
View Full Code Here

            e.printStackTrace();
        }
       
        String address = "http://" + hostName + ":9999/GreeterBean";

        ServiceImpl ss = new ServiceImpl(bus, null, serviceQName, null);
        ss.addPort(portQName, bindingId, address);
        org.apache.hello_world_soap_http.Greeter port = ss.getPort(portQName,
            org.apache.hello_world_soap_http.Greeter.class);
        String response = port.greetMe(" CXF");
        System.out.println(" server return: " + response);
    }
View Full Code Here

    private static JAXBContext jaxbContext;
   
    @Override
    public ServiceDelegate createServiceDelegate(URL url, QName qname, Class cls) {
        Bus bus = BusFactory.getThreadDefaultBus();
        return new ServiceImpl(bus, url, qname, cls);
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.jaxws.ServiceImpl

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.