Skip to main content
summaryrefslogtreecommitdiffstats
blob: 03fa1f8606aadd7d30bbe0f1967632b03b0c5d5f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
/*******************************************************************************
 * Copyright (c) 2003, 2006 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 * IBM Corporation - initial API and implementation
 * yyyymmdd bug      Email and other contact information
 * -------- -------- -----------------------------------------------------------
 * 20060330   124667 kathy@ca.ibm.com - Kathy Chan
 *******************************************************************************/
package org.eclipse.jst.ws.internal.axis.consumption.core.common;

import java.util.Enumeration;
import java.util.HashMap;
import java.util.Hashtable;


public class JavaWSDLParameter {

	public static final byte SERVER_SIDE_NONE = 0;
	public static final byte SERVER_SIDE_BEAN = 1;
	public static final byte SERVER_SIDE_EJB = 2;

	public static final String STYLE_RPC = "RPC"; //$NON-NLS-1$
	public static final String STYLE_DOCUMENT = "DOCUMENT"; //$NON-NLS-1$
	public static final String STYLE_WRAPPED = "WRAPPED"; //$NON-NLS-1$

	public static final String USE_LITERAL = "LITERAL"; //$NON-NLS-1$
	public static final String USE_ENCODED = "ENCODED"; //$NON-NLS-1$

	private String beanName = null; // The name of the Java bean
	private String classpath = null;
	// The class path for loading the bean and command execution
	private String beanPackage = null; // The package location of the bean
	private String portTypeName = null; // The name of the port type element
	private String serviceName = null; // The name of the service element
	private String outputWsdlLocation = null;
	// The output location of the WSDL file
	private String inputWsdlLocation = null;
	// The input location of the WSDL file
	private String urlLocation = null; // The URL location of the web service
	private Hashtable methods = null; // The array of method names
	private String methodString_ = ""; //$NON-NLS-1$
	 //The string representation of the method array
	private String style = null;
	// The style (RPC | DOCUMENT | WRAPPED) attribute for the generated WSDL
	private String use = null;
	// The use (LITERAL | ENCODED) attribtue for the generated WSDL
	private String output = null;
	// The output location for deployment descriptors & Java code (output from WSDL2Java command)
	private String javaOutput = null;
	// The output location for Java code (output from WSDL2Java command)
	private boolean metaInfOnly = false; // META-INF-ONLY flag
	private byte serverSide = SERVER_SIDE_NONE;
	// server-side flag (SERVER_SIDE_NONE | SERVER_SIDE_BEAN | SERVER_SIDE_EJB)
	private String namespace = null;
	private boolean skeletonDeploy = true;
	private String container = null;
	private String[] deploymentFiles = null;
	private String[] javaFiles = null;
	private String projectURL = null;
	private boolean guessProjectURL = false;
	private HashMap mappingPairs;
	private String httpUsername_ = null;
	private String httpPassword_ = null;

	public void setContainer(String container) {
		this.container = container;
	}

	public String getContainer() {
		return container;
	}

	/**
	 * Constructor for JavaWSDLParameter.
	 */
	public JavaWSDLParameter() {
	}

	/**
	 * Returns the beanName.
	 * @return String
	 */
	public String getBeanName() {
		return beanName;
	}

	public String getBeanPackage() {
		return beanPackage;
	}

	/**
	 * Returns the portTypeName.
	 * @return String
	 */
	public String getPortTypeName() {
		return portTypeName;
	}

	/**
	 * Returns the serviceName.
	 * @return String
	 */
	public String getServiceName() {
		return serviceName;
	}

	/**
	 * Returns the output.
	 * @return String
	 */
	public String getOutput() {
		return output;
	}

	/**
	 * Returns the methods.
	 * @return String[]
	 */
	public Hashtable getMethods() {
		return methods;
	}

	/**
	 * Returns the comma seperated string represetation of the methods.
	 * @return String
	 */
	public String getMethodString() {
		if (methodString_.equals(""))
		{		
			Enumeration e = methods.keys();
	 		for (int i=0; e.hasMoreElements(); i++)
	    	{
	
				String signature = (String) e.nextElement();
				if (((Boolean) methods.get(signature)).booleanValue()){
								int index = signature.indexOf('(');
								String name = signature.substring(0, index);
								methodString_ += name;
				}
		    	if (i != methods.size() -1) // this is not the last array item	
				{
					methodString_ += ",";
				}
			}
		}
		return methodString_;
	}
	
	/**
	 * Sets a comma separated string of methods	 *
	 */
	public void setMethodString(String methods)
	{
		methodString_ = methods;
	}

	/**
	 * Returns the style attribute.
	 * @return String
	 */
	public String getStyle() {
		return style;
	}

	/**
	 * Returns the urlLocation.
	 * @return String
	 */
	public String getUrlLocation() {
		return urlLocation;
	}

	/**
	 * Returns the use attribute.
	 * @return String
	 */
	public String getUse() {
		return use;
	}

	/**
	 * Returns the outputWsdlLocation.
	 * @return String
	 */
	public String getOutputWsdlLocation() {
		return outputWsdlLocation;
	}

	/**
	 * Sets the beanName.
	 * @param beanName The beanName to set
	 */
	public void setBeanName(String beanName) {
		this.beanName = beanName;
	}

