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

Examples of org.apache.axiom.soap.impl.dom.soap12.SOAP12FaultDetailImpl


    public SOAPMessage createMessage() throws SOAPException {
        SOAPEnvelopeImpl soapEnvelope;
        if (soapVersion.equals(SOAPConstants.SOAP_1_2_PROTOCOL)) {
            soapEnvelope =
                    new SOAPEnvelopeImpl((org.apache.axiom.soap.impl.dom.SOAPEnvelopeImpl)
                            new SOAP12Factory().getDefaultEnvelope());
        } else if (soapVersion.equals(SOAPConstants.DYNAMIC_SOAP_PROTOCOL)) {
            throw new UnsupportedOperationException("createMessage() is not supported for " +
                    "DYNAMIC_SOAP_PROTOCOL");
        } else {
            //SOAP 1.1
View Full Code Here


        SOAPFactory soapFactory;
        if (this.element.getOMFactory() instanceof SOAP11Factory) {
            soapFactory = new SOAP11Factory();
            omNamespace = soapFactory.createOMNamespace(qname.getNamespaceURI(), qname.getPrefix());
        } else if (this.element.getOMFactory() instanceof SOAP12Factory) {
            soapFactory = new SOAP12Factory();
            omNamespace = soapFactory.createOMNamespace(qname.getNamespaceURI(), qname.getPrefix());
        }
        this.element.addAttribute(qname.getLocalPart(), value, omNamespace);
        return this;
    }
View Full Code Here

                SOAPFactory factory;
                if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(soapEnvelopeNamespaceURI)) {
                    factory = new SOAP11Factory();
                } else {
                    factory = new SOAP12Factory();
                }
                if (attachments.getAttachmentSpecType().equals(
                        MTOMConstants.MTOM_TYPE)) {
                    //Creates the MTOM specific MTOMStAXSOAPModelBuilder
                    builder = new MTOMStAXSOAPModelBuilder(streamReader,
                                                           factory,
                                                           attachments,
                                                           soapEnvelopeNamespaceURI);
                } else if (attachments.getAttachmentSpecType().equals(
                        MTOMConstants.SWA_TYPE)) {
                    builder = new StAXSOAPModelBuilder(streamReader,
                                                       factory,
                                                       soapEnvelopeNamespaceURI);
                } else if (attachments.getAttachmentSpecType().equals(
                        MTOMConstants.SWA_TYPE_12)) {
                    builder = new StAXSOAPModelBuilder(streamReader,
                                                       factory,
                                                       soapEnvelopeNamespaceURI);
                }

            } catch (Exception e) {
                throw new SOAPException(e);
            }
        } else {
            modifiedInputStream = inputStream;
            try {
                isReader = new InputStreamReader(modifiedInputStream);

                if (HTTPConstants.MEDIA_TYPE_TEXT_XML.equals(contentType)) {
                    builder = new StAXSOAPModelBuilder(StAXUtils.createXMLStreamReader(isReader),
                                                       new SOAP11Factory(),
                                                       SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);

                } else if (HTTPConstants.MEDIA_TYPE_APPLICATION_SOAP_XML.equals(contentType)) {
                    builder = new StAXSOAPModelBuilder(StAXUtils.createXMLStreamReader(isReader),
                                                       new SOAP12Factory(),
                                                       SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);

                } else if (HTTPConstants.MEDIA_TYPE_MULTIPART_RELATED.equals(contentType)) {
                    builder = new StAXSOAPModelBuilder(StAXUtils.createXMLStreamReader(isReader),
                                                       new SOAP11Factory(),
View Full Code Here

    public SOAPFactory getSOAP11Factory() {
        return new SOAP11Factory();
    }

    public SOAPFactory getSOAP12Factory() {
        return new SOAP12Factory();
    }
View Full Code Here

        SOAPFactory factory = (SOAPFactory)this.element.getOMFactory();
        if (factory instanceof SOAP11Factory) {
            omDetail = new SOAP11FaultDetailImpl(this.fault,
                                                 factory);
        } else {
            omDetail = new SOAP12FaultDetailImpl(this.fault,
                                                 factory);
        }
        Detail saajDetail = new DetailImpl(omDetail);
        ((NodeImpl)fault.getDetail()).setUserData(SAAJ_NODE, saajDetail, null);
        isDetailAdded = true;
View Full Code Here

        SOAPFactory factory = (SOAPFactory)this.element.getOMFactory();
        if (factory instanceof SOAP11Factory) {
            omDetail = new SOAP11FaultDetailImpl(this.fault,
                                                 factory);
        } else {
            omDetail = new SOAP12FaultDetailImpl(this.fault,
                                                 factory);
        }
        Detail saajDetail = new DetailImpl(omDetail);
        ((NodeImpl)fault.getDetail()).setUserData(SAAJ_NODE, saajDetail, null);
        isDetailAdded = true;
View Full Code Here

        SOAPFactory factory = (SOAPFactory)this.element.getOMFactory();
        if (factory instanceof SOAP11Factory) {
            omDetail = new SOAP11FaultDetailImpl(this.fault,
                                                 factory);
        } else {
            omDetail = new SOAP12FaultDetailImpl(this.fault,
                                                 factory);
        }
        Detail saajDetail = new DetailImpl(omDetail);
        ((NodeImpl)fault.getDetail()).setUserData(SAAJ_NODE, saajDetail, null);
        isDetailAdded = true;
View Full Code Here

    public SOAPFault createSOAPFault(SOAPBody parent, Exception e) throws SOAPProcessingException {
        throw new UnsupportedOperationException();
    }

    public SOAPFault createSOAPFault(SOAPBody parent) throws SOAPProcessingException {
        return new SOAP12FaultImpl(parent, this);
    }
View Full Code Here

        if (this.element.getOMFactory() instanceof SOAP11Factory) {
            SOAP11FaultImpl fault =
                    new SOAP11FaultImpl(omSOAPBody, (SOAPFactory)this.element.getOMFactory());
            saajSOAPFault = new SOAPFaultImpl(fault);
        } else if (this.element.getOMFactory() instanceof SOAP12Factory) {
            SOAP12FaultImpl fault =
                    new SOAP12FaultImpl(omSOAPBody, (SOAPFactory)this.element.getOMFactory());
            saajSOAPFault = new SOAPFaultImpl(fault);
        }
        // set default fault code and string
        saajSOAPFault.setDefaults();
       
View Full Code Here

        org.apache.axiom.soap.SOAPFault fault;
        if (this.element.getOMFactory() instanceof SOAP11Factory) {
            fault = new SOAP11FaultImpl(omSOAPBody, new Exception(
                    faultString), (SOAPFactory)this.element.getOMFactory());
        } else {
            fault = new SOAP12FaultImpl(omSOAPBody, new Exception(
                    faultString), (SOAPFactory)this.element.getOMFactory());
        }
        SOAPFaultImpl faultImpl = new SOAPFaultImpl(fault);
        faultImpl.setFaultCode(faultCode);
View Full Code Here

TOP

Related Classes of org.apache.axiom.soap.impl.dom.soap12.SOAP12FaultDetailImpl

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.