Package org.apache.axis2.context

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


        as1.addOperation(operation2);

        ConfigurationContext cc = ConfigurationContextFactory.createEmptyConfigurationContext();
        AxisConfiguration ac = cc.getAxisConfiguration();
        ac.addService(as1);
        messageContext = cc.createMessageContext();

        messageContext.setTo(new EndpointReference(
                "http://127.0.0.1:8080/axis2/services/Service1/operation2"));
        messageContext.setAxisService(as1);
View Full Code Here


        OperationContext oc1 = sc1.createOperationContext(operation1);
        OperationContext oc2 = sc2.createOperationContext(operation2);

        cc.registerOperationContext("urn:org.apache.axis2.dispatchers.messageid:123", oc1);
        cc.registerOperationContext("urn:org.apache.axis2.dispatchers.messageid:456", oc2);
        messageContext = cc.createMessageContext();
        messageContext
                .addRelatesTo(new RelatesTo("urn:org.apache.axis2.dispatchers.messageid:456"));

        RelatesToBasedServiceDispatcher ruisd = new RelatesToBasedServiceDispatcher();
        ruisd.invoke(messageContext);
View Full Code Here

        AxisFault fault = new AxisFault(soapFaultCode, soapFaultReason, null,
                null, soapFaultDetail);

        ConfigurationContext cc = ConfigurationContextFactory
                .createDefaultConfigurationContext();
        MessageContext ctx = cc.createMessageContext();
        SOAPFactory fac = OMAbstractFactory.getSOAP12Factory();
        ctx.setEnvelope(fac.getDefaultEnvelope());
        MessageContext faultCtx = MessageContextBuilder
                .createFaultMessageContext(ctx, fault);
View Full Code Here

        AxisFault fault = new AxisFault(new QName("myQname"), faultReason,
                "myFaultNode", "myFaultRole", response);

        ConfigurationContext cc = ConfigurationContextFactory
                .createDefaultConfigurationContext();
        MessageContext ctx = cc.createMessageContext();
        SOAPFactory fac = OMAbstractFactory.getSOAP12Factory();
        ctx.setEnvelope(fac.getDefaultEnvelope());
        MessageContext faultCtx = MessageContextBuilder
                .createFaultMessageContext(ctx, fault);
View Full Code Here

        ConfigurationContext cc = ConfigurationContextFactory.createEmptyConfigurationContext();
        AxisConfiguration ac = cc.getAxisConfiguration();
        ac.addService(as1);
        ac.addService(as2);
        messageContext = cc.createMessageContext();

        messageContext
                .setTo(new EndpointReference("http://127.0.0.1:8080/axis2/services/Service2"));

        RequestURIBasedServiceDispatcher ruisd = new RequestURIBasedServiceDispatcher();
View Full Code Here

        as1.addOperation(operation2);

        ConfigurationContext cc = ConfigurationContextFactory.createEmptyConfigurationContext();
        AxisConfiguration ac = cc.getAxisConfiguration();
        ac.addService(as1);
        messageContext = cc.createMessageContext();

        messageContext.setTo(new EndpointReference(
                "http://127.0.0.1:8080/axis2/services/Service1/operation2"));
        messageContext.setAxisService(as1);
View Full Code Here

        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
        SOAPEnvelope defaultEnvelope = factory.getDefaultEnvelope();

        ConfigurationContext configCtx =
                ConfigurationContextFactory.createEmptyConfigurationContext();
        MessageContext msgCtxt = configCtx.createMessageContext();
        msgCtxt.setProperty(WS_ADDRESSING_VERSION, Submission.WSA_NAMESPACE);
        msgCtxt.setTo(epr);
        msgCtxt.setReplyTo(replyTo);
        msgCtxt.setEnvelope(defaultEnvelope);
        msgCtxt.setWSAAction("http://www.actions.org/action");
View Full Code Here

    }

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

        EndpointReference epr = new EndpointReference("http://www.from.org/service/");
        epr.addReferenceParameter(new QName("Reference2"),
                                  "Value 200");
        msgCtxt.setFrom(epr);
View Full Code Here

    }

    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

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.