1 8 9 package org.uddi4j.transport; 10 11 import java.net.URL ; 12 13 import javax.xml.parsers.DocumentBuilder ; 14 import javax.xml.parsers.DocumentBuilderFactory ; 15 16 import org.uddi4j.UDDIElement; 17 import org.w3c.dom.Element ; 18 19 31 abstract public class TransportBase implements Transport { 32 33 42 public Element send(UDDIElement el, URL url) throws TransportException { 43 Element base = null; 44 try { 45 DocumentBuilder docBuilder = 46 DocumentBuilderFactory.newInstance().newDocumentBuilder(); 47 base = docBuilder.newDocument().createElement("tmp"); 48 } catch (Exception e) { 49 e.printStackTrace(); 50 } 51 52 el.saveToXML(base); 53 return send((Element) base.getFirstChild(), url); 54 } 55 56 public boolean logEnabled() { 57 boolean logEnabled = false; 58 String value = System.getProperty("org.uddi4j.logEnabled"); 59 if (value != null && value.equalsIgnoreCase("true")) { 60 logEnabled = true; 61 } 62 return logEnabled; 63 } 64 65 } 66 | Popular Tags |