Package org.apache.axiom.soap.impl.llom.soap12

Examples of org.apache.axiom.soap.impl.llom.soap12.SOAP12Factory


                                                      OMElement topic,
                                                      int tenantId) throws EventBrokerException {
        MessageContext mc = new MessageContext();
        mc.setConfigurationContext(new ConfigurationContext(new AxisConfiguration()));
        SuperTenantCarbonContext.getCurrentContext(mc).setTenantId(tenantId);
        SOAPFactory soapFactory = new SOAP12Factory();
        SOAPEnvelope envelope = soapFactory.getDefaultEnvelope();
        envelope.getBody().addChild(payload);
        if (topic != null) {
            envelope.getHeader().addChild(topic);
        }
        try {
View Full Code Here


        return messageContext;
    }

    public static MessageContext getMCWithSOAP12Envelope() throws AxisFault {
        MessageContext messageContext = new MessageContext();
        SOAPFactory factory = new SOAP12Factory();
        SOAPEnvelope envelope = factory.createSOAPEnvelope();
        messageContext.setEnvelope(envelope);
        return messageContext;
    }
View Full Code Here

                ele.getXMLStreamReader()).getSOAPEnvelope();
    }

    public static SOAPEnvelope payloadToSOAP12Envelope(String payload) throws XMLStreamException {
        OMElement ele = AXIOMUtil.stringToOM(payload);
        SOAPFactory factory = new SOAP12Factory();
        return OMXMLBuilderFactory.createStAXSOAPModelBuilder(factory,
                ele.getXMLStreamReader()).getSOAPEnvelope();
    }
View Full Code Here

                                                      OMElement topic,
                                                      int tenantId) throws EventBrokerException {
        MessageContext mc = new MessageContext();
        mc.setConfigurationContext(new ConfigurationContext(new AxisConfiguration()));
        SuperTenantCarbonContext.getCurrentContext(mc).setTenantId(tenantId);
        SOAPFactory soapFactory = new SOAP12Factory();
        SOAPEnvelope envelope = soapFactory.getDefaultEnvelope();
        envelope.getBody().addChild(payload);
        if (topic != null) {
            envelope.getHeader().addChild(topic);
        }
        try {
View Full Code Here

                        responseMsgCtx.setOperationContext(outMsgCtx.getOperationContext());
                        responseMsgCtx.setConfigurationContext(outMsgCtx.getConfigurationContext());
                        responseMsgCtx.setTo(null);

                        if (!outMsgCtx.isDoingREST() && !outMsgCtx.isSOAP11()) {
                            responseMsgCtx.setEnvelope(new SOAP12Factory().getDefaultEnvelope());
                        } else {
                            responseMsgCtx.setEnvelope(new SOAP11Factory().getDefaultEnvelope());
                        }
                        responseMsgCtx.setProperty(AddressingConstants.
                                DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
View Full Code Here

        } else {
            msgReceiver = new DBInOnlyMessageReceiver();
        }

        MessageContext msgCtx = buildMessageContext(opName);
        SOAPFactory soapFactory = new SOAP12Factory();
        SOAPEnvelope env = soapFactory.getDefaultEnvelope();
        env.getBody().addChild(soapBody);
        msgCtx.setEnvelope(env);

        OMElement bodyEle = null;
View Full Code Here

        if (brokerService != null) {
            dummyReceiver.setBrokerService(brokerService);
        }
        MessageContext mc = new MessageContext();
        SuperTenantCarbonContext.getCurrentContext(mc).setTenantId(tenantId);
        SOAPFactory soapFactory = new SOAP12Factory();
        SOAPEnvelope envelope = soapFactory.getDefaultEnvelope();
        envelope.getBody().addChild(payload);
        if (topic != null) {
            envelope.getHeader().addChild(topic);
        }
        try {
View Full Code Here

            throw AxisFault.makeFault(e);
        } catch (FactoryConfigurationError e) {
            throw AxisFault.makeFault(e);
        } finally {
            if ((msgContext.getEnvelope() == null) && soapVersion != VERSION_SOAP11) {
                msgContext.setEnvelope(new SOAP12Factory().getDefaultEnvelope());
            }
        }
    }
View Full Code Here

    private static SOAPFactory _getFactory(Protocol protocol) {
        SOAPFactory soapFactory;
        if (protocol == Protocol.soap11) {
            soapFactory = new SOAP11Factory();
        } else if (protocol == Protocol.soap12) {
            soapFactory = new SOAP12Factory();
        } else if (protocol == Protocol.rest) {
            // For REST, create a SOAP 1.1 Envelope to contain the message
            // This is consistent with Axis2.
            soapFactory = new SOAP11Factory();
        } else {
View Full Code Here

          "http://docs.oasis-open.org/ws-rx/wsrm/200702/SequenceAcknowledgement", soap12);

   
    SOAPFactory factory = null;
    if(soap12){
      factory = new SOAP12Factory();
    }
    else{
      factory = new SOAP11Factory();
    }
   
View Full Code Here

TOP

Related Classes of org.apache.axiom.soap.impl.llom.soap12.SOAP12Factory

Copyright © 2018 www.massapicom. 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.