Examples of InOnlyAxisOperation


Examples of org.apache.axis2.description.InOnlyAxisOperation

        service.setClassLoader(Thread.currentThread().getContextClassLoader());
        service.addParameter(
                new Parameter(Constants.SERVICE_CLASS, RedirectReceiver.class.getName()));

        AxisOperation axisOp = new InOnlyAxisOperation(new QName("echoOMElementResponse"));

        axisOp.setMessageReceiver(new RawXMLINOnlyMessageReceiver());
        axisOp.setStyle(WSDLConstants.STYLE_RPC);
        service.addOperation(axisOp);
        service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + "echoOMElementResponse",
                                     axisOp);

        AxisOperation axisOp2 = new InOnlyAxisOperation(new QName("fault"));

        axisOp2.setMessageReceiver(new RawXMLINOnlyMessageReceiver());
        axisOp2.setStyle(WSDLConstants.STYLE_RPC);
        service.addOperation(axisOp2);
        service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + "fault", axisOp2);

        return service;
    }
View Full Code Here

Examples of org.apache.axis2.description.InOnlyAxisOperation

            }

            if (mepURL == null) {

                // assuming in-out MEP
                op_descrip = new InOnlyAxisOperation();
            } else {
                try {
                    op_descrip = AxisOperationFactory.getOperationDescription(mepURL);
                } catch (AxisFault axisFault) {
                    throw new DeploymentException(
View Full Code Here

Examples of org.apache.axis2.description.InOnlyAxisOperation

        service.setClassLoader(Thread.currentThread().getContextClassLoader());
        service.addParameter(
                new Parameter(Constants.SERVICE_CLASS, RedirectReceiver.class.getName()));

        AxisOperation axisOp = new InOnlyAxisOperation(new QName("echoOMElementResponse"));

        axisOp.setMessageReceiver(new RawXMLINOnlyMessageReceiver());
        axisOp.setStyle(WSDLConstants.STYLE_RPC);
        service.addOperation(axisOp);
        service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + "echoOMElementResponse",
                                     axisOp);

        AxisOperation axisOp2 = new InOnlyAxisOperation(new QName("fault"));

        axisOp2.setMessageReceiver(new RawXMLINOnlyMessageReceiver());
        axisOp2.setStyle(WSDLConstants.STYLE_RPC);
        service.addOperation(axisOp2);
        service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + "fault", axisOp2);

        return service;
    }
View Full Code Here

Examples of org.apache.axis2.description.InOnlyAxisOperation

        service.setClassLoader(Thread.currentThread().getContextClassLoader());
        service.addParameter(new Parameter(
                Constants.SERVICE_CLASS, serviceClassName));

        // Adds an operation who's MEP is In-Only.
        AxisOperation operation = new InOnlyAxisOperation(operationName);
        operation.setMessageReceiver(new RawXMLINOnlyMessageReceiver());
        operation.setStyle(WSDLConstants.STYLE_RPC);
        service.addOperation(operation);

        return service;
    }
View Full Code Here

Examples of org.apache.axis2.description.InOnlyAxisOperation

    public void testFindOperation() throws AxisFault {
        MessageContext messageContext;
        AxisService as1 = new AxisService("Service1");


        AxisOperation operation1 = new InOnlyAxisOperation(new QName("operation1"));
        AxisOperation operation2 = new InOnlyAxisOperation(new QName("operation2"));
        as1.addOperation(operation1);
        as1.addOperation(operation2);

        ConfigurationContext cc = ConfigurationContextFactory.createEmptyConfigurationContext();
        AxisConfiguration ac = cc.getAxisConfiguration();
View Full Code Here

Examples of org.apache.axis2.description.InOnlyAxisOperation

                                                        QName opName)
            throws AxisFault {
        AxisService service = new AxisService(serviceName.getLocalPart());
        service.setClassLoader(Thread.currentThread().getContextClassLoader());

        AxisOperation axisOp = new InOnlyAxisOperation(opName);

        axisOp.setMessageReceiver(messageReceiver);
        axisOp.setStyle(WSDLConstants.STYLE_RPC);
        service.addOperation(axisOp);
        service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + opName.getLocalPart(),
                                     axisOp);

        return service;
View Full Code Here

Examples of org.apache.axis2.description.InOnlyAxisOperation

        ConfigurationContext cc = new ConfigurationContext(new AxisConfiguration());
        MessageContext messageContext = cc.createMessageContext();
        AxisService as = new AxisService("Service1");
        messageContext.setAxisService(as);

        AxisOperation operation1 = new InOnlyAxisOperation(new QName("operation1"));
        operation1.setSoapAction("urn:org.apache.axis2.dispatchers.test:operation1");

        AxisOperation operation2 = new InOnlyAxisOperation(new QName("operation2"));
        operation2.setSoapAction("urn:org.apache.axis2.dispatchers.test:operation2");

        as.addOperation(operation1);
        as.addOperation(operation2);

        messageContext.setSoapAction("urn:org.apache.axis2.dispatchers.test:operation1");
View Full Code Here

Examples of org.apache.axis2.description.InOnlyAxisOperation

        // We shouldn't be able to route on an emtpy-string action.
        MessageContext messageContext = new MessageContext();
        AxisService as = new AxisService("Service1");
        messageContext.setAxisService(as);

        AxisOperation operation1 = new InOnlyAxisOperation(new QName("operation1"));
        operation1.setSoapAction("");

        AxisOperation operation2 = new InOnlyAxisOperation(new QName("operation2"));
        operation2.setSoapAction("");

        as.addOperation(operation1);
        as.addOperation(operation2);

        messageContext.setSoapAction("");
View Full Code Here

Examples of org.apache.axis2.description.InOnlyAxisOperation

        // We shouldn't be able to route on a null action.
        MessageContext messageContext = new MessageContext();
        AxisService as = new AxisService("Service1");
        messageContext.setAxisService(as);

        AxisOperation operation1 = new InOnlyAxisOperation(new QName("operation1"));
        operation1.setSoapAction(null);

        AxisOperation operation2 = new InOnlyAxisOperation(new QName("operation2"));
        operation2.setSoapAction(null);

        as.addOperation(operation1);
        as.addOperation(operation2);

        messageContext.setSoapAction(null);
View Full Code Here

Examples of org.apache.axis2.description.InOnlyAxisOperation

        // We shouldn't be able to route on a SOAPAction that is a duplicate.
        MessageContext messageContext = new MessageContext();
        AxisService as = new AxisService("Service1");
        messageContext.setAxisService(as);

        AxisOperation operation1 = new InOnlyAxisOperation(new QName("operation1"));
        operation1.setSoapAction("urn:org.apache.axis2.dispatchers.test:operation1");

        AxisOperation operation2 = new InOnlyAxisOperation(new QName("operation2"));
        operation2.setSoapAction("urn:org.apache.axis2.dispatchers.test:operation2");

        as.addOperation(operation1);
        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.
        operation3.setSoapAction("urn:org.apache.axis2.dispatchers.test:operation2");
        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"));
        // Note that the SOAPAction is intentionally duplicated with operation 2 above.
        operation3.setSoapAction("urn:org.apache.axis2.dispatchers.test:operation2");
        as.addOperation(operation3);

        messageContext = new MessageContext();
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.