Java Code Examples for javax.xml.soap.SOAPElement#setAttributeNS()

The following examples show how to use javax.xml.soap.SOAPElement#setAttributeNS() . 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: SaajStaxWriter.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
static void addAttibuteToElement(SOAPElement element, String prefix, String ns, String ln, String value)
        throws XMLStreamException {
    try {
        if (ns == null) {
            element.setAttributeNS("", ln, value);
        } else {
            QName name = prefix == null ? new QName(ns, ln) : new QName(ns, ln, prefix);
            element.addAttribute(name, value);
        }
    } catch (SOAPException e) {
        throw new XMLStreamException(e);
    }
}
 
Example 2
Source File: SaajStaxWriter.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
static void addAttibuteToElement(SOAPElement element, String prefix, String ns, String ln, String value)
        throws XMLStreamException {
    try {
        if (ns == null) {
            element.setAttributeNS("", ln, value);
        } else {
            QName name = prefix == null ? new QName(ns, ln) : new QName(ns, ln, prefix);
            element.addAttribute(name, value);
        }
    } catch (SOAPException e) {
        throw new XMLStreamException(e);
    }
}
 
Example 3
Source File: SaajStaxWriter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
static void addAttibuteToElement(SOAPElement element, String prefix, String ns, String ln, String value)
        throws XMLStreamException {
    try {
        if (ns == null) {
            element.setAttributeNS("", ln, value);
        } else {
            QName name = prefix == null ? new QName(ns, ln) : new QName(ns, ln, prefix);
            element.addAttribute(name, value);
        }
    } catch (SOAPException e) {
        throw new XMLStreamException(e);
    }
}
 
Example 4
Source File: SaajStaxWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
static void addAttibuteToElement(SOAPElement element, String prefix, String ns, String ln, String value)
        throws XMLStreamException {
    try {
        if (ns == null) {
            element.setAttributeNS("", ln, value);
        } else {
            QName name = prefix == null ? new QName(ns, ln) : new QName(ns, ln, prefix);
            element.addAttribute(name, value);
        }
    } catch (SOAPException e) {
        throw new XMLStreamException(e);
    }
}
 
Example 5
Source File: SaajStaxWriter.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
static void addAttibuteToElement(SOAPElement element, String prefix, String ns, String ln, String value)
        throws XMLStreamException {
    try {
        if (ns == null) {
            element.setAttributeNS("", ln, value);
        } else {
            QName name = prefix == null ? new QName(ns, ln) : new QName(ns, ln, prefix);
            element.addAttribute(name, value);
        }
    } catch (SOAPException e) {
        throw new XMLStreamException(e);
    }
}