Package org.apache.axis2.context

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


        messageContext.setTo(new EndpointReference("http://127.0.0.1:8080" +
                "/axis2/services/foo/bar/1.0.1/Echo/echo"));
        ruisd.invoke(messageContext);
        assertEquals(as4, messageContext.getAxisService());

        messageContext = cc.createMessageContext();
        messageContext.setTo(new EndpointReference("http://127.0.0.1:8080" +
                "/axis2/services/foo/bar/1.0.1/Echo/student/name/peter/age/25"));
        ruisd.invoke(messageContext);
        assertEquals(as4, messageContext.getAxisService());
View Full Code Here


        messageContext.setTo(new EndpointReference("http://127.0.0.1:8080" +
                "/axis2/services/foo/bar/1.0.1/Echo/student/name/peter/age/25"));
        ruisd.invoke(messageContext);
        assertEquals(as4, messageContext.getAxisService());

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

        messageContext.setTo(new EndpointReference("http://127.0.0.1:8080" +
                "/axis2/services/foo/bar/1.0.1/Echo.EchoEndpoint"));
        ruisd.invoke(messageContext);
        assertEquals(as4, messageContext.getAxisService());

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

        // Make addressing required using the same property as the AddressingConfigurator on the request
        MessageContext request = configurationContext.createMessageContext();
        request.setProperty(AddressingConstants.ADDRESSING_REQUIREMENT_PARAMETER, AddressingConstants.ADDRESSING_REQUIRED);
       
        // Create a response to invoke the in handler on       
        MessageContext response = configurationContext.createMessageContext();

        // Link the response to the request message context using the context hierarchy
        ServiceGroupContext serviceGroupContext = configurationContext.createServiceGroupContext(axisService.getAxisServiceGroup());
        ServiceContext serviceContext = serviceGroupContext.getServiceContext(axisService);
        OperationContext opContext = axisOperation.findOperationContext(request, serviceContext);
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

        ServiceContext serviceContext = sgc.getServiceContext(as1);
        OperationContext oc1 = serviceContext.createOperationContext(operation1);
        OperationContext oc2 = serviceContext.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"));
        messageContext.setAxisService(as1);

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

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

        SOAPEnvelope se = OMAbstractFactory.getSOAP11Factory().createSOAPEnvelope();
        SOAPBody sb = OMAbstractFactory.getSOAP11Factory().createSOAPBody(se);
        sb.addChild(OMAbstractFactory.getSOAP11Factory().createOMElement("operation2",
                                                                         "http://127.0.0.1:8080/axis2/services/Service2",
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

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.