com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl Java Examples

The following examples show how to use com.sun.xml.internal.messaging.saaj.soap.SOAPDocumentImpl. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EnvelopeImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
protected EnvelopeImpl(
    SOAPDocumentImpl ownerDoc,
    NameImpl name,
    boolean createHeader,
    boolean createBody)
    throws SOAPException {
    this(ownerDoc, name);

    ensureNamespaceIsDeclared(
        getElementQName().getPrefix(), getElementQName().getNamespaceURI());

    // XXX
    if (createHeader)
        addHeader();

    if (createBody)
        addBody();
}
 
Example #2
Source File: ElementImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public ElementImpl(
    SOAPDocumentImpl ownerDoc,
    String uri,
    String qualifiedName) {

    super(ownerDoc, uri, qualifiedName);
    elementQName =
        new QName(uri, getLocalPart(qualifiedName), getPrefix(qualifiedName));
}
 
Example #3
Source File: Envelope1_1Impl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
Envelope1_1Impl(
    SOAPDocumentImpl ownerDoc,
    String prefix,
    boolean createHeader,
    boolean createBody)
    throws SOAPException {
    super(
        ownerDoc,
        NameImpl.createEnvelope1_1Name(prefix),
        createHeader,
        createBody);
}
 
Example #4
Source File: FaultElement1_1Impl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public SOAPElement setElementQName(QName newName) throws SOAPException {
    if (!isStandardFaultElement()) {
        FaultElement1_1Impl copy =
            new FaultElement1_1Impl((SOAPDocumentImpl) getOwnerDocument(), newName);
        return replaceElementWithSOAPElement(this,copy);
    } else {
        return super.setElementQName(newName);
    }
}
 
Example #5
Source File: Envelope1_2Impl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public Envelope1_2Impl(
    SOAPDocumentImpl ownerDoc,
    String prefix,
    boolean createHeader,
    boolean createBody)
    throws SOAPException {
    super(
        ownerDoc,
        NameImpl.createEnvelope1_2Name(prefix),
        createHeader,
        createBody);
}
 
Example #6
Source File: ElementImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public ElementImpl(SOAPDocumentImpl ownerDoc, Name name) {
    super(
        ownerDoc,
        name.getURI(),
        name.getQualifiedName(),
        name.getLocalName());
    elementQName = NameImpl.convertToQName(name);
}
 
Example #7
Source File: ElementImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public ElementImpl(SOAPDocumentImpl ownerDoc, QName name) {
    super(
        ownerDoc,
        name.getNamespaceURI(),
        getQualifiedName(name),
        name.getLocalPart());
    elementQName = name;
}
 
Example #8
Source File: ElementImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public ElementImpl(
    SOAPDocumentImpl ownerDoc,
    String uri,
    String qualifiedName) {

    super(ownerDoc, uri, qualifiedName);
    elementQName =
        new QName(uri, getLocalPart(qualifiedName), getPrefix(qualifiedName));
}
 
Example #9
Source File: ElementImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public ElementImpl(SOAPDocumentImpl ownerDoc, QName name) {
    super(
        ownerDoc,
        name.getNamespaceURI(),
        getQualifiedName(name),
        name.getLocalPart());
    elementQName = name;
}
 
Example #10
Source File: ElementFactory.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static SOAPElement createElement(
    SOAPDocumentImpl ownerDocument,
    Name name) {
    return createElement(
        ownerDocument,
        name.getLocalName(),
        name.getPrefix(),
        name.getURI());
}
 
Example #11
Source File: FaultElement1_1Impl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public SOAPElement setElementQName(QName newName) throws SOAPException {
    if (!isStandardFaultElement()) {
        FaultElement1_1Impl copy =
            new FaultElement1_1Impl((SOAPDocumentImpl) getOwnerDocument(), newName);
        return replaceElementWithSOAPElement(this,copy);
    } else {
        return super.setElementQName(newName);
    }
}
 
Example #12
Source File: ElementImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public ElementImpl(SOAPDocumentImpl ownerDoc, QName name) {
    super(
        ownerDoc,
        name.getNamespaceURI(),
        getQualifiedName(name),
        name.getLocalPart());
    elementQName = name;
}
 
Example #13
Source File: Envelope1_2Impl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public Envelope1_2Impl(
    SOAPDocumentImpl ownerDoc,
    String prefix,
    boolean createHeader,
    boolean createBody)
    throws SOAPException {
    super(
        ownerDoc,
        NameImpl.createEnvelope1_2Name(prefix),
        createHeader,
        createBody);
}
 
Example #14
Source File: ElementFactory.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static SOAPElement createElement(
    SOAPDocumentImpl ownerDocument,
    Name name) {
    return createElement(
        ownerDocument,
        name.getLocalName(),
        name.getPrefix(),
        name.getURI());
}
 
Example #15
Source File: FaultElement1_2Impl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public SOAPElement setElementQName(QName newName) throws SOAPException {
    if (!isStandardFaultElement()) {
        FaultElement1_2Impl copy =
            new FaultElement1_2Impl((SOAPDocumentImpl) getOwnerDocument(), newName);
        return replaceElementWithSOAPElement(this,copy);
    } else {
        return super.setElementQName(newName);
    }
}
 
Example #16
Source File: Envelope1_2Impl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public Envelope1_2Impl(
    SOAPDocumentImpl ownerDoc,
    String prefix,
    boolean createHeader,
    boolean createBody)
    throws SOAPException {
    super(
        ownerDoc,
        NameImpl.createEnvelope1_2Name(prefix),
        createHeader,
        createBody);
}
 
