1 8 9 package org.uddi4j.request; 10 11 import org.uddi4j.UDDIElement; 12 import org.uddi4j.UDDIException; 13 import org.w3c.dom.Element ; 14 15 38 public class GetAuthToken extends UDDIElement { 39 public static final String UDDI_TAG = "get_authToken"; 40 41 protected Element base = null; 42 43 String userID = null; 44 String cred = null; 45 46 52 public GetAuthToken() { 53 } 54 55 61 public GetAuthToken(String userID, 62 String cred) { 63 this.userID = userID; 64 this.cred = cred; 65 } 66 67 77 public GetAuthToken(Element base) throws UDDIException { 78 super(base); 80 userID = base.getAttribute("userID"); 81 cred = base.getAttribute("cred"); 82 } 83 84 public void setUserID(String s) { 85 userID = s; 86 } 87 88 public void setCred(String s) { 89 cred = s; 90 } 91 92 public String getUserID() { 93 return userID; 94 } 95 96 97 public String getCred() { 98 return cred; 99 } 100 101 102 111 public void saveToXML(Element parent) { 112 base = parent.getOwnerDocument().createElement(UDDI_TAG); 113 base.setAttribute("generic", UDDIElement.GENERIC); 115 base.setAttribute("xmlns", UDDIElement.XMLNS); 116 if (userID!=null) { 117 base.setAttribute("userID", userID); 118 } 119 if (cred!=null) { 120 base.setAttribute("cred", cred); 121 } 122 parent.appendChild(base); 123 } 124 } 125 | Popular Tags |