KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > common > dd > WebserviceDescription


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /**
25  * This generated bean class WebserviceDescription matches the schema element webservice-description
26  *
27  * Generated on Wed Aug 13 12:12:27 PDT 2003
28  */

29
30 package com.sun.enterprise.tools.common.dd;
31
32 import org.w3c.dom.*;
33 import org.netbeans.modules.schema2beans.*;
34 import java.beans.*;
35 import java.util.*;
36
37 // BEGIN_NOI18N
38

39 public class WebserviceDescription extends com.sun.enterprise.tools.common.dd.SunBaseBean
40 {
41
42     static Vector comparators = new Vector();
43
44     static public final String JavaDoc WEBSERVICE_DESCRIPTION_NAME = "WebserviceDescriptionName"; // NOI18N
45
static public final String JavaDoc WSDL_PUBLISH_LOCATION = "WsdlPublishLocation"; // NOI18N
46

47     public WebserviceDescription() {
48         this(Common.USE_DEFAULT_VALUES);
49     }
50
51     public WebserviceDescription(int options)
52     {
53         super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
54         // Properties (see root bean comments for the bean graph)
55
this.createProperty("webservice-description-name", // NOI18N
56
WEBSERVICE_DESCRIPTION_NAME,
57             Common.TYPE_1 | Common.TYPE_STRING | Common.TYPE_KEY,
58             String JavaDoc.class);
59         this.createProperty("wsdl-publish-location", // NOI18N
60
WSDL_PUBLISH_LOCATION,
61             Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
62             String JavaDoc.class);
63         this.initialize(options);
64     }
65
66     // Setting the default values of the properties
67
void initialize(int options)
68     {
69         
70     }
71
72     // This attribute is mandatory
73
public void setWebserviceDescriptionName(String JavaDoc value) {
74         this.setValue(WEBSERVICE_DESCRIPTION_NAME, value);
75     }
76
77     //
78
public String JavaDoc getWebserviceDescriptionName() {
79         return (String JavaDoc)this.getValue(WEBSERVICE_DESCRIPTION_NAME);
80     }
81
82     // This attribute is optional
83
public void setWsdlPublishLocation(String JavaDoc value) {
84         this.setValue(WSDL_PUBLISH_LOCATION, value);
85     }
86
87     //
88
public String JavaDoc getWsdlPublishLocation() {
89         return (String JavaDoc)this.getValue(WSDL_PUBLISH_LOCATION);
90     }
91
92     //
93
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
94         comparators.add(c);
95     }
96
97     //
98
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
99         comparators.remove(c);
100     }
101     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
102         boolean restrictionFailure = false;
103         // Validating property webserviceDescriptionName
104
if (getWebserviceDescriptionName() == null) {
105             throw new org.netbeans.modules.schema2beans.ValidateException("getWebserviceDescriptionName() == null", "webserviceDescriptionName", this); // NOI18N
106
}
107         // Validating property wsdlPublishLocation
108
if (getWsdlPublishLocation() != null) {
109         }
110     }
111
112     // Dump the content of this bean returning it as a String
113
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
114         String JavaDoc s;
115         Object JavaDoc o;
116         org.netbeans.modules.schema2beans.BaseBean n;
117         str.append(indent);
118         str.append("WebserviceDescriptionName"); // NOI18N
119
str.append(indent+"\t"); // NOI18N
120
str.append("<"); // NOI18N
121
s = this.getWebserviceDescriptionName();
122         str.append((s==null?"null":s.trim())); // NOI18N
123
str.append(">\n"); // NOI18N
124
this.dumpAttributes(WEBSERVICE_DESCRIPTION_NAME, 0, str, indent);
125
126         str.append(indent);
127         str.append("WsdlPublishLocation"); // NOI18N
128
str.append(indent+"\t"); // NOI18N
129
str.append("<"); // NOI18N
130
s = this.getWsdlPublishLocation();
131         str.append((s==null?"null":s.trim())); // NOI18N
132
str.append(">\n"); // NOI18N
133
this.dumpAttributes(WSDL_PUBLISH_LOCATION, 0, str, indent);
134
135     }
136     public String JavaDoc dumpBeanNode(){
137         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
138         str.append("WebserviceDescription\n"); // NOI18N
139
this.dump(str, "\n "); // NOI18N
140
return str.toString();
141     }}
142
143 // END_NOI18N
144

