问题描述
解决方案
好像改不了吧。 除非修改它的源码
addAttribute
SOAPElement addAttribute(Name name,
String value)
throws SOAPException
Adds an attribute with the specified name and value to this SOAPElement object.
Parameters:
name - a Name object with the name of the attribute
value - a String giving the value of the attribute
Returns:
the SOAPElement object into which the attribute was inserted
Throws:
SOAPException - if there is an error in creating the Attribute, or it is invalid to set an attribute with Name name on this SOAPElement.
See Also:
addAttribute(javax.xml.namespace.QName, String)
解决方案二:
上面拷贝错了
http://www.javadocexamples.com/java_source/com/sauria/apachexml/ch9/MessageBookService/MessageBookProvider.java.html
addTextNode
SOAPElement addTextNode(String text)
throws SOAPException
Creates a new Text object initialized with the given String and adds it to this SOAPElement object.
Parameters:
text - a String object with the textual content to be added
Returns:
the SOAPElement object into which the new Text object was inserted
Throws:
SOAPException - if there is an error in creating the new Text object or if it is not legal to attach it as a child to this SOAPElement
时间: 2024-10-21 19:42:52