示例#1
0
 public Element createElement(String tagName) throws DOMException {
   return ElementFactory.createElement(
       this,
       NameImpl.getLocalNameFromTagName(tagName),
       NameImpl.getPrefixFromTagName(tagName),
       null);
 }
示例#2
0
 public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException {
   return ElementFactory.createElement(
       this,
       NameImpl.getLocalNameFromTagName(qualifiedName),
       NameImpl.getPrefixFromTagName(qualifiedName),
       namespaceURI);
 }
示例#3
0
 protected SOAPElement convertToSoapElement(Element element) {
   if (element instanceof SOAPFaultElement) {
     return (SOAPElement) element;
   } else if (element instanceof SOAPElement) {
     SOAPElement soapElement = (SOAPElement) element;
     if (getDetailName().equals(soapElement.getElementName())) {
       return replaceElementWithSOAPElement(element, createDetail());
     } else {
       String localName = soapElement.getElementName().getLocalName();
       if (isStandardFaultElement(localName))
         return replaceElementWithSOAPElement(
             element, createSOAPFaultElement(soapElement.getElementQName()));
       return soapElement;
     }
   } else {
     Name elementName = NameImpl.copyElementName(element);
     ElementImpl newElement;
     if (getDetailName().equals(elementName)) {
       newElement = (ElementImpl) createDetail();
     } else {
       String localName = elementName.getLocalName();
       if (isStandardFaultElement(localName))
         newElement = (ElementImpl) createSOAPFaultElement(elementName);
       else newElement = (ElementImpl) createElement(elementName);
     }
     return replaceElementWithSOAPElement(element, newElement);
   }
 }
示例#4
0
 public void setFaultCode(String faultCode) throws SOAPException {
   setFaultCode(
       NameImpl.getLocalNameFromTagName(faultCode),
       NameImpl.getPrefixFromTagName(faultCode),
       null);
 }
示例#5
0
 protected SOAPElement addElement(QName name) throws SOAPException {
   return addElement(NameImpl.convertToName(name));
 }