Package javax.xml.ws.soap

Examples of javax.xml.ws.soap.AddressingFeature


    /*
     * Test disabling the Addressing feature.
     */
    public void testDisabledAddressingFeature() {
        // Use the default feature config
        AddressingFeature feature = new AddressingFeature(false);
       
        Service svc = Service.create(new QName("http://test", "ProxyAddressingService"));
        ProxyAddressingService proxy = svc.getPort(w3cEPR, ProxyAddressingService.class, feature);
        assertTrue("Proxy instance was null", proxy != null);
       
View Full Code Here


    /*
     * Test the default configuration of the AddressingFeature.
     */
    public void testInvalidAddressingFeature() {
        // Use the default feature config
        AddressingFeature feature = new AddressingFeature();
       
        Service svc = Service.create(new QName("http://test", "ProxyAddressingService"));
        ProxyAddressingService proxy = svc.getPort(subEPR, ProxyAddressingService.class, feature);
        assertNotNull(proxy);
       
View Full Code Here

    @Test
    public void testDisableAll() throws Exception {
        ByteArrayOutputStream input = setupInLogging();
        ByteArrayOutputStream output = setupOutLogging();

        AddNumbersPortType port = getService().getAddNumbersPort(new AddressingFeature(false));

        ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                                        "http://localhost:"
                                                        + PORT + "/jaxws/add");
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:"
                                                           + PORT + "/jaxws/add");

        InputStream is = getClass().getResourceAsStream("resources/AddNumbersDispatchReq.xml");
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

        }
        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();
            getEndpointInfo().setProperty("org.apache.cxf.ws.addressing.MAPAggregator.addressingDisabled",
                                          Boolean.TRUE);
        }
View Full Code Here

        URL wsdl = getClass().getResource("/wsdl_systest_wsspec/add_numbers.wsdl");
        assertNotNull("WSDL is null", wsdl);

        AddNumbersService service = new AddNumbersService(wsdl, serviceName);
        assertNotNull("Service is null ", service);
        AddNumbersPortType port = service.getAddNumbersPort(new AddressingFeature());
        updateAddressPort(port, PORT);
        return port;
    }
View Full Code Here

                        });
                    Object obj = constructor.newInstance(addressing.enabled(), addressing.required(),
                                                         responses);
                    features.add((WebServiceFeature)obj);
                } catch (Exception e) {
                    features.add(new AddressingFeature(addressing.enabled(), addressing.required()));
                }
            } else {
                features.add(new AddressingFeature(addressing.enabled(), addressing.required()));
            }

        }

        if (features.size() > 0) {
View Full Code Here

    @Test
    public void testDisableAll() throws Exception {
        ByteArrayOutputStream input = setupInLogging();
        ByteArrayOutputStream output = setupOutLogging();

        AddNumbersPortType port = getService().getAddNumbersPort(new AddressingFeature(false));

        ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                                        "http://localhost:"
                                                        + PORT + "/jaxws/add");
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:"
                                                           + PORT + "/jaxws/add");

        InputStream is = getClass().getResourceAsStream("resources/AddNumbersDispatchReq.xml");
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.