Java Code Examples for com.sun.xml.internal.messaging.saaj.soap.name.NameImpl#create()

The following examples show how to use com.sun.xml.internal.messaging.saaj.soap.name.NameImpl#create() . 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-backup with GNU General Public License v2.0 6 votes vote down vote up
public Name createName(String localName, String prefix, String uri)
    throws SOAPException {

    // validating parameters before passing them on
    // to make sure that the namespace specification rules are followed

    // reserved xmlns prefix cannot be used.
    if ("xmlns".equals(prefix)) {
        log.severe("SAAJ0123.impl.no.reserved.xmlns");
        throw new SOAPExceptionImpl("Cannot declare reserved xmlns prefix");
    }
    // Qualified name cannot be xmlns.
    if ((prefix == null) && ("xmlns".equals(localName))) {
        log.severe("SAAJ0124.impl.qualified.name.cannot.be.xmlns");
        throw new SOAPExceptionImpl("Qualified name cannot be xmlns");
    }

    return NameImpl.create(localName, prefix, uri);
}
 
Example 2
Source File: ElementImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
protected SOAPElement circumventBug5034339(SOAPElement element) {

        Name elementName = element.getElementName();
        if (!isNamespaceQualified(elementName)) {
            String prefix = elementName.getPrefix();
            String defaultNamespace = getNamespaceURI(prefix);
            if (defaultNamespace != null) {
                Name newElementName =
                    NameImpl.create(
                        elementName.getLocalName(),
                        elementName.getPrefix(),
                        defaultNamespace);
                SOAPElement newElement = createElement(newElementName);
                replaceChild(newElement, element);
                return newElement;
            }
        }
        return element;
    }
 
Example 3
Source File: EnvelopeImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public Name createName(String localName, String prefix)
    throws SOAPException {
    String namespace = getNamespaceURI(prefix);
    if (namespace == null) {
        log.log(
            Level.SEVERE,
            "SAAJ0126.impl.cannot.locate.ns",
            new String[] { prefix });
        throw new SOAPExceptionImpl(
            "Unable to locate namespace for prefix " + prefix);
    }
    return NameImpl.create(localName, prefix, namespace);
}
 
Example 4
Source File: SOAPFactoryImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public Name createName(String localName, String prefix, String uri)
    throws SOAPException {
    // @since SAAJ 1.3
    // if localName==null, earlier impl would create Name with localName=""
    // which is absurd.
    if (localName == null) {
        log.log(
             Level.SEVERE,"SAAJ0567.soap.null.input",
             new Object[] {"localName","SOAPFactory.createName"});
        throw new SOAPException("Null localName argument passed to createName");
    }
    return NameImpl.create(localName, prefix, uri);
}
 
Example 5
Source File: ElementImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
protected void setEncodingStyleNamespace(
    String soapNamespace,
    String soapNamespacePrefix)
    throws SOAPException {
    Name encodingStyleAttributeName =
        NameImpl.create(
            "encodingStyle",
            soapNamespacePrefix,
            soapNamespace);
    encodingStyleAttribute.setName(encodingStyleAttributeName);
}
 
Example 6
Source File: Header1_1Impl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
protected NameImpl getSupportedEnvelopeName() {
    return NameImpl.create(
        "SupportedEnvelope",
        getPrefix(),
        SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE);
}
 
Example 7
Source File: SOAPFactoryImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public Name createName(String localName, String prefix, String uri)
    throws SOAPException {
    // @since SAAJ 1.3
    // if localName==null, earlier impl would create Name with localName=""
    // which is absurd.
    if (localName == null) {
        log.log(
             Level.SEVERE,"SAAJ0567.soap.null.input",
             new Object[] {"localName","SOAPFactory.createName"});
        throw new SOAPException("Null localName argument passed to createName");
    }
    return NameImpl.create(localName, prefix, uri);
}
 
Example 8
Source File: SOAPFactoryImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public Name createName(String localName, String prefix, String uri)
    throws SOAPException {
    // @since SAAJ 1.3
    // if localName==null, earlier impl would create Name with localName=""
    // which is absurd.
    if (localName == null) {
        log.log(
             Level.SEVERE,"SAAJ0567.soap.null.input",
             new Object[] {"localName","SOAPFactory.createName"});
        throw new SOAPException("Null localName argument passed to createName");
    }
    return NameImpl.create(localName, prefix, uri);
}
 
Example 9
Source File: ElementImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
protected void setEncodingStyleNamespace(
    String soapNamespace,
    String soapNamespacePrefix)
    throws SOAPException {
    Name encodingStyleAttributeName =
        NameImpl.create(
            "encodingStyle",
            soapNamespacePrefix,
            soapNamespace);
    encodingStyleAttribute.setName(encodingStyleAttributeName);
}
 
Example 10
Source File: ElementImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
protected void setEncodingStyleNamespace(
    String soapNamespace,
    String soapNamespacePrefix)
    throws SOAPException {
    Name encodingStyleAttributeName =
        NameImpl.create(
            "encodingStyle",
            soapNamespacePrefix,
            soapNamespace);
    encodingStyleAttribute.setName(encodingStyleAttributeName);
}
 
Example 11
Source File: ElementImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
protected void setEncodingStyleNamespace(
    String soapNamespace,
    String soapNamespacePrefix)
    throws SOAPException {
    Name encodingStyleAttributeName =
        NameImpl.create(
            "encodingStyle",
            soapNamespacePrefix,
            soapNamespace);
    encodingStyleAttribute.setName(encodingStyleAttributeName);
}
 
Example 12
Source File: HeaderElement1_1Impl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
protected NameImpl getMustunderstandAttributeName() {
    return NameImpl.create("mustUnderstand", null, NameImpl.SOAP11_NAMESPACE);
}
 
Example 13
Source File: HeaderElement1_1Impl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
protected NameImpl getMustunderstandAttributeName() {
    return NameImpl.create("mustUnderstand", null, NameImpl.SOAP11_NAMESPACE);
}
 
Example 14
Source File: HeaderElement1_1Impl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
protected NameImpl getMustunderstandAttributeName() {
    return NameImpl.create("mustUnderstand", null, NameImpl.SOAP11_NAMESPACE);
}
 
Example 15
Source File: HeaderElement1_2Impl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
protected NameImpl getRelayAttributeName() {
    return NameImpl.create("relay", null, NameImpl.SOAP12_NAMESPACE);
}
 
Example 16
Source File: Header1_1Impl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
protected NameImpl getSupportedEnvelopeName() {
    return NameImpl.create(
        "SupportedEnvelope",
        getPrefix(),
        SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE);
}
 
Example 17
Source File: HeaderElement1_1Impl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
protected NameImpl getMustunderstandAttributeName() {
    return NameImpl.create("mustUnderstand", null, NameImpl.SOAP11_NAMESPACE);
}
 
Example 18
Source File: HeaderElement1_1Impl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
protected NameImpl getActorAttributeName() {
    return NameImpl.create("actor", null, NameImpl.SOAP11_NAMESPACE);
}
 
Example 19
Source File: HeaderElement1_2Impl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
protected NameImpl getRoleAttributeName() {
    return NameImpl.create("role", null, NameImpl.SOAP12_NAMESPACE);
}
 
Example 20
Source File: Header1_1Impl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
protected NameImpl getSupportedEnvelopeName() {
    return NameImpl.create(
        "SupportedEnvelope",
        getPrefix(),
        SOAPConstants.URI_NS_SOAP_1_1_ENVELOPE);
}