Package org.apache.cxf.jaxws

Examples of org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create()


        sf.getServiceFactory().setWrapped(false);

        // Use the HTTP Binding which understands the Java Rest Annotations
        sf.getClientFactoryBean().setBindingId(HttpBindingFactory.HTTP_BINDING_ID);
        sf.setAddress("http://localhost:9080/xml/");
        BookService bs = (BookService)sf.create();
        GetAnotherBook getAnotherBook = new GetAnotherBook();
        getAnotherBook.setId(123);
        Book book = bs.getAnotherBook(getAnotherBook);
        assertEquals(book.getId(), (long)123);
        assertEquals(book.getName(), "CXF in Action");
View Full Code Here


        sf.getServiceFactory().setWrapped(true);

        // Use the HTTP Binding which understands the Java Rest Annotations
        sf.getClientFactoryBean().setBindingId(HttpBindingFactory.HTTP_BINDING_ID);
        sf.setAddress("http://localhost:9080/xmlwrapped/");
        BookServiceWrapped bs = (BookServiceWrapped)sf.create();
        Book book = bs.getBook(123);
        assertEquals(book.getId(), (long)123);
        assertEquals(book.getName(), "CXF in Action");
    }
   
View Full Code Here

        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
        factory.setTransportId(JMSSpecConstants.SOAP_JMS_SPECIFICATION_TRANSPORTID);
        factory.setServiceClass(Hello.class);
        factory.setAddress(address);
        Hello client = (Hello)factory.create();
        String reply = client.sayHi(" HI");
        assertEquals(reply, "get HI");
    }
   
    @Test
View Full Code Here

        String mexLoc = findMEXLocation(ref);
        if (mexLoc != null) {
            try {
                JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
                proxyFac.setAddress(mexLoc);
                MetadataExchange exc = proxyFac.create(MetadataExchange.class);
                Metadata metadata = exc.get2004();
                for (MetadataSection s : metadata.getMetadataSection()) {
                    if ("http://schemas.xmlsoap.org/wsdl/".equals(s.getDialect())) {
                        //got the wsdl...
                        Definition definition = bus.getExtension(WSDLManager.class)
View Full Code Here

        factory.setTransportId("http://cxf.apache.org/transports/jms");
        factory.setServiceName(new QName("http://cxf.apache.org/swa", "SwAService"));
        factory.setEndpointName(new QName("http://cxf.apache.org/swa", "SwAServiceHttpPort"));
        factory.setAddress(Server.ADDRESS);
        factory.getOutInterceptors().add(new LoggingOutInterceptor());
        SwAService port = factory.create(SwAService.class);
       
       
        Holder<String> textHolder = new Holder<String>();
        Holder<DataHandler> data = new Holder<DataHandler>();
       
View Full Code Here

        String mexLoc = findMEXLocation(ref, useEPRWSAAddrAsMEXLocation);
        if (mexLoc != null) {
            try {
                JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
                proxyFac.setAddress(mexLoc);
                MetadataExchange exc = proxyFac.create(MetadataExchange.class);
                Metadata metadata = exc.get2004();
                for (MetadataSection s : metadata.getMetadataSection()) {
                    if ("http://schemas.xmlsoap.org/wsdl/".equals(s.getDialect())) {
                        //got the wsdl...
                        Definition definition = bus.getExtension(WSDLManager.class)
View Full Code Here

    public void talkToJaxWsHolder() throws Exception {
        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
        factory.setServiceClass(Echo.class);
        factory.setDataBinding(new AegisDatabinding());
        factory.setAddress("local://JaxWsEcho");
        Echo client = (Echo) factory.create();
        Holder<String> sholder = new Holder<String>();
        client.echo("Channa Doll", sholder);
        assertEquals("Channa Doll", sholder.value);
    }
   
View Full Code Here

        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
        factory.setTransportId(JMSSpecConstants.SOAP_JMS_SPECIFICATION_TRANSPORTID);
        factory.setServiceClass(Hello.class);
        factory.setAddress(address);
        Hello client = (Hello)factory.create();
        String reply = client.sayHi(" HI");
        assertEquals(reply, "get HI");
    }
   
    @Test
View Full Code Here

        JMSConfigFeature jmsConfigFeature = new JMSConfigFeature();
        jmsConfigFeature.setJmsConfig(jmsConfig);
        factory.getFeatures().add(jmsConfigFeature);

        Greeter greeter = (Greeter)factory.create();
        doService(greeter, false);
    }   
    public void doService(Greeter greeter, boolean doEx) throws Exception {

        String response1 = new String("Hello ");
View Full Code Here

        beanKeyRegistrar.setDataBinding(dataBinding);
        beanKeyRegistrar.register();

        clientFactory.setDataBinding(dataBinding);

        clientFactory.create();
        String uri = dataBinding.getAegisContext().getTypeMapping().getMappingIdentifierURI();
        assertNotSame(DefaultTypeMapping.DEFAULT_MAPPING_URI, uri);
    }

}
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.