145
146 /*
147         The following schema file has been used for generation:
148
149 <!--
150 This is the root element which binds an ejb reference to a jndi name.
151 -->
152 <!ELEMENT ejb-ref (ejb-ref-name, jndi-name)>
153
154 <!--
155 This node holds all the runtime bindings of a resource env reference.
156 -->
157 <!ELEMENT resource-env-ref ( resource-env-ref-name, jndi-name )>
158
159 <!--
160 This node holds all the runtime bindings of a resource reference.
161 -->
162 <!ELEMENT resource-ref (res-ref-name, jndi-name, default-resource-principal?)>
163
164 <!ELEMENT default-resource-principal (name, password)>
165
166 <!ELEMENT security-role-mapping (role-name, (principal-name | group-name)+)>
167
168 <!--
169 Information about a web service endpoint.
170 -->
171 <!ELEMENT webservice-endpoint ( port-component-name, endpoint-address-uri?, login-config?, transport-guarantee?, service-qname?, tie-class?, servlet-impl-class? )>
172
173 <!--
174 Optional authentication configuration for an EJB web service endpoint.
175 Not needed for servet web service endpoints. Their security configuration
176 is contained in the standard web application descriptor.
177 -->
178 <!ELEMENT login-config ( auth-method )>
179
180 <!--
181 The service-qname element declares the specific WSDL service
182 element that is being refered to. It is not set by the deployer.
183 It is derived during deployment.
184 -->
185 <!ELEMENT service-qname (namespaceURI, localpart)>
186
187 <!--
188 Runtime information about a web service.
189 wsdl-publish-location is optionally used to specify
190 where the final wsdl and any dependent files should be stored. This location
191 resides on the file system from which deployment is initiated.
192 -->
193 <!ELEMENT webservice-description ( webservice-description-name, wsdl-publish-location? )>
194
195 <!--
196 Runtime settings for a web service reference. In the simplest case,
197 there is no runtime information required for a service ref. Runtime info
198 is only needed in the following cases :
199  * to define the port that should be used to resolve a container-managed port
200  * to define default Stub/Call property settings for Stub objects
201  * to define the URL of a final WSDL document to be used instead of
202 the one packaged with a service-ref
203 -->
204 <!ELEMENT service-ref ( service-ref-name, port-info*, call-property*, wsdl-override?, service-impl-class?, service-qname? )>
205
206 <!--
207 Information for a port within a service-reference.
208
209 Either service-endpoint-interface or wsdl-port or both
210 (service-endpoint-interface and wsdl-port) should be specified.
211
212 If both are specified, wsdl-port represents the
213 port the container should choose for container-managed port selection.
214
215 The same wsdl-port value must not appear in
216 more than one port-info entry within the same service-ref.
217
218 If a particular service-endpoint-interface is using container-managed port
219 selection, it must not appear in more than one port-info entry
220 within the same service-ref.
221 -->
222 <!ELEMENT port-info ( service-endpoint-interface?, wsdl-port?, stub-property*, call-property* )>
223
224 <!--
225 Port used in port-info.
226 -->
227 <!ELEMENT wsdl-port ( namespaceURI, localpart )>
228
229 <!--
230 JAXRPC property values that should be set on a stub before it's returned to
231 to the web service client. The property names can be any properties supported
232 by the JAXRPC Stub implementation. See javadoc for javax.xml.rpc.Stub
233 -->
234 <!ELEMENT stub-property ( name, value )>
235
236 <!--
237 JAXRPC property values that should be set on a Call object before it's
238 returned to the web service client. The property names can be any
239 properties supported by the JAXRPC Call implementation. See javadoc
240 for javax.xml.rpc.Call
241 -->
242 <!ELEMENT call-property ( name, value )>
243
244 <!--
245 This info is used only by studio plug-in;it is NOT the part of the orgianl DTD.
246 Used by plugin to store parameters needed to execute an Application client.
247 -->
248 <!ELEMENT plugin-data ( auto-generate-sql?, client-jar-path?, client-args? )>
249 <!ELEMENT auto-generate-sql (#PCDATA)>
250 <!ELEMENT client-jar-path (#PCDATA)>
251 <!ELEMENT client-args (#PCDATA)>
252
253 <!--
254 The ejb ref name locates the name of the ejb reference in the application.
255 -->
256 <!ELEMENT ejb-ref-name (#PCDATA)>
257
258 <!--
259 The text in this node is a jndi name.
260 -->
261 <!ELEMENT jndi-name (#PCDATA)>
262
263 <!--
264 The name of a resource env reference.
265 -->
266 <!ELEMENT resource-env-ref-name (#PCDATA)>
267
268 <!--
269 The name of a resource reference.
270 -->
271 <!ELEMENT res-ref-name (#PCDATA)>
272
273 <!--
274 This text nodes holds a name string.
275 -->
276 <!ELEMENT name (#PCDATA)>
277
278 <!--
279 This element holds password text.
280 -->
281 <!ELEMENT password (#PCDATA)>
282
283 <!ELEMENT role-name (#PCDATA)>
284
285 <!ELEMENT principal-name (#PCDATA)>
286
287 <!ELEMENT group-name (#PCDATA)>
288
289 <!--
290 Unique name of a port component within a module
291 -->
292 <!ELEMENT port-component-name ( #PCDATA )>
293
294 <!--
295 Relative path combined with web server root to form fully qualified
296 endpoint address for a web service endpoint. For servlet endpoints, this
297 value is relative to the servlet's web application context root. In
298 all cases, this value must be a fixed pattern(i.e. no "*" allowed).
299 If the web service endpoint is a servlet that only implements a single
300 endpoint has only one url-pattern, it is not necessary to set
301 this value since the container can derive it from web.xml.
302 -->
303 <!ELEMENT endpoint-address-uri ( #PCDATA )>
304
305 <!--
306 The namespaceURI element indicates a URI.
307 -->
308 <!ELEMENT namespaceURI (#PCDATA)>
309
310 <!--
311 The localpart element indicates the local part of a QNAME.
312 -->
313 <!ELEMENT localpart (#PCDATA)>
314
315 <!--
316 auth-method element describes the authentication method. The only supported value
317 is USERNAME_PASSWORD
318 -->
319 <!ELEMENT auth-method ( #PCDATA )>
320
321 <!--
322 Specifies that the communication between client and server should
323 be NONE, INTEGRAL, or CONFIDENTIAL. NONE means that the application
324 does not require any transport guarantees. A value of INTEGRAL means
325 that the application requires that the data sent between the client
326 and server be sent in such a way that it can't be changed in transit.
327 CONFIDENTIAL means that the application requires that the data be
328 transmitted in a fashion that prevents other entities from observing
329 the contents of the transmission. In most cases, the presence of the
330 INTEGRAL or CONFIDENTIAL flag will indicate that the use of SSL is
331 required.
332 -->
333 <!ELEMENT transport-guarantee ( #PCDATA )>
334
335 <!--
336 The name of tie implementation class for a port-component. This is
337 not specified by the deployer. It is derived during deployment.
338 -->
339 <!ELEMENT tie-class (#PCDATA)>
340
341 <!--
342 Name of application-written servlet impl class contained in deployed war.
343 This is not set by the deployer. It is derived by the container
344 during deployment.
345 -->
346 <!ELEMENT servlet-impl-class (#PCDATA)>
347
348 <!--
349 Unique name of a webservice within a module
350 -->
351 <!ELEMENT webservice-description-name ( #PCDATA )>
352
353 <!--
354 file: URL of a directory to which a web-service-description's wsdl should be
355 published during deployment. Any required files will be published to this
356 directory, preserving their location relative to the module-specific
357 wsdl directory(META-INF/wsdl or WEB-INF/wsdl).
358
359 Example :
360
361   For an ejb.jar whose webservices.xml wsdl-file element contains
362     META-INF/wsdl/a/Foo.wsdl
363
364   <wsdl-publish-location>file:/home/user1/publish
365   </wsdl-publish-location>
366
367   The final wsdl will be stored in /home/user1/publish/a/Foo.wsdl
368 -->
369 <!ELEMENT wsdl-publish-location ( #PCDATA )>
370
371 <!--
372 Coded name (relative to java:comp/env) for a service-reference
373 -->
374 <!ELEMENT service-ref-name ( #PCDATA )>
375
376 <!--
377 Fully qualified name of service endpoint interface
378 -->
379 <!ELEMENT service-endpoint-interface ( #PCDATA )>
380
381 <!--
382 This text nodes holds a value string.
383 -->
384 <!ELEMENT value (#PCDATA)>
385
386 <!--
387 This is a valid URL pointing to a final WSDL document. It is optional.
388 If specified, the WSDL document at this URL will be used during
389 deployment instead of the WSDL document associated with the
390 service-ref in the standard deployment descriptor.
391
392 Examples :
393
394   // available via HTTP
395   <wsdl-override>http://localhost:8000/myservice/myport?WSDL</wsdl-override>
396
397   // in a file
398   <wsdl-override>file:/home/user1/myfinalwsdl.wsdl</wsdl-override>
399 -->
400 <!ELEMENT wsdl-override ( #PCDATA )>
401
402 <!--
403 Name of generated service implementation class. This is not set by the
404 deployer. It is derived during deployment.
405 -->
406 <!ELEMENT service-impl-class ( #PCDATA )>
407
408 <!--
409 This node holds information about a logical message destination
410 -->
411 <!ELEMENT message-destination (message-destination-name, jndi-name)>
412
413 <!--
414 This node holds the name of a logical message destination
415 -->
416 <!ELEMENT message-destination-name (#PCDATA)>
417
418 */

419
Popular Tags