Package javax.xml.ws.soap

Examples of javax.xml.ws.soap.AddressingFeature


    }
   
    // Test configurations that are not allowed with the AddressingFeature
    public void testInvalidAddressingFeature() {
        // Use the default feature config
        AddressingFeature feature = new AddressingFeature();
       
        Service svc = Service.create(new QName("http://test", "TestService"));
        svc.addPort(new QName("http://test", "TestPort"), SOAPBinding.SOAP11HTTP_BINDING, "http://localhost");
        Dispatch<Source> d = svc.createDispatch(subEPR, Source.class, Service.Mode.PAYLOAD, feature);
       
View Full Code Here


        if (addressing == null && serviceClass != null) {
            addressing = serviceClass.getAnnotation(Addressing.class);
        }

        if (addressing != null) {
            features.add(new AddressingFeature(addressing.enabled(), addressing.required()));
        }

        if (features.size() > 0) {
            wsFeatures = features;
        }
View Full Code Here

        }
        return null;
    }
   
    public final void resolveFeatures() {
        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());
        } else {
            removeAddressingFeature();
        }
    }
View Full Code Here

        );
        final Dispatch<Source> dispatcher = service.createDispatch(
            USERNAME_TOKEN_PORT_QNAME,
            Source.class,
            Service.Mode.MESSAGE,
            new AddressingFeature(decoupled, decoupled)
        );
        final java.util.Map<String, Object> requestContext =
            dispatcher.getRequestContext();
        requestContext.put(
            MessageContext.HTTP_REQUEST_METHOD,
View Full Code Here

        );
        final Dispatch<Source> dispatcher = service.createDispatch(
            USERNAME_TOKEN_PORT_QNAME,
            Source.class,
            Service.Mode.MESSAGE,
            new AddressingFeature(decoupled, decoupled)
        );
        final java.util.Map<String, Object> requestContext =
            dispatcher.getRequestContext();
        requestContext.put(
            MessageContext.HTTP_REQUEST_METHOD,
View Full Code Here

        );
        final Dispatch<Source> dispatcher = service.createDispatch(
            USERNAME_TOKEN_PORT_QNAME,
            Source.class,
            Service.Mode.MESSAGE,
            new AddressingFeature(decoupled, decoupled)
        );
        final java.util.Map<String, Object> requestContext =
            dispatcher.getRequestContext();
        requestContext.put(
            MessageContext.HTTP_REQUEST_METHOD,
View Full Code Here

        QName serviceName = new QName("http://apache.org/hello_world_doc_lit",
                                 "SOAPService8");
        QName portName = new QName("http://apache.org/hello_world_doc_lit", "SoapPort8");
        URL wsdl = getWSDLURL("/wsdl/hello_world_doc_lit.wsdl");
        SOAPService2 service = new SOAPService2(wsdl, serviceName);
        Greeter greeter = service.getPort(portName, Greeter.class, new AddressingFeature());

        for (int idx = 0; idx < 5; idx++) {

            greeter.greetMeOneWay("test String");
View Full Code Here

   
    @Test
    public void testResolveOperationWithSourceAndWSA() throws Exception {
        ServiceImpl service =
            new ServiceImpl(getBus(), getClass().getResource(wsdlResource),
                    serviceName, null, new AddressingFeature());

        Dispatch<Source> disp = service.createDispatch(
                portName, Source.class, Service.Mode.PAYLOAD);
        disp.getRequestContext().put(MessageContext.WSDL_OPERATION, operationName);
        disp.getRequestContext().put(Dispatch.ENDPOINT_ADDRESS_PROPERTY, address);
View Full Code Here

        if (addressing == null && serviceClass != null) {
            addressing = serviceClass.getAnnotation(Addressing.class);
        }

        if (addressing != null) {
            features.add(new AddressingFeature(addressing.enabled(), addressing.required()));
        }

        if (features.size() > 0) {
            wsFeatures = features;
            if (setWsFeatures != null) {
View Full Code Here

    public void testDiaptchWithWsaDisable() throws Exception {

        QName port = new QName("http://apache.org/cxf/systest/ws/addr_feature/", "AddNumbersPort");
        Dispatch<SOAPMessage> disptch = getService().createDispatch(port, SOAPMessage.class,
                                                                    javax.xml.ws.Service.Mode.MESSAGE,
                                                                    new AddressingFeature(false));
        ((BindingProvider)disptch).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                                           "http://localhost:9095/jaxws/add");

        InputStream is = getClass().getResourceAsStream("resources/AddNumbersDispatchReq.xml");
        SOAPMessage soapReqMsg = MessageFactory.newInstance().createMessage(null, is);
View Full Code Here

TOP

Related Classes of javax.xml.ws.soap.AddressingFeature

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.