1 8 9 package org.uddi4j.response; 10 11 import org.uddi4j.UDDIElement; 12 import org.uddi4j.UDDIException; 13 import org.w3c.dom.Element ; 14 15 40 public class ErrInfo extends UDDIElement { 41 public static final String UDDI_TAG = "errInfo"; 42 43 protected Element base = null; 44 45 String text = null; 46 String errCode = null; 47 48 54 55 public ErrInfo() { 56 } 57 58 64 public ErrInfo(String value, 65 String errCode) { 66 setText(value); 67 this.errCode = errCode; 68 } 69 70 80 81 public ErrInfo(Element base) throws UDDIException { 82 super(base); 84 text = getText(base); 85 errCode = base.getAttribute("errCode"); 86 } 87 88 public void setText(String s) { 89 text = s; 90 } 91 92 public void setErrCode(String s) { 93 errCode = s; 94 } 95 96 public String getText() { 97 return text; 98 } 99 100 public String getErrCode() { 101 return errCode; 102 } 103 104 105 114 115 public void saveToXML(Element parent) { 116 base = parent.getOwnerDocument().createElement(UDDI_TAG); 117 if (text!=null) { 119 base.appendChild(parent.getOwnerDocument().createTextNode(text)); 120 } 121 if (errCode!=null) { 122 base.setAttribute("errCode", errCode); 123 } 124 parent.appendChild(base); 125 } 126 } 127 | Popular Tags |