Package org.apache.axis2.dispatchers

Examples of org.apache.axis2.dispatchers.RequestURIOperationDispatcher.invoke()


        // Now verify that a SOAPAction that happens to map to an operation name can still be routed
        messageContext = new MessageContext();
        messageContext.setAxisService(as);
        messageContext.setSoapAction("operation1");
        soapActionDispatcher = new SOAPActionBasedDispatcher();
        soapActionDispatcher.invoke(messageContext);
        assertEquals(operation1, messageContext.getAxisOperation());
    }
}
View Full Code Here


        as.addOperation(operation2);

        messageContext.setSoapAction("urn:org.apache.axis2.dispatchers.test:operation1");

        SOAPActionBasedDispatcher soapActionDispatcher = new SOAPActionBasedDispatcher();
        soapActionDispatcher.invoke(messageContext);
        assertEquals(operation1, messageContext.getAxisOperation());
    }

    public void testEmptyAction() throws Exception {
        // We shouldn't be able to route on an emtpy-string action.
View Full Code Here

    }

    private void dispatchAndVerify(MessageContext msgContext) throws AxisFault {
        RequestURIBasedDispatcher requestDispatcher = new RequestURIBasedDispatcher();
        requestDispatcher.invoke(msgContext);

        // check for the dispatching result
        if (msgContext.getAxisService() == null || msgContext.getAxisOperation() == null) {
            throw new AxisFault("I can not find a service for this request to be serviced." +
                    " Check the WSDL and the request URI");
View Full Code Here

       
        d.invoke(null);
       
        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

       
        d.invokeAsync(null);
       
        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

       
        d.invokeAsync(null, 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

            return response;
        }

        if (!operationDesc.isOneWay()) {
            InvocationContext responseIC = controller.invoke(requestIC);

            //Check to see if we need to maintain session state
            checkMaintainSessionState(request, requestIC);

            MessageContext responseContext = responseIC.getResponseMessageContext();
View Full Code Here

            return response;
        }

        if (!operationDesc.isOneWay()) {
            InvocationContext responseIC = controller.invoke(requestIC);

            //Check to see if we need to maintain session state
            checkMaintainSessionState(request, requestIC);

            MessageContext responseContext = responseIC.getResponseMessageContext();
View Full Code Here

        assertNotNull(service);
        DocLitnonWrappedProxy proxy = service.getPort(portName, DocLitnonWrappedProxy.class);
        assertNotNull(proxy);
        BindingProvider p = (BindingProvider)proxy;
        p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
        ReturnType response = proxy.invoke(invokeObj);
        assertNotNull(response);
        TestLogger.logger.debug(">>Response =" + response.getReturnStr());

        TestLogger.logger.debug("-------------------------------------");
    }
View Full Code Here

        assertNotNull(service);
        DocLitnonWrappedProxy proxy = service.getPort(portName, DocLitnonWrappedProxy.class);
        assertNotNull(proxy);
        BindingProvider p = (BindingProvider)proxy;
        p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,axisEndpoint);
        ReturnType response = proxy.invoke(invokeObj);
        assertNull(response);

        TestLogger.logger.debug("-------------------------------------");
    }
   
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.