1 19 20 package org.netbeans.modules.websvc.registry.jaxrpc; 21 22 23 public class WsdlType { 24 private java.net.URL location; 25 private java.lang.String packageName; 26 27 30 public WsdlType() { 31 packageName = ""; 32 } 33 34 37 public WsdlType(java.net.URL location, java.lang.String packageName) { 38 location = location; 39 packageName = packageName; 40 } 41 42 43 public void setLocation(java.net.URL value) { 44 location = value; 45 } 46 47 public java.net.URL getLocation() { 48 return location; 49 } 50 51 public void setPackageName(java.lang.String value) { 52 packageName = value; 53 } 54 55 public java.lang.String getPackageName() { 56 return packageName; 57 } 58 59 60 61 public void writeNode(java.io.Writer out, String nodeName, String indent) throws java.io.IOException { 62 out.write(indent); 63 out.write("<"); 64 out.write(nodeName); 65 if (location != null) { 67 out.write(" location"); out.write("='"); Configuration.writeXML(out, location.toString(), true); 70 out.write("'"); } 72 if (packageName != null && packageName.length() > 0) { 74 out.write(" packageName"); out.write("='"); Configuration.writeXML(out, packageName, true); 77 out.write("'"); } 79 out.write(">\n"); 80 String nextIndent = indent + " "; 81 out.write(indent); 82 out.write("</"+nodeName+">\n"); 83 } 84 85 public void readNode(org.w3c.dom.Node node) { 86 if (node.hasAttributes()) { 87 org.w3c.dom.NamedNodeMap attrs = node.getAttributes(); 88 org.w3c.dom.Attr attr; 89 java.lang.String attrValue; 90 attr = (org.w3c.dom.Attr ) attrs.getNamedItem("location"); 91 try { 92 if (attr != null) { 93 attrValue = attr.getValue(); 94 } else { 95 attrValue = null; 96 } 97 location = new java.net.URL (attrValue); 98 } 99 catch (java.net.MalformedURLException e) { 100 throw new java.lang.RuntimeException (e); 101 } 102 attr = (org.w3c.dom.Attr ) attrs.getNamedItem("packageName"); 103 if (attr != null) { 104 attrValue = attr.getValue(); 105 } else { 106 attrValue = null; 107 } 108 packageName = attrValue; 109 } 110 org.w3c.dom.NodeList children = node.getChildNodes(); 111 for (int i = 0, size = children.getLength(); i < size; ++i) { 112 org.w3c.dom.Node childNode = children.item(i); 113 String childNodeName = (childNode.getLocalName() == null ? childNode.getNodeName().intern() : childNode.getLocalName().intern()); 114 String childNodeValue = ""; 115 if (childNode.getFirstChild() != null) { 116 childNodeValue = childNode.getFirstChild().getNodeValue(); 117 } 118 else { 119 } 121 } 122 } 123 } 124 125 126 | Popular Tags |