Examples of AddressingFeature


Examples of javax.xml.ws.soap.AddressingFeature

        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

Examples of javax.xml.ws.soap.AddressingFeature

        W3CEndpointReferenceBuilder builder = createERPBuilder();
        Document refParam = TestUtils.createDocument(REF_PARAM);
        builder.referenceParameter(refParam.getDocumentElement());
        EndpointReference epr = builder.build();
       
        Calculator calc = service.getPort(epr, Calculator.class, new AddressingFeature());
        Assert.assertEquals(36, calc.multiply(6, 6));
    }
View Full Code Here

Examples of javax.xml.ws.soap.AddressingFeature

        } catch (SOAPFaultException e) {
            // that's what we expect
        }

        // make a call with AddressingFeature disabled
        calc = service.getPort(Calculator.class, new AddressingFeature(false, false));
        try {
            calc.add(1, 1);
            throw new ServletException("Did not throw exception");
        } catch (SOAPFaultException e) {
            // that's what we expect
        }
               
        // make a call with AddressingFeature enabled
        calc = service.getPort(Calculator.class, new AddressingFeature());
        Assert.assertEquals(4, calc.add(2, 2));
      
        // make a call with AddressingFeature enabled and port       
        calc = service.getPort(PORT, Calculator.class, new AddressingFeature());
        Assert.assertEquals(6, calc.add(3, 3));
               
        EndpointReference epr = null;
       
        // make a call using EPR from Binding
        epr = ((BindingProvider)calc).getEndpointReference();
       
        calc = service.getPort(epr, Calculator.class, new AddressingFeature());
        Assert.assertEquals(8, calc.add(4, 4));
       
        // make a call using EPR from Service
        epr = calc.getEPR();
       
        calc = service.getPort(epr, Calculator.class, new AddressingFeature());
        Assert.assertEquals(10, calc.add(5, 5));
       
        // make a call using created EPR
        epr = createEPR();
       
        calc = service.getPort(epr, Calculator.class, new AddressingFeature());
        Assert.assertEquals(12, calc.add(6, 6));
    }
View Full Code Here

Examples of javax.xml.ws.soap.AddressingFeature

        this.responses = responses;
    }

    @Override
    public WebServiceFeature getWebServiceFeature() {
        return new AddressingFeature(enabled, required, responses);
    }
View Full Code Here

Examples of javax.xml.ws.soap.AddressingFeature

        URL wsdl = SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
        Service service = Service.create(wsdl, SERVICE_QNAME);
        QName portQName = new QName(NAMESPACE, "DoubleItSymmetricSAML1Port");
      
        Dispatch<DOMSource> dispatch =
            service.createDispatch(portQName, DOMSource.class, Service.Mode.PAYLOAD, new AddressingFeature());
        updateAddressPort(dispatch, test.getPort());
       
        // Setup STSClient
        STSClient stsClient = createDispatchSTSClient(bus);
        String wsdlLocation = "http://localhost:" + test.getStsPort() + "/SecurityTokenService/UT?wsdl";
View Full Code Here

Examples of javax.xml.ws.soap.AddressingFeature

        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

Examples of javax.xml.ws.soap.AddressingFeature

        }
        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());
            if (ProviderImpl.isJaxWs22()) {
                try {
                    Class<?> addrClass = ClassLoaderUtils.loadClass("javax.xml.ws.soap.AddressingFeature",
                                                                    ProviderImpl.class);
                    Method responsesMethod = addrClass.getMethod("getResponses", new Class[] {});
View Full Code Here

Examples of javax.xml.ws.soap.AddressingFeature

        }
        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

Examples of javax.xml.ws.soap.AddressingFeature

        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

Examples of javax.xml.ws.soap.AddressingFeature

        }
    }
   
    private synchronized Dispatch<Object> getDispatchInternal(boolean addSeq) {
        if (dispatch == null) {
            AddressingFeature f = new AddressingFeature(true, true);
            dispatch = getService().createDispatch(SERVICE_QNAME, getJAXBContext(), Service.Mode.PAYLOAD, f);
            dispatch.getRequestContext().put("thread.local.request.context", Boolean.TRUE);
        }
        addAddressing(dispatch, false);
        return dispatch;
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.