public SOAPElement addAttribute(Name name, String value) throws SOAPException { if (log.isTraceEnabled()) log.trace("addAttribute: [name=" + name + ",value=" + value + "]"); expandToDOM(); return super.addAttribute(name, value); }
public SOAPElement addAttribute(QName qname, String value) throws SOAPException { return addAttribute(new NameImpl(qname), value); }
/** * Sets the encoding style for this SOAPElement object to one specified. * * @see http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383495 * @see http://www.w3.org/TR/soap12-part1/#soapencattr * * @param encodingStyle a String giving the encoding style * @throws IllegalArgumentException if there was a problem in the encoding style being set. * @throws javax.xml.soap.SOAPException if setting the encodingStyle is invalid for this SOAPElement. */ public void setEncodingStyle(String encodingStyle) throws SOAPException { String namespaceURI = getNamespaceURI(Constants.PREFIX_ENV); NameImpl name = new NameImpl("encodingStyle", Constants.PREFIX_ENV, namespaceURI); addAttribute(name, encodingStyle); }
@Override public SOAPElement addAttribute(Name name, String value) throws SOAPException { String envNamespace = getNamespaceURI(); if (Constants.NS_SOAP12_ENV.equals(envNamespace) && name.equals(new NameImpl("encodingStyle", Constants.PREFIX_ENV, envNamespace))) throw new SOAPException(BundleUtils.getMessage(bundle, "CANNOT_SET_ENCODINGSTYLE", getElementQName())); return super.addAttribute(name, value); }
@Override public SOAPElement addAttribute(Name name, String value) throws SOAPException { String envNamespace = getNamespaceURI(); if (Constants.NS_SOAP12_ENV.equals(envNamespace) && name.equals(new NameImpl("encodingStyle", Constants.PREFIX_ENV, envNamespace))) throw new SOAPException(BundleUtils.getMessage(bundle, "CANNOT_SET_ENCODINGSTYLE_ON", getElementQName())); return super.addAttribute(name, value); }