Package org.apache.cxf.ws.addressing

Examples of org.apache.cxf.ws.addressing.WSAddressingFeature$WSAddressingFeatureApplier


        serviceFactory.setServiceClass(GreeterImpl.class);
       
        EndpointImpl endpoint = new EndpointImpl(getBus(), greeter,
                                                 new JaxWsServerFactoryBean(serviceFactory));

        endpoint.getFeatures().add(new WSAddressingFeature());
        try {
            String address = "http://localhost:8080/test";
            endpoint.publish(address);
        } catch (IllegalArgumentException ex) {
            assertTrue(ex.getCause() instanceof BusException);
View Full Code Here


        ep = new EndpointImpl(BusFactory.getThreadDefaultBus(),
                                           implementor,
                                           null,
                                           getWsdl());

        ep.getFeatures().add(new WSAddressingFeature());
        ep.publish(address);
        eps.add(ep);

        implementor = new AddNumberNonAnon();
        address = "http://localhost:" + PORT + "/jaxws/addNonAnon";
       
        ep = new EndpointImpl(BusFactory.getThreadDefaultBus(),
                                           implementor,
                                           null,
                                           getWsdl());

        ep.getFeatures().add(new WSAddressingFeature());
        ep.publish(address);
        eps.add(ep);

        implementor = new AddNumberOnlyAnon();
        address = "http://localhost:" + PORT + "/jaxws/addAnon";
       
        ep = new EndpointImpl(BusFactory.getThreadDefaultBus(),
                                           implementor,
                                           null,
                                           getWsdl());

        ep.getFeatures().add(new WSAddressingFeature());
        ep.publish(address);
        eps.add(ep);
    }
View Full Code Here

        return sb;
    }

    protected void setupUDP(InterceptorProvider p, EndpointInfo ei) {
        //soap UDP requires ws-addressing turned on
        WSAddressingFeature add = new WSAddressingFeature();
        add.setAddressingRequired(true);
        add.initialize(p, bus);
       
        // UDP has a strict size limit on messages (<64K) so we'll try to shrink the
        // message a little by putting the WSA namespace into the
        // the soap:env which allows it to not be written on every header
        // element as well as disable the output stream optimizations (doesn't really
View Full Code Here

        ByteArrayOutputStream output = setupOutLogging();

        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
        factory.setServiceClass(AddNumbersPortType.class);
        factory.setAddress("http://localhost:9091/jaxws/add");
        factory.getFeatures().add(new WSAddressingFeature());
        AddNumbersPortType port = (AddNumbersPortType) factory.create();

        assertEquals(3, port.addNumbers(1, 2));

        String expectedOut = "<Address>http://www.w3.org/2005/08/addressing/anonymous</Address>";
View Full Code Here

        EndpointImpl ep = new EndpointImpl(BusFactory.getThreadDefaultBus(),
                                           implementor,
                                           null,
                                           getWsdl());

        ep.getFeatures().add(new WSAddressingFeature());
        ep.publish(address);
    }
View Full Code Here

            }
        }

       
        if (hasUsingAddressing(bindingExtensors) || hasUsingAddressing(portExtensors)) {
            WSAddressingFeature feature = new WSAddressingFeature();
            if (addressingRequired(bindingExtensors)
                || addressingRequired(portExtensors)) {
                feature.setAddressingRequired(true);
            }
            addAddressingFeature(feature);
        }
        extractWsdlEprs(endpoint);
    }
View Full Code Here

        AddressingFeature addressing = getAddressingFeature();
        if (addressing == null) {
            return;
        }
        if (addressing.isEnabled()) {
            WSAddressingFeature feature = getWSAddressingFeature();
            if (feature == null) {
                feature = new WSAddressingFeature();
                addAddressingFeature(feature);
            }
            feature.setAddressingRequired(addressing.isRequired());
            if (ProviderImpl.isJaxWs22()) {
                try {
                    Class<?> addrClass = ClassLoaderUtils.loadClass("javax.xml.ws.soap.AddressingFeature",
                                                                    ProviderImpl.class);
                    Method responsesMethod = addrClass.getMethod("getResponses", new Class[] {});
                    Object responses = responsesMethod.invoke(addressing, new Object[] {});
                    feature.setResponses(responses.toString());
                } catch (Exception e) {
                    // ignore
                }
            }
        } else {
View Full Code Here

        return sb;
    }

    protected void setupUDP(InterceptorProvider p, EndpointInfo ei) {
        //soap UDP requires ws-addressing turned on
        WSAddressingFeature add = new WSAddressingFeature();
        add.setAddressingRequired(true);
        add.initialize(p, bus);
       
        // UDP has a strict size limit on messages (<64K) so we'll try to shrink the
        // message a little by putting the WSA namespace into the
        // the soap:env which allows it to not be written on every header
        // element as well as disable the output stream optimizations (doesn't really
View Full Code Here

public class WSAFeatureTest extends AbstractCXFTest {
    static final String PORT = TestUtil.getPortNumber(WSAFeatureTest.class);
    @Test
    public void testServerFactory() {
        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
        sf.getFeatures().add(new WSAddressingFeature());
        sf.setServiceBean(new GreeterImpl());
        sf.setAddress("http://localhost:" + PORT + "/test");
        sf.setStart(false);
        sf.setBus(getBus());
       
View Full Code Here

   
    @Test
    public void testClientProxyFactory() {
        JaxWsProxyFactoryBean cf = new JaxWsProxyFactoryBean();
        cf.setAddress("http://localhost:" + PORT + "/test");
        cf.getFeatures().add(new WSAddressingFeature());
        cf.setServiceClass(Greeter.class);
        Greeter greeter = (Greeter) cf.create();
        Client client = ClientProxy.getClient(greeter);
        checkAddressInterceptors(client.getInInterceptors());
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.ws.addressing.WSAddressingFeature$WSAddressingFeatureApplier

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.