Package org.apache.cxf.ws.addressing

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


        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

        Dispatch<StreamSource> dispatcher = service.createDispatch(fakePortName,
                                                                   StreamSource.class,
                                                                   Service.Mode.PAYLOAD);

        Client client = ((DispatchImpl<StreamSource>)dispatcher).getClient();
        WSAddressingFeature wsAddressingFeature = new WSAddressingFeature();
        wsAddressingFeature.initialize(client, client.getBus());
        dispatcher.getRequestContext().put("org.apache.cxf.ws.addressing.replyto",
                                           "http://localhost:" + CLIENT_PORT
                                               + "/SoapContext/AsyncEchoClient");

        StreamSource request = new StreamSource(new ByteArrayInputStream(requestString.getBytes()));
View Full Code Here

    //    factory.getOutInterceptors().add(new CdataWriterInterceptor("XACMLRequest"));
    factory.getOutInterceptors().add(new LoggingOutInterceptor());

    factory.setServiceClass(IAuthorizationDecisionPointExternal.class);
    factory.setAddress(settings.getEndpoint());
    factory.getFeatures().add(new WSAddressingFeature());

    iAuthorizationDecisionPointExternal = (IAuthorizationDecisionPointExternal) factory.create();

    Client client = ClientProxy.getClient(iAuthorizationDecisionPointExternal);
View Full Code Here

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

        ep = (EndpointImpl) Endpoint.create(implementor);
        ep.getFeatures().add(new WSAddressingFeature());
        ep.publish(address);
       
       
        ep = new EndpointImpl(BusFactory.getThreadDefaultBus(),
                                           implementor,
                                           null,
                                           getWsdl());
        ep.setServiceName(new QName("http://apache.org/cxf/systest/ws/addr_feature/", "AddNumbersService"));
        ep.setEndpointName(new QName("http://apache.org/cxf/systest/ws/addr_feature/",
                                     "AddNumbersNonAnonPort"));
        String address12 = "http://localhost:" + PORT2 + "/jaxws/soap12/add";      
        ep.getFeatures().add(new WSAddressingFeature());
        ep.publish(address12);
       
       
    }
View Full Code Here

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

        ep = (EndpointImpl) Endpoint.create(implementor);
        ep.getInInterceptors().add(new DecoupledFaultHandler());
        ep.getFeatures().add(new WSAddressingFeature());
        ep.publish(address);
       
        Object implementor2 = new GreeterImpl();
        String address2 = "http://localhost:" + PORT + "/jaxws/greeter";
        ep = (EndpointImpl) Endpoint.create(implementor2);
        ep.getInInterceptors().add(new DecoupledFaultHandler());
        ep.getFeatures().add(new WSAddressingFeature());
        ep.publish(address2);
    }
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

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

   
    @Test
    public void testClientProxyFactory() {
        JaxWsProxyFactoryBean cf = new JaxWsProxyFactoryBean();
        cf.setAddress("http://localhost:9000/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

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

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

TOP

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

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.