Examples of AddressingFeature


Examples of javax.xml.ws.soap.AddressingFeature

    @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

Examples of javax.xml.ws.soap.AddressingFeature

    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

Examples of javax.xml.ws.soap.AddressingFeature

    }
   
    //CXF-3060
    @Test
    public void testDisableServerEnableClientRequired() throws Exception {
        AddNumbersPortType port = getService().getAddNumbersPort(new AddressingFeature(true, true));

        ((BindingProvider)port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
                                                        "http://localhost:" + PORT + "/jaxws/add");
        try {
            port.addNumbers(1, 2);
View Full Code Here

Examples of javax.xml.ws.soap.AddressingFeature

        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

Examples of javax.xml.ws.soap.AddressingFeature

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

Examples of javax.xml.ws.soap.AddressingFeature

    private Dispatch<SOAPMessage> createDispatch() throws Exception {
        URL wsdlURL = getWsdl();
        assertNotNull(wsdlURL);
        Service svc = Service.create(wsdlURL, serviceName);
       
        WebServiceFeature[] wsf = {new AddressingFeature(true)};
       
        Dispatch<SOAPMessage> dispatch =
            svc.createDispatch(portName, SOAPMessage.class, Service.Mode.MESSAGE, wsf);
       
        BindingProvider p = (BindingProvider) dispatch;
View Full Code Here

Examples of javax.xml.ws.soap.AddressingFeature

    /*
     * Test the default configuration of the AddressingFeature.
     */
    public void testDefaultAddressingFeature() throws Exception {
        // 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(w3cEPR, Source.class, Service.Mode.PAYLOAD, feature);
       
View Full Code Here

Examples of javax.xml.ws.soap.AddressingFeature

    /*
     * Test disabling the Addressing feature.
     */
    public void testDisabledAddressingFeature() {
        // Set the feature to be disabled.
        AddressingFeature feature = new AddressingFeature(false);
               
        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(w3cEPR, Source.class, Service.Mode.PAYLOAD, feature);
       
View Full Code Here

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

Examples of javax.xml.ws.soap.AddressingFeature

    /*
     * Test the default configuration of the AddressingFeature.
     */
    public void testDefaultAddressingFeature() throws Exception {
        // Use the default feature config
        AddressingFeature feature = new AddressingFeature();
       
        Service svc = Service.create(new QName("http://test", "ProxyAddressingService"));
        ProxyAddressingService proxy = svc.getPort(w3cEPR, ProxyAddressingService.class, feature);
        assertNotNull(proxy);
       
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.