1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.geronimo.ews.ws4j2ee.context.webservices.server.xmlbeans;
17
18 import com.sun.java.xml.ns.j2Ee.WebservicesDocument;
19 import com.sun.java.xml.ns.j2Ee.WebservicesType;
20 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.AsbtractWSCFDocument;
21 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.WSCFException;
22 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFConstants;
23 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFDocument;
24 import org.apache.xmlbeans.XmlException;
25
26 import java.io.IOException;
27 import java.io.InputStream;
28
29 /***
30 * This will encapsulate the webservices.xml document and this is the start of the
31 * parsing tree.This will be used to support the the methods of the WSCFContext. The
32 * class tree and the Interface tree will strat from here and there will be sufficient
33 * functionality provided by each class to expose the information and to further
34 * drill down the element tree.
35 */
36 public class WSCFDocumentImpl extends AsbtractWSCFDocument implements WSCFConstants, WSCFDocument {
37 public WSCFDocumentImpl(InputStream in) throws WSCFException {
38 try {
39 WebservicesDocument wsDoc = WebservicesDocument.Factory.parse(in);
40 WebservicesType ws = wsDoc.getWebservices();
41 this.webservices = new WSCFWebservicesImpl(ws);
42 } catch (IOException je) {
43 throw new WSCFException(je);
44 } catch (XmlException je) {
45 throw new WSCFException(je);
46 }
47 }
48 }