Package org.apache.axis2.jaxws.client

Examples of org.apache.axis2.jaxws.client.TestClientInvocationController.invoke()


        as.addOperation(operation2);

        messageContext.setSoapAction(null);

        SOAPActionBasedDispatcher soapActionDispatcher = new SOAPActionBasedDispatcher();
        soapActionDispatcher.invoke(messageContext);
        assertNull(messageContext.getAxisOperation());
    }

    public void testDuplicateAction() throws Exception {
        // We shouldn't be able to route on a SOAPAction that is a duplicate.
View Full Code Here


        as.addOperation(operation2);

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

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

        // Now add a duplicate action, then validate we can't route on it anymore.
        AxisOperation operation3 = new InOnlyAxisOperation(new QName("operation3"));
        // Note that the SOAPAction is intentionally duplicated with operation 2 above.
View Full Code Here

        as.addOperation(operation3);

        messageContext = new MessageContext();
        messageContext.setAxisService(as);
        messageContext.setSoapAction("urn:org.apache.axis2.dispatchers.test:operation2");
        soapActionDispatcher.invoke(messageContext);
        assertNull(messageContext.getAxisOperation());

        // Now verify that adding another operation with the duplicate SOAPAction
        // doesn't somehow get it added back into the valid alias map
        AxisOperation operation4 = new InOnlyAxisOperation(new QName("operation4"));
View Full Code Here

        as.addOperation(operation4);

        messageContext = new MessageContext();
        messageContext.setAxisService(as);
        messageContext.setSoapAction("urn:org.apache.axis2.dispatchers.test:operation2");
        soapActionDispatcher.invoke(messageContext);
        assertNull(messageContext.getAxisOperation());

        // And finally, verify that after all the above, we can still route on a valid
        // SOAPAction for operation 1 (whose SOAPAction was never duplicated, so should still be
        // valid)
View Full Code Here

        // SOAPAction for operation 1 (whose SOAPAction was never duplicated, so should still be
        // valid)
        messageContext = new MessageContext();
        messageContext.setAxisService(as);
        messageContext.setSoapAction("urn:org.apache.axis2.dispatchers.test:operation1");
        soapActionDispatcher.invoke(messageContext);
        assertEquals(operation1, messageContext.getAxisOperation());


    }
       
View Full Code Here

        as.addOperation(operation2);
       
        messageContext.setSoapAction("operation2");
       
        SOAPActionBasedDispatcher soapActionDispatcher = new SOAPActionBasedDispatcher();
        soapActionDispatcher.invoke(messageContext);
        // Since Axis2 uses a single alias table for SOAPActions and operation names (and
        // WS-Addressing actions and input message names), having an action with the same name
        // as a different operation will cause that alias to be unusable for routing.
//        assertEquals(operation1, messageContext.getAxisOperation());
        assertNull(messageContext.getAxisOperation());
View Full Code Here

        // Make sure the other action works also
        messageContext = new MessageContext();
        messageContext.setAxisService(as);
        messageContext.setSoapAction("operation1");
        soapActionDispatcher = new SOAPActionBasedDispatcher();
        soapActionDispatcher.invoke(messageContext);
//        assertEquals(operation2, messageContext.getAxisOperation());
        assertNull(messageContext.getAxisOperation());
       
    }
   
View Full Code Here

        as.addOperation(operation2);
       
        messageContext.setSoapAction("operation2");
       
        SOAPActionBasedDispatcher soapActionDispatcher = new SOAPActionBasedDispatcher();
        soapActionDispatcher.invoke(messageContext);
        // Verify that we can't route on the SOAPAction because it has been specified > 1 time
        assertNull(messageContext.getAxisOperation());
       
        // Now verify that a SOAPAction that happens to map to an operation name can still be routed
        messageContext = new MessageContext();
View Full Code Here

        // 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

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.