1 6 7 28 29 package javax.xml.soap; 30 31 44 public class SOAPElementFactory { 45 46 private SOAPFactory soapFactory; 47 48 private SOAPElementFactory(SOAPFactory soapFactory) { 49 this.soapFactory = soapFactory; 50 } 51 52 72 public SOAPElement create(Name name) throws SOAPException { 73 return soapFactory.createElement(name); 74 } 75 76 94 public SOAPElement create(String localName) throws SOAPException { 95 return soapFactory.createElement(localName); 96 } 97 98 119 public SOAPElement create(String localName, String prefix, String uri) 120 throws SOAPException { 121 return soapFactory.createElement(localName, prefix, uri); 122 } 123 124 132 public static SOAPElementFactory newInstance() throws SOAPException { 133 try { 134 return new SOAPElementFactory (SOAPFactory.newInstance()); 135 } catch (Exception ex) { 136 throw new SOAPException ( 137 "Unable to create SOAP Element Factory: " + ex.getMessage()); 138 } 139 } 140 } 141 | Popular Tags |