Example #17
Source File: ElementFactory.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static SOAPElement createElement(
    SOAPDocumentImpl ownerDocument,
    QName name) {
    return createElement(
        ownerDocument,
        name.getLocalPart(),
        name.getPrefix(),
        name.getNamespaceURI());
}
 
Example #18
Source File: ElementFactory.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static SOAPElement createElement(
    SOAPDocumentImpl ownerDocument,
    QName name) {
    return createElement(
        ownerDocument,
        name.getLocalPart(),
        name.getPrefix(),
        name.getNamespaceURI());
}
 
Example #19
Source File: Fault1_2Impl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Fault1_2Impl(SOAPDocumentImpl ownerDocument, String prefix) {
    super(ownerDocument, NameImpl.createFault1_2Name(null, prefix));
}
 
Example #20
Source File: CommentImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public CommentImpl(SOAPDocumentImpl ownerDoc, String text) {
    super(ownerDoc, text);
}
 
Example #21
Source File: Header1_2Impl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Header1_2Impl(SOAPDocumentImpl ownerDocument, String prefix) {
    super(ownerDocument, NameImpl.createHeader1_2Name(prefix));
}
 
Example #22
Source File: ElementFactory.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public static SOAPElement createNamedElement(
        SOAPDocumentImpl ownerDocument,
        String localName,
        String prefix,
        String namespaceUri) {

        if (prefix == null) {
            prefix = NameImpl.SOAP_ENVELOPE_PREFIX;
        }

        if (localName.equalsIgnoreCase("Envelope")) {
            if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) {
                return new Envelope1_1Impl(ownerDocument, prefix);
            } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) {
                return new Envelope1_2Impl(ownerDocument, prefix);
            }
        }
        if (localName.equalsIgnoreCase("Body")) {
            if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) {
                return new Body1_1Impl(ownerDocument, prefix);
            } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) {
                return new Body1_2Impl(ownerDocument, prefix);
            }
        }
        if (localName.equalsIgnoreCase("Header")) {
            if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) {
                return new Header1_1Impl(ownerDocument, prefix);
            } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) {
                return new Header1_2Impl(ownerDocument, prefix);
            }
        }
        if (localName.equalsIgnoreCase("Fault")) {
            SOAPFault fault = null;
            if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) {
                fault = new Fault1_1Impl(ownerDocument, prefix);
            } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) {
                fault = new Fault1_2Impl(ownerDocument, prefix);
            }

            if (fault != null) {
//                try {
//                    fault.addNamespaceDeclaration(
//                        NameImpl.SOAP_ENVELOPE_PREFIX,
//                        SOAPConstants.URI_NS_SOAP_ENVELOPE);
//                    fault.setFaultCode(
//                        NameImpl.create(
//                            "Server",
//                            NameImpl.SOAP_ENVELOPE_PREFIX,
//                            SOAPConstants.URI_NS_SOAP_ENVELOPE));
//                    fault.setFaultString(
//                        "Fault string, and possibly fault code, not set");
//                } catch (SOAPException e) {
//                }
                return fault;
            }

        }
        if (localName.equalsIgnoreCase("Detail")) {
            if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) {
                return new Detail1_1Impl(ownerDocument, prefix);
            } else if (NameImpl.SOAP12_NAMESPACE.equals(namespaceUri)) {
                return new Detail1_2Impl(ownerDocument, prefix);
            }
        }
        if (localName.equalsIgnoreCase("faultcode")
            || localName.equalsIgnoreCase("faultstring")
            || localName.equalsIgnoreCase("faultactor")) {
            // SOAP 1.2 does not have fault(code/string/actor)
            // So there is no else case required
            if (NameImpl.SOAP11_NAMESPACE.equals(namespaceUri)) {
                return new FaultElement1_1Impl(ownerDocument,
                                               localName,
                                               prefix);
            }
        }

        return null;
    }
 
Example #23
Source File: FaultElement1_1Impl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public FaultElement1_1Impl(SOAPDocumentImpl ownerDoc, NameImpl qname) {
    super(ownerDoc, qname);
}
 
Example #24
Source File: DetailEntryImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public DetailEntryImpl(SOAPDocumentImpl ownerDoc, QName qname) {
    super(ownerDoc, qname);
}
 
Example #25
Source File: FaultElement1_2Impl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public FaultElement1_2Impl(SOAPDocumentImpl ownerDoc, String localName) {
    super(ownerDoc, NameImpl.createSOAP12Name(localName));
}
 
Example #26
Source File: FaultElementImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
protected FaultElementImpl(SOAPDocumentImpl ownerDoc, QName qname) {
    super(ownerDoc, qname);
}
 
Example #27
Source File: FaultElement1_2Impl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public FaultElement1_2Impl(SOAPDocumentImpl ownerDoc, QName qname) {
    super(ownerDoc, qname);
}
 
Example #28
Source File: HeaderElementImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public HeaderElementImpl(SOAPDocumentImpl ownerDoc, Name qname) {
    super(ownerDoc, qname);
}
 
Example #29
Source File: HeaderElement1_2Impl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public HeaderElement1_2Impl(SOAPDocumentImpl ownerDoc, Name qname) {
    super(ownerDoc, qname);
}
 
Example #30
Source File: FaultElement1_2Impl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public FaultElement1_2Impl(SOAPDocumentImpl ownerDoc, NameImpl qname) {
    super(ownerDoc, qname);
}