Examples of WSAddressingFeature


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

        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

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

            = endpoint.getBinding().getExtensors(ExtensibilityElement.class);
        List<ExtensibilityElement> portExtensors
            = endpoint.getExtensors(ExtensibilityElement.class);
        checkRespectBindingFeature(bindingExtensors);
        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

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

        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

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

        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

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

        Object implementor = new AddNumberImpl();
        String address = "http://localhost:" + PORT + "/jaxws/add";
        //Endpoint.publish(address, implementor);

        EndpointImpl ep = (EndpointImpl) Endpoint.create(implementor);
        ep.getFeatures().add(new WSAddressingFeature());
        ep.publish(address);
    }
View Full Code Here

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

        ByteArrayOutputStream output = setupOutLogging();

        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
        factory.setServiceClass(AddNumbersPortType.class);
        factory.setAddress("http://localhost:" + PORT + "/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

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

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

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

   
    @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

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

        Object implementor = new AddNumberImpl();
        String address = "http://localhost:" + PORT + "/AddNumberImplPort";
       
        EndpointImpl ep = new EndpointImpl(implementor);

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

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

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

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

        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);

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