Examples of createMessageContext()


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

        // 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.createDefaultConfigurationContext();
        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

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

        // 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.createDefaultConfigurationContext();
        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

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

        method.addChild(value);
        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
        SOAPEnvelope envelope = factory.getDefaultEnvelope();
        envelope.getBody().addChild(method);

        MessageContext requestContext = configContext.createMessageContext();
        requestContext.setAxisService(clientService);
        requestContext.setAxisOperation(opdesc);
        requestContext.setEnvelope(envelope);

        ServiceClient sender = new ServiceClient(configContext, clientService);
View Full Code Here

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.setAxisService(as1);

        SOAPEnvelope se = OMAbstractFactory.getSOAP11Factory().createSOAPEnvelope();
        SOAPBody sb = OMAbstractFactory.getSOAP11Factory().createSOAPBody(se);
View Full Code Here

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

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

        ConfigurationContext configCtx =
                ConfigurationContextFactory.createDefaultConfigurationContext();
        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

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

public class SOAPActionBasedDispatcherTest extends TestCase {

    public void testFindOperation() throws Exception {
        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");
View Full Code Here

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

        servicesDesc.setName("testService");
        er.addService(servicesDesc);

        ConfigurationContext engineContext = new ConfigurationContext(er);

        MessageContext msgctx = engineContext.createMessageContext();

        SOAPFactory omFac = OMAbstractFactory.getSOAP11Factory();

        msgctx.setEnvelope(omFac.getDefaultEnvelope());
        assertNotNull(msgctx.getEnvelope());
View Full Code Here

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

        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

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

        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

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

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