Examples of createMessageContext()


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

                "/test-resources/axis2-IncludeOptionalHeadersTrue.xml");
        ConfigurationContext cfgCtx = ConfigurationContextFactory
        .createConfigurationContextFromFileSystem("target/test-classes",
                configFile.getAbsolutePath());
       
        msgCtxt = cfgCtx.createMessageContext();
        msgCtxt.setEnvelope(OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope());
        msgCtxt.setTo(new EndpointReference("http://www.to.org/service/"));
        msgCtxt.setFrom(new EndpointReference("http://www.from.org/service/"));
        msgCtxt.setReplyTo(new EndpointReference("http://www.replyTo.org/service/"));
        msgCtxt.setFaultTo(new EndpointReference("http://www.faultTo.org/service/"));
View Full Code Here

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

                "/test-resources/axis2-IncludeOptionalHeadersFalse.xml");
        ConfigurationContext cfgCtx = ConfigurationContextFactory
        .createConfigurationContextFromFileSystem("target/test-classes",
                configFile.getAbsolutePath());
       
        msgCtxt = cfgCtx.createMessageContext();
        msgCtxt.setEnvelope(OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope());
        msgCtxt.setTo(new EndpointReference("http://www.to.org/service/"));
        msgCtxt.setFrom(new EndpointReference("http://www.from.org/service/"));
        msgCtxt.setReplyTo(new EndpointReference("http://www.replyTo.org/service/"));
        msgCtxt.setFaultTo(new EndpointReference("http://www.faultTo.org/service/"));
View Full Code Here

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

        // overridden by target\classes\META-INF\module.xml, so create our own
        // AxisModule with the required parameter value
        AxisModule module = config.getModule("addressing");
        module.addParameter(new Parameter("disableAddressingForOutMessages", "true"));
       
        msgCtxt = cfgCtx.createMessageContext();
       
        // Need to add a SOAP Header to stop this error from XMLComparator:
        // "There is no Header element under Envelope"
        SOAPEnvelope envelope = OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
        SOAPHeaderBlock soapHeaderBlock = envelope.getHeader().addHeaderBlock(
View Full Code Here

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

        // overridden by target\classes\META-INF\module.xml, so create our own
        // AxisModule with the required parameter value
        AxisModule module = config.getModule("addressing");
        module.addParameter(new Parameter("disableAddressingForOutMessages", "false"));
       
        msgCtxt = cfgCtx.createMessageContext();
        msgCtxt.setEnvelope(OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope());
        msgCtxt.setTo(new EndpointReference("http://www.to.org/service/"));
        msgCtxt.setFrom(new EndpointReference("http://www.from.org/service/"));
        msgCtxt.setReplyTo(new EndpointReference("http://www.replyTo.org/service/"));
        msgCtxt.setFaultTo(new EndpointReference("http://www.faultTo.org/service/"));
View Full Code Here

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

        // overridden by target\classes\META-INF\module.xml, so create our own
        // AxisModule with the required parameter value
        AxisModule module = config.getModule("addressing");
        module.addParameter(new Parameter("includeOptionalHeaders", "true"));

        msgCtxt = cfgCtx.createMessageContext();
        msgCtxt.setEnvelope(OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope());
        msgCtxt.setTo(new EndpointReference("http://www.to.org/service/"));
        msgCtxt.setFrom(new EndpointReference("http://www.from.org/service/"));
        msgCtxt.setReplyTo(new EndpointReference("http://www.replyTo.org/service/"));
        msgCtxt.setFaultTo(new EndpointReference("http://www.faultTo.org/service/"));
View Full Code Here

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

        // overridden by target\classes\META-INF\module.xml, so create our own
        // AxisModule with the required parameter value
        AxisModule module = config.getModule("addressing");
        module.addParameter(new Parameter("includeOptionalHeaders", "false"));
       
        msgCtxt = cfgCtx.createMessageContext();
        msgCtxt.setEnvelope(OMAbstractFactory.getSOAP11Factory().getDefaultEnvelope());
        msgCtxt.setTo(new EndpointReference("http://www.to.org/service/"));
        msgCtxt.setFrom(new EndpointReference("http://www.from.org/service/"));
        msgCtxt.setReplyTo(new EndpointReference("http://www.replyTo.org/service/"));
        msgCtxt.setFaultTo(new EndpointReference("http://www.faultTo.org/service/"));
View Full Code Here

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

    //setup a typical message context - for this we will also need a config context
    String repoPath = "target" + File.separator + "repos" + File.separator + "client";
    String axis2_xml = "target" + File.separator + "repos" + File.separator + "client" + File.separator + "client_axis2.xml";
   
    ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(repoPath,axis2_xml);
    expectedMessageContext = configContext.createMessageContext();
    expectedMessageContext.setFrom(epr);
    expectedMessageContext.setMessageID("someMessageID");
    expectedMessageContext.setReplyTo(epr);
  }
 
View Full Code Here

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

    }

    public void testHeaderCreationFromMsgCtxtInformation() throws Exception {
        ConfigurationContext cfgCtx =
                ConfigurationContextFactory.createDefaultConfigurationContext();
        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

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

    }

    public void testMustUnderstandSupport() throws Exception {
        ConfigurationContext cfgCtx =
                ConfigurationContextFactory.createDefaultConfigurationContext();
        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

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

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

        msgCtxt.addRelatesTo(reply);
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.