KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > description > ServiceDesc


1 /*
2  * Copyright 2002-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.axis.description;
17
18 import org.apache.axis.encoding.TypeMapping;
19 import org.apache.axis.encoding.TypeMappingRegistry;
20 import org.apache.axis.constants.Style;
21 import org.apache.axis.constants.Use;
22
23 import javax.xml.namespace.QName JavaDoc;
24 import java.util.ArrayList JavaDoc;
25 import java.util.List JavaDoc;
26 import java.io.Serializable JavaDoc;
27
28 public interface ServiceDesc extends Serializable JavaDoc {
29     /**
30      * What kind of service is this?
31      * @return
32      */

33     Style getStyle();
34
35     void setStyle(Style style);
36
37     /**
38      * What kind of use is this?
39      * @return
40      */

41     Use getUse();
42
43     void setUse(Use use);
44
45     /**
46      * the wsdl file of the service.
47      * When null, it means that the wsdl should be autogenerated
48      * @return filename or null
49      */

50     String JavaDoc getWSDLFile();
51
52     /**
53      * set the wsdl file of the service; this causes the named
54      * file to be returned on a ?wsdl, probe, not introspection
55      * generated wsdl.
56      * @param wsdlFileName filename or null to re-enable introspection
57      */

58     void setWSDLFile(String JavaDoc wsdlFileName);
59
60     List JavaDoc getAllowedMethods();
61
62     void setAllowedMethods(List JavaDoc allowedMethods);
63
64     TypeMapping getTypeMapping();
65
66     void setTypeMapping(TypeMapping tm);
67
68     /**
69      * the name of the service
70      */

71     String JavaDoc getName();
72
73     /**
74      * the name of the service
75      * @param name
76      */

77     void setName(String JavaDoc name);
78
79     /**
80      * get the documentation for the service
81      */

82     String JavaDoc getDocumentation();
83
84     /**
85      * set the documentation for the service
86      */

87     void setDocumentation(String JavaDoc documentation);
88
89     void removeOperationDesc(OperationDesc operation);
90
91     void addOperationDesc(OperationDesc operation);
92
93     /**
94      * get all the operations as a list of OperationDescs.
95      * this method triggers an evaluation of the valid operations by
96      * introspection, so use sparingly
97      * @return reference to the operations array. This is not a copy
98      */

99     ArrayList JavaDoc getOperations();
100
101     /**
102      * get all overloaded operations by name
103      * @param methodName
104      * @return null for no match, or an array of OperationDesc objects
105      */

106     OperationDesc [] getOperationsByName(String JavaDoc methodName);
107
108     /**
109      * Return an operation matching the given method name. Note that if we
110      * have multiple overloads for this method, we will return the first one.
111      * @return null for no match
112      */

113     OperationDesc getOperationByName(String JavaDoc methodName);
114
115     /**
116      * Map an XML QName to an operation. Returns the first one it finds
117      * in the case of mulitple matches.
118      * @return null for no match
119      */

120     OperationDesc getOperationByElementQName(QName JavaDoc qname);
121
122     /**
123      * Return all operations which match this QName (i.e. get all the
124      * overloads)
125      * @return null for no match
126      */

127     OperationDesc [] getOperationsByQName(QName JavaDoc qname);
128
129     void setNamespaceMappings(List JavaDoc namespaces);
130
131     String JavaDoc getDefaultNamespace();
132
133     void setDefaultNamespace(String JavaDoc namespace);
134
135     void setProperty(String JavaDoc name, Object JavaDoc value);
136
137     Object JavaDoc getProperty(String JavaDoc name);
138
139     String JavaDoc getEndpointURL();
140
141     void setEndpointURL(String JavaDoc endpointURL);
142
143     TypeMappingRegistry getTypeMappingRegistry();
144
145     void setTypeMappingRegistry(TypeMappingRegistry tmr);
146     
147     boolean isInitialized();
148
149     /**
150      * Determine whether or not this is a "wrapped" invocation, i.e. whether
151      * the outermost XML element of the "main" body element represents a
152      * method call, with the immediate children of that element representing
153      * arguments to the method.
154      *
155      * @return true if this is wrapped (i.e. RPC or WRAPPED style),
156      * false otherwise
157      */

158     boolean isWrapped();
159
160     List JavaDoc getDisallowedMethods();
161
162     void setDisallowedMethods(List JavaDoc disallowedMethods);
163 }
164
Popular Tags