01: package org.objectweb.celtix.wsdl;
02:
03: import java.net.URL;
04:
05: import javax.wsdl.Definition;
06: import javax.wsdl.WSDLException;
07: import javax.wsdl.extensions.ExtensionRegistry;
08: import javax.wsdl.factory.WSDLFactory;
09:
10: import org.w3c.dom.Element;
11:
12: /**
13: * WSDLManager
14: *
15: */
16: public interface WSDLManager {
17:
18: /**
19: * Returns the ExtensionRegistry that the WSDLManager
20: * uses when reading WSDL files. Users can use
21: * this to register their own extensors.
22: * @return the ExtensionRegistry
23: */
24: ExtensionRegistry getExtenstionRegistry();
25:
26: /**
27: * Returns the WSDLFactory that is used to read/write WSDL definitions
28: * @return the WSDLFactory
29: */
30: WSDLFactory getWSDLFactory();
31:
32: /**
33: * Get the WSDL definition for the given URL. Implementations
34: * may return a copy from a local cache or load a new copy
35: * from the URL.
36: * @param url - the location of the WSDL to load
37: * @return the wsdl definition
38: */
39: Definition getDefinition(URL url) throws WSDLException;
40:
41: /**
42: * Get the WSDL definition for the given URL. Implementations
43: * may return a copy from a local cache or load a new copy
44: * from the URL.
45: * @param url - the location of the WSDL to load
46: * @return the wsdl definition
47: */
48: Definition getDefinition(String url) throws WSDLException;
49:
50: /**
51: * Get the WSDL definition for the given Element. Implementations
52: * may return a copy from a local cache or load a new copy
53: * from the Element.
54: * @param element - the root element of the wsdl
55: * @return the wsdl definition
56: */
57: Definition getDefinition(Element element) throws WSDLException;
58:
59: /**
60: * Get the WSDL definition for the given class. Implementations
61: * may return a copy from a local cache or load a new copy
62: * from the class.
63: * @param sei - the Class annotated with a WebService annotation
64: * @return the wsdl Definition
65: */
66: Definition getDefinition(Class<?> sei) throws WSDLException;
67:
68: /**
69: * Adds a definition into the cache for lookup later
70: * @param key
71: * @param wsdl
72: */
73: void addDefinition(Object key, Definition wsdl);
74:
75: /**
76: * Shouts down the WSDL manager, and do clean up things
77: */
78: void shutdown();
79: }
|