Package org.apache.axis2.jaxws.client

Examples of org.apache.axis2.jaxws.client.TestClientInvocationController


        svc.addPort(new QName("http://test", "TestPort"), SOAPBinding.SOAP11HTTP_BINDING, "http://localhost");
        Dispatch<Source> d = svc.createDispatch(w3cEPR, Source.class, Service.Mode.PAYLOAD, feature);
       
        d.invoke(null);
       
        TestClientInvocationController testController = getInvocationController();
        InvocationContext ic = testController.getInvocationContext();
        MessageContext request = ic.getRequestMessageContext();
       
        String version = (String) request.getProperty(AddressingConstants.WS_ADDRESSING_VERSION);
        Boolean disabled = (Boolean) request.getProperty(AddressingConstants.DISABLE_ADDRESSING_FOR_OUT_MESSAGES);
        String responses = (String) request.getProperty(AddressingConstants.WSAM_INVOCATION_PATTERN_PARAMETER_NAME);
View Full Code Here


        assertTrue("SOAPBinding should not be null.", sb != null);
        assertTrue("MTOM should not be enabled on the binding by default.", !sb.isMTOMEnabled());
       
        d.invoke(null);
       
        TestClientInvocationController testController = getInvocationController();
        InvocationContext ic = testController.getInvocationContext();
        MessageContext request = ic.getRequestMessageContext();
       
        assertTrue("Request should not be null.", request != null);
        assertFalse("MTOM should not be enabled by default.", request.getMessage().isMTOMEnabled());
    }
View Full Code Here

        Dispatch<Source> d = svc.createDispatch(new QName("http://test", "TestPort"),
            Source.class, Service.Mode.PAYLOAD, feature);
       
        d.invoke(null);
       
        TestClientInvocationController testController = getInvocationController();
        InvocationContext ic = testController.getInvocationContext();
        MessageContext request = ic.getRequestMessageContext();
       
        assertTrue("MTOM should be enabled via the MTOMFeature.", request.getMessage().isMTOMEnabled());
    }
View Full Code Here

        Dispatch<Source> d = svc.createDispatch(new QName("http://test", "TestPort"),
            Source.class, Service.Mode.PAYLOAD, feature);
       
        d.invoke(null);
       
        TestClientInvocationController testController = getInvocationController();
       
        InvocationContext ic = testController.getInvocationContext();
        MessageContext request = ic.getRequestMessageContext();
       
        assertFalse("MTOM should be disabled via the MTOMFeature.", request.getMessage().isMTOMEnabled());
    }
View Full Code Here

        Dispatch<Source> d = svc.createDispatch(new QName("http://test", "TestPort"),
            Source.class, Service.Mode.PAYLOAD, feature);
       
        d.invoke(null);
       
        TestClientInvocationController testController = getInvocationController();
       
        InvocationContext ic = testController.getInvocationContext();
        MessageContext request = ic.getRequestMessageContext();
       
        // A Threshold indicates that MTOM should be enabled.
        // The decision about whether the attachment is inlined is made on a per attachment
        // basis in Axiom...and cannot be tested in unit test that does not send the message
View Full Code Here

        Dispatch<Source> d = svc.createDispatch(new QName("http://test", "TestPort"),
            Source.class, Service.Mode.PAYLOAD, feature);
       
        d.invoke(null);
       
        TestClientInvocationController testController = getInvocationController();
       
        InvocationContext ic = testController.getInvocationContext();
        MessageContext request = ic.getRequestMessageContext();
       
        assertTrue("MTOM should be enabled via the MTOMFeature.", request.getMessage().isMTOMEnabled());
    }
View Full Code Here

        Dispatch<Source> d = svc.createDispatch(new QName("http://test", "TestPort"),
            Source.class, Service.Mode.PAYLOAD, feature);
       
        d.invoke(null);
       
        TestClientInvocationController testController = getInvocationController();
       
        InvocationContext ic = testController.getInvocationContext();
        MessageContext request = ic.getRequestMessageContext();
       
        assertFalse("MTOM should be disabled via the MTOMFeature.", request.getMessage().isMTOMEnabled());       
    }
View Full Code Here

        ProxyAddressingService proxy = svc.getPort(ProxyAddressingService.class);
        assertNotNull(proxy);
       
        proxy.doSomething("12345");
       
        TestClientInvocationController testController = getInvocationController();
        InvocationContext ic = testController.getInvocationContext();
        MessageContext request = ic.getRequestMessageContext();
       
        OperationDescription od = request.getOperationDescription();
        AxisOperation axisOperation = (AxisOperation) od.getAxisOperation();
        assertEquals("http://jaxws.axis2.apache.org/metadata/addressing/action/Service1/doSomethingRequest", axisOperation.getOutputAction());
View Full Code Here

        ProxyAddressingServiceWithAction proxy = svc.getPort(ProxyAddressingServiceWithAction.class);
        assertNotNull(proxy);
       
        proxy.doSomething("12345");
       
        TestClientInvocationController testController = getInvocationController();
        InvocationContext ic = testController.getInvocationContext();
        MessageContext request = ic.getRequestMessageContext();
       
        OperationDescription od = request.getOperationDescription();
        AxisOperation axisOperation = (AxisOperation) od.getAxisOperation();
        assertEquals("http://test/input", axisOperation.getOutputAction());
View Full Code Here

        p.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true);
        p.getRequestContext().put(HTTPConstants.COOKIE_STRING, "MyCookie");
       
        proxy.doSomethingAsync("12345", new DummyAsyncHandler());
       
        TestClientInvocationController testController = getInvocationController();
        InvocationContext ic = testController.getInvocationContext();
        testController.invoke(ic);

        assertNotNull("Invocation of the proxy object should have caused COOKIE_STRING keyed property to be on the ServiceContext", ic.getServiceClient().getServiceContext().getProperty(HTTPConstants.HEADER_COOKIE));
       
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.jaxws.client.TestClientInvocationController

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.