01: package tableappclient.business;
02:
03: /**
04: * <p>Title: </p>
05: * <p>Description: </p>
06: * <p>Copyright: Copyright (c) 2005</p>
07: * <p>Company: </p>
08: * @author not attributable
09: * @version 1.0
10: */
11: import tableappclient.spec.TableNode;
12: import tableappclient.business.axis.*;
13: import org.w3c.dom.Node;
14: import org.w3c.dom.NodeList;
15: import org.w3c.dom.Document;
16:
17: public class TableNodeImpl implements TableNode {
18: static String TABLE = "TABLE";
19:
20: public TableNodeImpl() {
21: };
22:
23: public Node getTableNode(String hostName, String portNum) {
24: try {
25:
26: WelcomePresentationService service = new WelcomePresentationServiceLocator();
27:
28: WelcomePresentation welcome;
29: welcome = service.gettableApp(new java.net.URL("http://"
30: + hostName + ":" + portNum + "/tableApp/tableApp"));
31: Document doc = welcome.tableDoc();
32: if (doc == null) {
33: return null;
34: }
35: NodeList nodeList = doc.getElementsByTagName(TABLE);
36: return nodeList.item(0);
37:
38: } catch (Exception e) {
39: e.printStackTrace();
40: return null;
41: }
42: }
43: }
|