Java Code Examples for com.sun.xml.internal.messaging.saaj.soap.name.NameImpl#createFromQualifiedName()
The following examples show how to use
com.sun.xml.internal.messaging.saaj.soap.name.NameImpl#createFromQualifiedName() .
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: Fault1_1Impl.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public Name getFaultCodeAsName() { String faultcodeString = getFaultCode(); if (faultcodeString == null) { return null; } int prefixIndex = faultcodeString.indexOf(':'); if (prefixIndex == -1) { // Not a valid SOAP message, but we return the unqualified name // anyway since some apps do not strictly conform to SOAP // specs. A message that does not contain a <faultcode> // element itself is also not valid in which case we return // null instead of throwing an exception so this is consistent. return NameImpl.createFromUnqualifiedName(faultcodeString); } // Get the prefix and map it to a namespace name (AKA namespace URI) String prefix = faultcodeString.substring(0, prefixIndex); if (this.faultCodeElement == null) findFaultCodeElement(); String nsName = this.faultCodeElement.getNamespaceURI(prefix); return NameImpl.createFromQualifiedName(faultcodeString, nsName); }
Example 2
Source File: Fault1_1Impl.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public Name getFaultCodeAsName() { String faultcodeString = getFaultCode(); if (faultcodeString == null) { return null; } int prefixIndex = faultcodeString.indexOf(':'); if (prefixIndex == -1) { // Not a valid SOAP message, but we return the unqualified name // anyway since some apps do not strictly conform to SOAP // specs. A message that does not contain a <faultcode> // element itself is also not valid in which case we return // null instead of throwing an exception so this is consistent. return NameImpl.createFromUnqualifiedName(faultcodeString); } // Get the prefix and map it to a namespace name (AKA namespace URI) String prefix = faultcodeString.substring(0, prefixIndex); if (this.faultCodeElement == null) findFaultCodeElement(); String nsName = this.faultCodeElement.getNamespaceURI(prefix); return NameImpl.createFromQualifiedName(faultcodeString, nsName); }
Example 3
Source File: Fault1_1Impl.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public Name getFaultCodeAsName() { String faultcodeString = getFaultCode(); if (faultcodeString == null) { return null; } int prefixIndex = faultcodeString.indexOf(':'); if (prefixIndex == -1) { // Not a valid SOAP message, but we return the unqualified name // anyway since some apps do not strictly conform to SOAP // specs. A message that does not contain a <faultcode> // element itself is also not valid in which case we return // null instead of throwing an exception so this is consistent. return NameImpl.createFromUnqualifiedName(faultcodeString); } // Get the prefix and map it to a namespace name (AKA namespace URI) String prefix = faultcodeString.substring(0, prefixIndex); if (this.faultCodeElement == null) findFaultCodeElement(); String nsName = this.faultCodeElement.getNamespaceURI(prefix); return NameImpl.createFromQualifiedName(faultcodeString, nsName); }
Example 4
Source File: Fault1_1Impl.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public Name getFaultCodeAsName() { String faultcodeString = getFaultCode(); if (faultcodeString == null) { return null; } int prefixIndex = faultcodeString.indexOf(':'); if (prefixIndex == -1) { // Not a valid SOAP message, but we return the unqualified name // anyway since some apps do not strictly conform to SOAP // specs. A message that does not contain a <faultcode> // element itself is also not valid in which case we return // null instead of throwing an exception so this is consistent. return NameImpl.createFromUnqualifiedName(faultcodeString); } // Get the prefix and map it to a namespace name (AKA namespace URI) String prefix = faultcodeString.substring(0, prefixIndex); if (this.faultCodeElement == null) findFaultCodeElement(); String nsName = this.faultCodeElement.getNamespaceURI(prefix); return NameImpl.createFromQualifiedName(faultcodeString, nsName); }
Example 5
Source File: Fault1_1Impl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public Name getFaultCodeAsName() { String faultcodeString = getFaultCode(); if (faultcodeString == null) { return null; } int prefixIndex = faultcodeString.indexOf(':'); if (prefixIndex == -1) { // Not a valid SOAP message, but we return the unqualified name // anyway since some apps do not strictly conform to SOAP // specs. A message that does not contain a <faultcode> // element itself is also not valid in which case we return // null instead of throwing an exception so this is consistent. return NameImpl.createFromUnqualifiedName(faultcodeString); } // Get the prefix and map it to a namespace name (AKA namespace URI) String prefix = faultcodeString.substring(0, prefixIndex); if (this.faultCodeElement == null) findFaultCodeElement(); String nsName = this.faultCodeElement.getNamespaceURI(prefix); return NameImpl.createFromQualifiedName(faultcodeString, nsName); }
Example 6
Source File: Fault1_1Impl.java From hottub with GNU General Public License v2.0 | 6 votes |
public Name getFaultCodeAsName() { String faultcodeString = getFaultCode(); if (faultcodeString == null) { return null; } int prefixIndex = faultcodeString.indexOf(':'); if (prefixIndex == -1) { // Not a valid SOAP message, but we return the unqualified name // anyway since some apps do not strictly conform to SOAP // specs. A message that does not contain a <faultcode> // element itself is also not valid in which case we return // null instead of throwing an exception so this is consistent. return NameImpl.createFromUnqualifiedName(faultcodeString); } // Get the prefix and map it to a namespace name (AKA namespace URI) String prefix = faultcodeString.substring(0, prefixIndex); if (this.faultCodeElement == null) findFaultCodeElement(); String nsName = this.faultCodeElement.getNamespaceURI(prefix); return NameImpl.createFromQualifiedName(faultcodeString, nsName); }
Example 7
Source File: Fault1_1Impl.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public Name getFaultCodeAsName() { String faultcodeString = getFaultCode(); if (faultcodeString == null) { return null; } int prefixIndex = faultcodeString.indexOf(':'); if (prefixIndex == -1) { // Not a valid SOAP message, but we return the unqualified name // anyway since some apps do not strictly conform to SOAP // specs. A message that does not contain a <faultcode> // element itself is also not valid in which case we return // null instead of throwing an exception so this is consistent. return NameImpl.createFromUnqualifiedName(faultcodeString); } // Get the prefix and map it to a namespace name (AKA namespace URI) String prefix = faultcodeString.substring(0, prefixIndex); if (this.faultCodeElement == null) findFaultCodeElement(); String nsName = this.faultCodeElement.getNamespaceURI(prefix); return NameImpl.createFromQualifiedName(faultcodeString, nsName); }
Example 8
Source File: Fault1_1Impl.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Override public Name getFaultCodeAsName() { String faultcodeString = getFaultCode(); if (faultcodeString == null) { return null; } int prefixIndex = faultcodeString.indexOf(':'); if (prefixIndex == -1) { // Not a valid SOAP message, but we return the unqualified name // anyway since some apps do not strictly conform to SOAP // specs. A message that does not contain a <faultcode> // element itself is also not valid in which case we return // null instead of throwing an exception so this is consistent. return NameImpl.createFromUnqualifiedName(faultcodeString); } // Get the prefix and map it to a namespace name (AKA namespace URI) String prefix = faultcodeString.substring(0, prefixIndex); if (this.faultCodeElement == null) findFaultCodeElement(); String nsName = this.faultCodeElement.getNamespaceURI(prefix); return NameImpl.createFromQualifiedName(faultcodeString, nsName); }
Example 9
Source File: ElementImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
protected static Iterator getAllAttributesFrom(final Element element) { final NamedNodeMap attributes = element.getAttributes(); return new Iterator() { int attributesLength = attributes.getLength(); int attributeIndex = 0; String currentName; public boolean hasNext() { return attributeIndex < attributesLength; } public Object next() { if (!hasNext()) { throw new NoSuchElementException(); } Node current = attributes.item(attributeIndex++); currentName = current.getNodeName(); String prefix = NameImpl.getPrefixFromTagName(currentName); if (prefix.length() == 0) { return NameImpl.createFromUnqualifiedName(currentName); } else { Name attributeName = NameImpl.createFromQualifiedName( currentName, current.getNamespaceURI()); return attributeName; } } public void remove() { if (currentName == null) { throw new IllegalStateException(); } attributes.removeNamedItem(currentName); } }; }
Example 10
Source File: ElementImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
protected static Iterator getAllAttributesFrom(final Element element) { final NamedNodeMap attributes = element.getAttributes(); return new Iterator() { int attributesLength = attributes.getLength(); int attributeIndex = 0; String currentName; public boolean hasNext() { return attributeIndex < attributesLength; } public Object next() { if (!hasNext()) { throw new NoSuchElementException(); } Node current = attributes.item(attributeIndex++); currentName = current.getNodeName(); String prefix = NameImpl.getPrefixFromTagName(currentName); if (prefix.length() == 0) { return NameImpl.createFromUnqualifiedName(currentName); } else { Name attributeName = NameImpl.createFromQualifiedName( currentName, current.getNamespaceURI()); return attributeName; } } public void remove() { if (currentName == null) { throw new IllegalStateException(); } attributes.removeNamedItem(currentName); } }; }
Example 11
Source File: ElementImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
protected static Iterator getAllAttributesFrom(final Element element) { final NamedNodeMap attributes = element.getAttributes(); return new Iterator() { int attributesLength = attributes.getLength(); int attributeIndex = 0; String currentName; public boolean hasNext() { return attributeIndex < attributesLength; } public Object next() { if (!hasNext()) { throw new NoSuchElementException(); } Node current = attributes.item(attributeIndex++); currentName = current.getNodeName(); String prefix = NameImpl.getPrefixFromTagName(currentName); if (prefix.length() == 0) { return NameImpl.createFromUnqualifiedName(currentName); } else { Name attributeName = NameImpl.createFromQualifiedName( currentName, current.getNamespaceURI()); return attributeName; } } public void remove() { if (currentName == null) { throw new IllegalStateException(); } attributes.removeNamedItem(currentName); } }; }
Example 12
Source File: ElementImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
protected static Iterator getAllAttributesFrom(final Element element) { final NamedNodeMap attributes = element.getAttributes(); return new Iterator() { int attributesLength = attributes.getLength(); int attributeIndex = 0; String currentName; public boolean hasNext() { return attributeIndex < attributesLength; } public Object next() { if (!hasNext()) { throw new NoSuchElementException(); } Node current = attributes.item(attributeIndex++); currentName = current.getNodeName(); String prefix = NameImpl.getPrefixFromTagName(currentName); if (prefix.length() == 0) { return NameImpl.createFromUnqualifiedName(currentName); } else { Name attributeName = NameImpl.createFromQualifiedName( currentName, current.getNamespaceURI()); return attributeName; } } public void remove() { if (currentName == null) { throw new IllegalStateException(); } attributes.removeNamedItem(currentName); } }; }
Example 13
Source File: ElementImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override public SOAPElement addChildElement(String localName) throws SOAPException { String nsUri = getNamespaceURI(""); Name name = (nsUri == null || nsUri.isEmpty()) ? NameImpl.createFromUnqualifiedName(localName) : NameImpl.createFromQualifiedName(localName, nsUri); return addChildElement(name); }
Example 14
Source File: ElementImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public SOAPElement addChildElement(String localName) throws SOAPException { String nsUri = getNamespaceURI(""); Name name = (nsUri == null || nsUri.isEmpty()) ? NameImpl.createFromUnqualifiedName(localName) : NameImpl.createFromQualifiedName(localName, nsUri); return addChildElement(name); }
Example 15
Source File: ElementImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
protected static Iterator getAllAttributesFrom(final Element element) { final NamedNodeMap attributes = element.getAttributes(); return new Iterator() { int attributesLength = attributes.getLength(); int attributeIndex = 0; String currentName; public boolean hasNext() { return attributeIndex < attributesLength; } public Object next() { if (!hasNext()) { throw new NoSuchElementException(); } Node current = attributes.item(attributeIndex++); currentName = current.getNodeName(); String prefix = NameImpl.getPrefixFromTagName(currentName); if (prefix.length() == 0) { return NameImpl.createFromUnqualifiedName(currentName); } else { Name attributeName = NameImpl.createFromQualifiedName( currentName, current.getNamespaceURI()); return attributeName; } } public void remove() { if (currentName == null) { throw new IllegalStateException(); } attributes.removeNamedItem(currentName); } }; }
Example 16
Source File: ElementImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public SOAPElement addChildElement(String localName) throws SOAPException { String nsUri = getNamespaceURI(""); Name name = (nsUri == null || nsUri.isEmpty()) ? NameImpl.createFromUnqualifiedName(localName) : NameImpl.createFromQualifiedName(localName, nsUri); return addChildElement(name); }
Example 17
Source File: ElementImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
protected static Iterator getAllAttributesFrom(final Element element) { final NamedNodeMap attributes = element.getAttributes(); return new Iterator() { int attributesLength = attributes.getLength(); int attributeIndex = 0; String currentName; public boolean hasNext() { return attributeIndex < attributesLength; } public Object next() { if (!hasNext()) { throw new NoSuchElementException(); } Node current = attributes.item(attributeIndex++); currentName = current.getNodeName(); String prefix = NameImpl.getPrefixFromTagName(currentName); if (prefix.length() == 0) { return NameImpl.createFromUnqualifiedName(currentName); } else { Name attributeName = NameImpl.createFromQualifiedName( currentName, current.getNamespaceURI()); return attributeName; } } public void remove() { if (currentName == null) { throw new IllegalStateException(); } attributes.removeNamedItem(currentName); } }; }
Example 18
Source File: ElementImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
protected static Iterator getAllAttributesFrom(final Element element) { final NamedNodeMap attributes = element.getAttributes(); return new Iterator() { int attributesLength = attributes.getLength(); int attributeIndex = 0; String currentName; public boolean hasNext() { return attributeIndex < attributesLength; } public Object next() { if (!hasNext()) { throw new NoSuchElementException(); } Node current = attributes.item(attributeIndex++); currentName = current.getNodeName(); String prefix = NameImpl.getPrefixFromTagName(currentName); if (prefix.length() == 0) { return NameImpl.createFromUnqualifiedName(currentName); } else { Name attributeName = NameImpl.createFromQualifiedName( currentName, current.getNamespaceURI()); return attributeName; } } public void remove() { if (currentName == null) { throw new IllegalStateException(); } attributes.removeNamedItem(currentName); } }; }
Example 19
Source File: ElementImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public SOAPElement addChildElement(String localName) throws SOAPException { String nsUri = getNamespaceURI(""); Name name = (nsUri == null || nsUri.isEmpty()) ? NameImpl.createFromUnqualifiedName(localName) : NameImpl.createFromQualifiedName(localName, nsUri); return addChildElement(name); }
Example 20
Source File: ElementImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
protected static Iterator<Name> getAllAttributesFrom(final Element element) { final NamedNodeMap attributes = element.getAttributes(); return new Iterator<Name>() { int attributesLength = attributes.getLength(); int attributeIndex = 0; String currentName; @Override public boolean hasNext() { return attributeIndex < attributesLength; } @Override public Name next() { if (!hasNext()) { throw new NoSuchElementException(); } Node current = attributes.item(attributeIndex++); currentName = current.getNodeName(); String prefix = NameImpl.getPrefixFromTagName(currentName); if (prefix.length() == 0) { return NameImpl.createFromUnqualifiedName(currentName); } else { Name attributeName = NameImpl.createFromQualifiedName( currentName, current.getNamespaceURI()); return attributeName; } } @Override public void remove() { if (currentName == null) { throw new IllegalStateException(); } attributes.removeNamedItem(currentName); } }; }