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

Examples of org.apache.axiom.soap.impl.llom.soap11.SOAP11Factory


                                testFile));
        rootElement = stAXOMBuilder.getDocumentElement();
    }

    public void testWithCashAndBuild() throws Exception {
        SOAPFactory soapFactory = new SOAP11Factory();
        SOAPEnvelope envelope = soapFactory.getDefaultEnvelope();
        envelope.getBody().addChild(rootElement);
        envelope.getBody().getFirstElement().getXMLStreamReaderWithoutCaching();
    }
View Full Code Here


public abstract class CommandBuilderTestUtils {

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

        return messageContext;
    }

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

                responseMsgCtx.setServerSide(true);
            } else {
                // there is no response entity-body
                responseMsgCtx.setProperty(RelayConstants.NO_ENTITY_BODY, Boolean.TRUE);
                responseMsgCtx.setEnvelope(new SOAP11Factory().getDefaultEnvelope());
            }

            // copy the HTTP status code as a message context property with the key HTTP_SC to be
            // used at the sender to set the proper status code when passing the message
            int statusCode = this.response.getStatus();
View Full Code Here

public abstract class CommandBuilderTestUtils {

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

        return messageContext;
    }

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

        msgContext.setServerSide(true);
        msgContext.setDoingREST(true);
        msgContext.setProperty(RelayConstants.NO_ENTITY_BODY, Boolean.TRUE);

        try {
            msgContext.setEnvelope(new SOAP11Factory().getDefaultEnvelope());

            AxisEngine.receive(msgContext);
        } catch (AxisFault axisFault) {
            handleException("Error processing " + request.getMethod() +
                " request for : " + request.getUri(), axisFault);
View Full Code Here

public abstract class CommandBuilderTestUtils {

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

        return messageContext;
    }

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

                    log.warn(errorMessage);
                    if (log.isDebugEnabled()) {
                        log.debug(errorMessage, e);
                        log.debug("Creating the SOAPFault to be injected...");
                    }
                    SOAPFactory factory = new SOAP11Factory();
                    envelope = factory.getDefaultFaultEnvelope();
                    SOAPFaultDetail detail = factory.createSOAPFaultDetail();
                    detail.setText(errorMessage);
                    envelope.getBody().getFault().setDetail(detail);
                    SOAPFaultReason reason = factory.createSOAPFaultReason();
                    reason.setText(errorMessage);
                    envelope.getBody().getFault().setReason(reason);
                    SOAPFaultCode code = factory.createSOAPFaultCode();
                    code.setText(Integer.toString(this.response.getStatusLine().getStatusCode()));
                    envelope.getBody().getFault().setCode(code);
                }
                responseMsgCtx.setServerSide(true);
                responseMsgCtx.setEnvelope(envelope);

            } else {
                // there is no response entity-body
                responseMsgCtx.setProperty(NhttpConstants.NO_ENTITY_BODY, Boolean.TRUE);
                responseMsgCtx.setEnvelope(new SOAP11Factory().getDefaultEnvelope());
            }

            // copy the HTTP status code as a message context property with the key HTTP_SC to be
            // used at the sender to set the propper status code when passing the message
            int statusCode = this.response.getStatusLine().getStatusCode();
View Full Code Here

TOP

Related Classes of org.apache.axiom.soap.impl.llom.soap11.SOAP11Factory

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.