Package org.apache.axis2.context

Examples of org.apache.axis2.context.ConfigurationContext.createMessageContext()


    }

    public void testMustUnderstandSupport() throws Exception {
        ConfigurationContext cfgCtx =
                ConfigurationContextFactory.createEmptyConfigurationContext();
        msgCtxt = cfgCtx.createMessageContext();

        msgCtxt.setProperty(AddressingConstants.ADD_MUST_UNDERSTAND_TO_ADDRESSING_HEADERS,
                            Boolean.TRUE);

        EndpointReference epr = new EndpointReference("http://www.from.org/service/");
View Full Code Here


    }

    public void testSOAPRoleSupport() throws Exception {
        ConfigurationContext cfgCtx =
                ConfigurationContextFactory.createEmptyConfigurationContext();
        msgCtxt = cfgCtx.createMessageContext();

        msgCtxt.setProperty(AddressingConstants.SOAP_ROLE_FOR_ADDRESSING_HEADERS,
                            "urn:test:role");

        EndpointReference epr = new EndpointReference("http://www.from.org/service/");
View Full Code Here

    }

    public void testSOAP12RoleSupport() throws Exception {
        ConfigurationContext cfgCtx =
                ConfigurationContextFactory.createEmptyConfigurationContext();
        msgCtxt = cfgCtx.createMessageContext();

        msgCtxt.setProperty(AddressingConstants.SOAP_ROLE_FOR_ADDRESSING_HEADERS,
                            "urn:test:role");

        EndpointReference epr = new EndpointReference("http://www.from.org/service/");
View Full Code Here

        RequestURIBasedOperationDispatcher ruisd = new RequestURIBasedOperationDispatcher();

        /**
         * Tests for global services
         */
        messageContext = cc.createMessageContext();
        messageContext.setTo(new EndpointReference("http://127.0.0.1:8080" +
                "/axis2/services/Service1/operation2"));
        messageContext.setAxisService(as1);
        ruisd.invoke(messageContext);
        assertEquals(operation2, messageContext.getAxisOperation());
View Full Code Here

                "/axis2/services/Service1/operation2"));
        messageContext.setAxisService(as1);
        ruisd.invoke(messageContext);
        assertEquals(operation2, messageContext.getAxisOperation());

        messageContext = cc.createMessageContext();
        messageContext.setTo(new EndpointReference("http://127.0.0.1:8080" +
                "/axis2/services/Service1.Service1Endpoint/operation2"));
        messageContext.setAxisService(as1);
        ruisd.invoke(messageContext);
        assertEquals(operation2, messageContext.getAxisOperation());
View Full Code Here

        EndpointReference eprOne = new EndpointReference("http://whatever.org");
        EndpointReference duplicateEpr = new EndpointReference("http://whatever.duplicate.org");
        RelatesTo reply = new RelatesTo("urn:id");
        ConfigurationContext cfgCtx =
                ConfigurationContextFactory.createEmptyConfigurationContext();
        msgCtxt = cfgCtx.createMessageContext();
        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
        SOAPEnvelope defaultEnvelope = factory.getDefaultEnvelope();
        msgCtxt.setEnvelope(defaultEnvelope);

        msgCtxt.addRelatesTo(reply);
View Full Code Here

        assertEquals(operation2, messageContext.getAxisOperation());

        /**
         * Tests for hierarchical services
         */
        messageContext = cc.createMessageContext();
        messageContext.setTo(new EndpointReference("http://127.0.0.1:8080" +
                "/axis2/services/foo/bar/Version/getVersion"));
        messageContext.setAxisService(as2);
        ruisd.invoke(messageContext);
        assertEquals(operation3, messageContext.getAxisOperation());
View Full Code Here

                "/axis2/services/foo/bar/Version/getVersion"));
        messageContext.setAxisService(as2);
        ruisd.invoke(messageContext);
        assertEquals(operation3, messageContext.getAxisOperation());

        messageContext = cc.createMessageContext();
        messageContext.setTo(new EndpointReference("http://127.0.0.1:8080" +
                "/axis2/services/foo/bar/Version.VersionEndpoint/getVersion"));
        messageContext.setAxisService(as2);
        ruisd.invoke(messageContext);
        assertEquals(operation3, messageContext.getAxisOperation());
View Full Code Here

        messageContext.setAxisService(as2);
        ruisd.invoke(messageContext);
        assertEquals(operation3, messageContext.getAxisOperation());


        messageContext = cc.createMessageContext();
        messageContext.setTo(new EndpointReference("http://127.0.0.1:8080" +
                "/axis2/services/foo/bar/1.0.1/Echo/echo"));
        messageContext.setAxisService(as3);
        ruisd.invoke(messageContext);
        assertEquals(operation4, messageContext.getAxisOperation());
View Full Code Here

        // this will check whether we can add to epr, if there is one already.
        EndpointReference eprOne = new EndpointReference("http://whatever.org");
        RelatesTo custom = new RelatesTo("urn:id", "customRelationship");
        ConfigurationContext cfgCtx =
                ConfigurationContextFactory.createEmptyConfigurationContext();
        msgCtxt = cfgCtx.createMessageContext();
        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
        SOAPEnvelope defaultEnvelope = factory.getDefaultEnvelope();
        OMNamespace addressingNamespace =
                factory.createOMNamespace(Final.WSA_NAMESPACE, WSA_DEFAULT_PREFIX);
        SOAPHeaderBlock soapHeaderBlock =
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.