	public void setBeanPackage(String beanPackage) {
		this.beanPackage = beanPackage;
	}

	/**
	 * Sets the portTypeName.
	 * @param portTypeName The portTypeName to set
	 */
	public void setPortTypeName(String portTypeName) {
		this.portTypeName = portTypeName;
	}

	/**
	 * Sets the serviceName.
	 * @param serviceName The serviceName to set
	 */
	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}

	/**
	 * Sets the output.
	 * @param output The output to set
	 */
	public void setOutput(String output) {
		this.output = output;
	}

	/**
	 * Sets the methods.
	 * @param methods The methods to set
	 */
	public void setMethods(Hashtable methods) {
		this.methods = methods;
	}

	/**
	 * Sets the style.
	 * @param style The style to set
	 */
	public void setStyle(String style) {
		this.style = style;
	}

	/**
	 * Sets the urlLocation.
	 * @param urlLocation The urlLocation to set
	 */
	public void setUrlLocation(String urlLocation) {
		this.urlLocation = urlLocation;
	}

	/**
	 * Sets the use.
	 * @param use The use to set
	 */
	public void setUse(String use) {
		this.use = use;
	}

	/**
	 * Sets the outputWsdlLocation.
	 * @param outputWsdlLocation The outputWsdlLocation to set
	 */
	public void setOutputWsdlLocation(String wsdlLocation) {
		this.outputWsdlLocation = wsdlLocation;
	}

	/**
	 * Returns the metaInfOnly.
	 * @return boolean
	 */
	public boolean isMetaInfOnly() {
		return metaInfOnly;
	}

	/**
	 * Sets the metaInfOnly.
	 * @param metaInfOnly The metaInfOnly to set
	 */
	public void setMetaInfOnly(boolean metaInfOnly) {
		this.metaInfOnly = metaInfOnly;
	}

	/**
	 * Returns the serverSide.
	 * @return byte
	 */
	public byte getServerSide() {
		return serverSide;
	}

	/**
	 * Sets the serverSide.
	 * @param serverSide The serverSide to set
	 */
	public void setServerSide(byte serverSide) {
		this.serverSide = serverSide;
	}

	/**
	 * Returns the inputWsdlLocation.
	 * @return String
	 */
	public String getInputWsdlLocation() {
		return inputWsdlLocation;
	}

	/**
	 * Sets the inputWsdlLocation.
	 * @param inputWsdlLocation The inputWsdlLocation to set
	 */
	public void setInputWsdlLocation(String inputWsdlLocation) {
		this.inputWsdlLocation = inputWsdlLocation;
	}

	/**
	 * Returns the namespace.
	 * @return String
	 */
	public String getNamespace() {
		return namespace;
	}

	/**
	 * Sets the namespace.
	 * @param namespace The namespace to set
	 */
	public void setNamespace(String namespace) {
		this.namespace = namespace;
	}

	/**
	 * Returns the Java output.
	 * @return String
	 */
	public String getJavaOutput() {
		return javaOutput;
	}

	/**
	 * Sets the javaOutput.
	 * @param javaOutput The Java output to set
	 */
	public void setJavaOutput(String javaOutput) {
		this.javaOutput = javaOutput;
	}

	/**
	 * @return
	 */
	public String getClasspath() {
		return classpath;
	}

	/**
	 * @param string
	 */
	public void setClasspath(String string) {
		classpath = string;
	}

	/**
	 * @return
	 */
	public boolean isSkeletonDeploy() {
		return skeletonDeploy;
	}

	/**
	 * @param b
	 */
	public void setSkeletonDeploy(boolean b) {
		skeletonDeploy = b;
	}

	/**
	 * @return
	 */
	public String[] getDeploymentFiles() {
		return deploymentFiles;
	}

	/**
	 * @param strings
	 */
	public void setDeploymentFiles(String[] strings) {
		deploymentFiles = strings;
	}

	/**
	 * @return
	 */
	public String[] getJavaFiles() {
		return javaFiles;
	}

	/**
	 * @param strings
	 */
	public void setJavaFiles(String[] strings) {
		javaFiles = strings;
	}

	/**
	 * @return
	 */
	public String getProjectURL() {
		return projectURL;
	}

	/**
	 * @param string
	 */
	public void setProjectURL(String string) {
		projectURL = string;
	}
	
	public HashMap getMappings()
	{
			return mappingPairs;
	}

	public void setMappings(HashMap map)
	{
			mappingPairs = map;
	}
	
	/**
	 * Returns the user name for HTTP basic authentication
	 * @return String
	 */
	public String getHTTPUsername()
	{
	  return httpUsername_;
	}

	/**
	 * Sets the user name for HTTP basic authentication
	 * @param String
	 */
	public void setHTTPUsername(String httpUsername)
	{
	  httpUsername_ = httpUsername;
	}

	/**
	 * Returns the password for HTTP basic authentication
	 * @return String
	 */
	public String getHTTPPassword()
	{
	  return httpPassword_;
	}

	/**
	 * @param string
	 */
	public void setHTTPPassword(String httpPassword) {
		httpPassword_ = httpPassword;
	}

	public boolean isGuessProjectURL() {
		return guessProjectURL;
	}

	public void setGuessProjectURL(boolean guessProjectURL) {
		this.guessProjectURL = guessProjectURL;
	}

}

Back to the top