KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > wsdl > marshall2 > Marshall2ServiceTestCase


1 /**
2  * Marshall2ServiceTestCase.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis 1.2RC3 Feb 14, 2005 (08:56:33 EST) WSDL2Java emitter.
6  */

7
8 package test.wsdl.marshall2;
9
10 import org.apache.axis.Constants;
11
12 import javax.xml.namespace.QName JavaDoc;
13 import java.math.BigDecimal JavaDoc;
14 import java.math.BigInteger JavaDoc;
15 import java.util.Calendar JavaDoc;
16 import java.util.GregorianCalendar JavaDoc;
17 import java.net.URI JavaDoc;
18
19 import test.wsdl.marshall2.types.JavaBean;
20 import test.wsdl.marshall2.types.JavaBean2;
21
22 public class Marshall2ServiceTestCase extends junit.framework.TestCase {
23     public Marshall2ServiceTestCase(java.lang.String JavaDoc name) {
24         super(name);
25     }
26
27     public void testMarshall2PortWSDL() throws Exception JavaDoc {
28         javax.xml.rpc.ServiceFactory JavaDoc serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
29         java.net.URL JavaDoc url = new java.net.URL JavaDoc(new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2PortAddress() + "?WSDL");
30         javax.xml.rpc.Service JavaDoc service = serviceFactory.createService(url, new test.wsdl.marshall2.Marshall2ServiceLocator().getServiceName());
31         assertTrue(service != null);
32     }
33
34     public void test1Marshall2PortBigDecimalArrayTest() throws Exception JavaDoc {
35         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
36         try {
37             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
38                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
39         }
40         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
41             if(jre.getLinkedCause()!=null)
42                 jre.getLinkedCause().printStackTrace();
43             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
44         }
45         assertNotNull("binding is null", binding);
46
47         // Time out after a minute
48
binding.setTimeout(60000);
49
50         // Test operation
51
test.wsdl.marshall2.types.BigDecimalArrayTestResponse value = null;
52         value = binding.bigDecimalArrayTest(new test.wsdl.marshall2.types.BigDecimalArrayTest(new BigDecimal JavaDoc[]{new BigDecimal JavaDoc("5.0"),
53                                                                                                                new BigDecimal JavaDoc("3512359.1456"),
54                                                                                                                new BigDecimal JavaDoc("3512360.1456"),
55                                                                                                                null
56                                                                                                                }));
57     }
58
59     public void test2Marshall2PortBigDecimalTest() throws Exception JavaDoc {
60         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
61         try {
62             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
63                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
64         }
65         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
66             if(jre.getLinkedCause()!=null)
67                 jre.getLinkedCause().printStackTrace();
68             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
69         }
70         assertNotNull("binding is null", binding);
71
72         // Time out after a minute
73
binding.setTimeout(60000);
74
75         // Test operation
76
test.wsdl.marshall2.types.BigDecimalTestResponse value = null;
77         value = binding.bigDecimalTest(new test.wsdl.marshall2.types.BigDecimalTest(new BigDecimal JavaDoc("5.0")));
78         // TBD - validate results
79
}
80
81     public void test3Marshall2PortBigIntegerArrayTest() throws Exception JavaDoc {
82         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
83         try {
84             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
85                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
86         }
87         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
88             if(jre.getLinkedCause()!=null)
89                 jre.getLinkedCause().printStackTrace();
90             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
91         }
92         assertNotNull("binding is null", binding);
93
94         // Time out after a minute
95
binding.setTimeout(60000);
96
97         // Test operation
98
test.wsdl.marshall2.types.BigIntegerArrayTestResponse value = null;
99         value = binding.bigIntegerArrayTest(new test.wsdl.marshall2.types.BigIntegerArrayTest(new BigInteger JavaDoc[]{new BigInteger JavaDoc("5"),
100                                                                                               new BigInteger JavaDoc("3512359"),
101                                                                                               new BigInteger JavaDoc("3512360"),
102                                                                                               null
103                                                                                             }));
104         // TBD - validate results
105
}
106
107     public void test4Marshall2PortBigIntegerTest() throws Exception JavaDoc {
108         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
109         try {
110             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
111                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
112         }
113         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
114             if(jre.getLinkedCause()!=null)
115                 jre.getLinkedCause().printStackTrace();
116             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
117         }
118         assertNotNull("binding is null", binding);
119
120         // Time out after a minute
121
binding.setTimeout(60000);
122
123         // Test operation
124
test.wsdl.marshall2.types.BigIntegerTestResponse value = null;
125         value = binding.bigIntegerTest(new test.wsdl.marshall2.types.BigIntegerTest(new BigInteger JavaDoc("8")));
126         // TBD - validate results
127
}
128
129     public void test5Marshall2PortBooleanArrayTest() throws Exception JavaDoc {
130         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
131         try {
132             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
133                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
134         }
135         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
136             if(jre.getLinkedCause()!=null)
137                 jre.getLinkedCause().printStackTrace();
138             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
139         }
140         assertNotNull("binding is null", binding);
141
142         // Time out after a minute
143
binding.setTimeout(60000);
144
145         // Test operation
146
test.wsdl.marshall2.types.BooleanArrayTestResponse value = null;
147         value = binding.booleanArrayTest(new test.wsdl.marshall2.types.BooleanArrayTest(new boolean[]{true,false}));
148         // TBD - validate results
149
}
150
151     public void test6Marshall2PortBooleanTest() throws Exception JavaDoc {
152         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
153         try {
154             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
155                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
156         }
157         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
158             if(jre.getLinkedCause()!=null)
159                 jre.getLinkedCause().printStackTrace();
160             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
161         }
162         assertNotNull("binding is null", binding);
163
164         // Time out after a minute
165
binding.setTimeout(60000);
166
167         // Test operation
168
test.wsdl.marshall2.types.BooleanTestResponse value = null;
169         value = binding.booleanTest(new test.wsdl.marshall2.types.BooleanTest(true));
170         // TBD - validate results
171
}
172
173     public void test7Marshall2PortByteArrayTest() throws Exception JavaDoc {
174         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
175         try {
176             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
177                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
178         }
179         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
180             if(jre.getLinkedCause()!=null)
181                 jre.getLinkedCause().printStackTrace();
182             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
183         }
184         assertNotNull("binding is null", binding);
185
186         // Time out after a minute
187
binding.setTimeout(60000);
188
189         // Test operation
190
test.wsdl.marshall2.types.ByteArrayTestResponse value = null;
191         value = binding.byteArrayTest(new test.wsdl.marshall2.types.ByteArrayTest("hello".getBytes()));
192         // TBD - validate results
193
}
194
195     public void test8Marshall2PortByteTest() throws Exception JavaDoc {
196         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
197         try {
198             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
199                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
200         }
201         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
202             if(jre.getLinkedCause()!=null)
203                 jre.getLinkedCause().printStackTrace();
204             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
205         }
206         assertNotNull("binding is null", binding);
207
208         // Time out after a minute
209
binding.setTimeout(60000);
210
211         // Test operation
212
test.wsdl.marshall2.types.ByteTestResponse value = null;
213         value = binding.byteTest(new test.wsdl.marshall2.types.ByteTest("x".getBytes()[0]));
214         // TBD - validate results
215
}
216
217     public void test9Marshall2PortDoubleArrayTest() throws Exception JavaDoc {
218         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
219         try {
220             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
221                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
222         }
223         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
224             if(jre.getLinkedCause()!=null)
225                 jre.getLinkedCause().printStackTrace();
226             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
227         }
228         assertNotNull("binding is null", binding);
229
230         // Time out after a minute
231
binding.setTimeout(60000);
232
233         // Test operation
234
test.wsdl.marshall2.types.DoubleArrayTestResponse value = null;
235         value = binding.doubleArrayTest(new test.wsdl.marshall2.types.DoubleArrayTest(new double[]{4,5}));
236         // TBD - validate results
237
}
238
239     public void test10Marshall2PortDoubleTest() throws Exception JavaDoc {
240         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
241         try {
242             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
243                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
244         }
245         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
246             if(jre.getLinkedCause()!=null)
247                 jre.getLinkedCause().printStackTrace();
248             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
249         }
250         assertNotNull("binding is null", binding);
251
252         // Time out after a minute
253
binding.setTimeout(60000);
254
255         // Test operation
256
test.wsdl.marshall2.types.DoubleTestResponse value = null;
257         value = binding.doubleTest(new test.wsdl.marshall2.types.DoubleTest(4));
258         // TBD - validate results
259
}
260
261     public void test11Marshall2PortFloatArrayTest() throws Exception JavaDoc {
262         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
263         try {
264             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
265                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
266         }
267         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
268             if(jre.getLinkedCause()!=null)
269                 jre.getLinkedCause().printStackTrace();
270             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
271         }
272         assertNotNull("binding is null", binding);
273
274         // Time out after a minute
275
binding.setTimeout(60000);
276
277         // Test operation
278
test.wsdl.marshall2.types.FloatArrayTestResponse value = null;
279         value = binding.floatArrayTest(new test.wsdl.marshall2.types.FloatArrayTest(new float[]{67,75}));
280         // TBD - validate results
281
}
282
283     public void test12Marshall2PortFloatTest() throws Exception JavaDoc {
284         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
285         try {
286             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
287                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
288         }
289         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
290             if(jre.getLinkedCause()!=null)
291                 jre.getLinkedCause().printStackTrace();
292             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
293         }
294         assertNotNull("binding is null", binding);
295
296         // Time out after a minute
297
binding.setTimeout(60000);
298
299         // Test operation
300
test.wsdl.marshall2.types.FloatTestResponse value = null;
301         value = binding.floatTest(new test.wsdl.marshall2.types.FloatTest(56));
302         // TBD - validate results
303
}
304
305     public void test13Marshall2PortIntArrayTest() throws Exception JavaDoc {
306         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
307         try {
308             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
309                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
310         }
311         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
312             if(jre.getLinkedCause()!=null)
313                 jre.getLinkedCause().printStackTrace();
314             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
315         }
316         assertNotNull("binding is null", binding);
317
318         // Time out after a minute
319
binding.setTimeout(60000);
320
321         // Test operation
322
test.wsdl.marshall2.types.IntArrayTestResponse value = null;
323         value = binding.intArrayTest(new test.wsdl.marshall2.types.IntArrayTest(new int[]{3,4}));
324         // TBD - validate results
325
}
326
327     public void test14Marshall2PortIntTest() throws Exception JavaDoc {
328         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
329         try {
330             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
331                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
332         }
333         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
334             if(jre.getLinkedCause()!=null)
335                 jre.getLinkedCause().printStackTrace();
336             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
337         }
338         assertNotNull("binding is null", binding);
339
340         // Time out after a minute
341
binding.setTimeout(60000);
342
343         // Test operation
344
test.wsdl.marshall2.types.IntTestResponse value = null;
345         value = binding.intTest(new test.wsdl.marshall2.types.IntTest(3));
346         // TBD - validate results
347
}
348
349     public void test15Marshall2PortLongArrayTest() throws Exception JavaDoc {
350         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
351         try {
352             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
353                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
354         }
355         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
356             if(jre.getLinkedCause()!=null)
357                 jre.getLinkedCause().printStackTrace();
358             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
359         }
360         assertNotNull("binding is null", binding);
361
362         // Time out after a minute
363
binding.setTimeout(60000);
364
365         // Test operation
366
test.wsdl.marshall2.types.LongArrayTestResponse value = null;
367         value = binding.longArrayTest(new test.wsdl.marshall2.types.LongArrayTest(new long[]{3,4}));
368         // TBD - validate results
369
}
370
371     public void test16Marshall2PortLongTest() throws Exception JavaDoc {
372         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
373         try {
374             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
375                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
376         }
377         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
378             if(jre.getLinkedCause()!=null)
379                 jre.getLinkedCause().printStackTrace();
380             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
381         }
382         assertNotNull("binding is null", binding);
383
384         // Time out after a minute
385
binding.setTimeout(60000);
386
387         // Test operation
388
test.wsdl.marshall2.types.LongTestResponse value = null;
389         value = binding.longTest(new test.wsdl.marshall2.types.LongTest(5467));
390         // TBD - validate results
391
}
392
393     public void test17Marshall2PortShortArrayTest() throws Exception JavaDoc {
394         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
395         try {
396             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
397                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
398         }
399         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
400             if(jre.getLinkedCause()!=null)
401                 jre.getLinkedCause().printStackTrace();
402             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
403         }
404         assertNotNull("binding is null", binding);
405
406         // Time out after a minute
407
binding.setTimeout(60000);
408
409         // Test operation
410
test.wsdl.marshall2.types.ShortArrayTestResponse value = null;
411         value = binding.shortArrayTest(new test.wsdl.marshall2.types.ShortArrayTest(new short[]{(short)3,(short)4}));
412         // TBD - validate results
413
}
414
415     public void test18Marshall2PortShortTest() throws Exception JavaDoc {
416         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
417         try {
418             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
419                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
420         }
421         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
422             if(jre.getLinkedCause()!=null)
423                 jre.getLinkedCause().printStackTrace();
424             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
425         }
426         assertNotNull("binding is null", binding);
427
428         // Time out after a minute
429
binding.setTimeout(60000);
430
431         // Test operation
432
test.wsdl.marshall2.types.ShortTestResponse value = null;
433         value = binding.shortTest(new test.wsdl.marshall2.types.ShortTest((short)4));
434         // TBD - validate results
435
}
436
437     public void test19Marshall2PortStringArrayTest() throws Exception JavaDoc {
438         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
439         try {
440             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
441                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
442         }
443         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
444             if(jre.getLinkedCause()!=null)
445                 jre.getLinkedCause().printStackTrace();
446             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
447         }
448         assertNotNull("binding is null", binding);
449
450         // Time out after a minute
451
binding.setTimeout(60000);
452
453         // Test operation
454
test.wsdl.marshall2.types.StringArrayTestResponse value = null;
455         value = binding.stringArrayTest(new test.wsdl.marshall2.types.StringArrayTest(new String JavaDoc[]{ "foo1",
456                                                                                                     "foo2",
457                                                                                                     "foo3",
458                                                                                                     "",
459                                                                                                     null
460                                                                                                 }));
461         // TBD - validate results
462
}
463
464     public void test20Marshall2PortStringTest() throws Exception JavaDoc {
465         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
466         try {
467             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
468                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
469         }
470         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
471             if(jre.getLinkedCause()!=null)
472                 jre.getLinkedCause().printStackTrace();
473             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
474         }
475         assertNotNull("binding is null", binding);
476
477         // Time out after a minute
478
binding.setTimeout(60000);
479
480         // Test operation
481
test.wsdl.marshall2.types.StringTestResponse value = null;
482         value = binding.stringTest(new test.wsdl.marshall2.types.StringTest("foo"));
483         // TBD - validate results
484
}
485
486     public void test21Marshall2PortQnameTest() throws Exception JavaDoc {
487         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
488         try {
489             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
490                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
491         }
492         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
493             if(jre.getLinkedCause()!=null)
494                 jre.getLinkedCause().printStackTrace();
495             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
496         }
497         assertNotNull("binding is null", binding);
498
499         // Time out after a minute
500
binding.setTimeout(60000);
501
502         // Test operation
503
test.wsdl.marshall2.types.QNameTestResponse value = null;
504         value = binding.qnameTest(new test.wsdl.marshall2.types.QNameTest(Constants.QNAME_FAULTDETAIL_HOSTNAME));
505         // TBD - validate results
506
}
507
508     public void test22Marshall2PortQnameArrayTest() throws Exception JavaDoc {
509         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
510         try {
511             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
512                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
513         }
514         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
515             if(jre.getLinkedCause()!=null)
516                 jre.getLinkedCause().printStackTrace();
517             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
518         }
519         assertNotNull("binding is null", binding);
520
521         // Time out after a minute
522
binding.setTimeout(60000);
523
524         // Test operation
525
test.wsdl.marshall2.types.QNameArrayTestResponse value = null;
526         value = binding.qnameArrayTest(new test.wsdl.marshall2.types.QNameArrayTest(new QName JavaDoc[]{Constants.QNAME_FAULTDETAIL_HOSTNAME,Constants.QNAME_FAULTDETAIL_EXCEPTIONNAME, new QName JavaDoc("someLocalPart"),
527                                                                                                 new QName JavaDoc("http://someURI.org/", "someLocalPart"),
528                                                                                                 null
529                                                                                                 }));
530         // TBD - validate results
531
}
532
533     public void test23Marshall2PortCalendarArrayTest() throws Exception JavaDoc {
534         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
535         try {
536             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
537                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
538         }
539         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
540             if(jre.getLinkedCause()!=null)
541                 jre.getLinkedCause().printStackTrace();
542             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
543         }
544         assertNotNull("binding is null", binding);
545
546         // Time out after a minute
547
binding.setTimeout(60000);
548
549         // Test operation
550
test.wsdl.marshall2.types.CalendarArrayTestResponse value = null;
551         value = binding.calendarArrayTest(new test.wsdl.marshall2.types.CalendarArrayTest(new Calendar JavaDoc[]{Calendar.getInstance(),
552                                                                                                          new GregorianCalendar JavaDoc(96,5,1),
553                                                                                                          new GregorianCalendar JavaDoc(99,10,25),
554                                                                                                          null
555                                                                                                          }));
556     }
557
558     public void test24Marshall2PortCalendarTest() throws Exception JavaDoc {
559         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
560         try {
561             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
562                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
563         }
564         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
565             if(jre.getLinkedCause()!=null)
566                 jre.getLinkedCause().printStackTrace();
567             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
568         }
569         assertNotNull("binding is null", binding);
570
571         // Time out after a minute
572
binding.setTimeout(60000);
573
574         // Test operation
575
test.wsdl.marshall2.types.CalendarTestResponse value = null;
576         value = binding.calendarTest(new test.wsdl.marshall2.types.CalendarTest(Calendar.getInstance()));
577         // TBD - validate results
578
}
579
580     public void test25Marshall2PortJavaBeanArrayTest() throws Exception JavaDoc {
581         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
582         try {
583             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
584                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
585         }
586         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
587             if(jre.getLinkedCause()!=null)
588                 jre.getLinkedCause().printStackTrace();
589             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
590         }
591         assertNotNull("binding is null", binding);
592
593         // Time out after a minute
594
binding.setTimeout(60000);
595
596         JavaBean b = new JavaBean();
597         b.setMyBigDecimal(new BigDecimal JavaDoc(4));
598         b.setMyBigInteger(new BigInteger JavaDoc("5"));
599         b.setMyBoolean(false);
600         b.setMyByte((byte)0x1);
601         b.setMyCalendar(Calendar.getInstance());
602         b.setMyDouble(4);
603         b.setMyFloat(5);
604         b.setMyInt(6);
605         b.setMyLong(3);
606         b.setMyString("sdfsdf");
607         b.setMyJavaBean(new JavaBean2(new BigDecimal JavaDoc(5),
608                                       (double)5,
609                                       (long)2,
610                                       (short)1,
611                                       (int)1,
612                                       Calendar.getInstance(),
613                                       (byte)0x1,
614                                       true,
615                                       "xxx",
616                                       new BigInteger JavaDoc("4"),
617                                       (float)3));
618
619         JavaBean b2 = new JavaBean();
620         b2.setMyBigDecimal(new BigDecimal JavaDoc(4));
621         b2.setMyBigInteger(new BigInteger JavaDoc("5"));
622         b2.setMyBoolean(false);
623         b2.setMyByte((byte)0x1);
624         b2.setMyCalendar(Calendar.getInstance());
625         b2.setMyDouble(4);
626         b2.setMyFloat(5);
627         b2.setMyInt(6);
628         b2.setMyLong(3);
629         b2.setMyString("sdfsdf");
630         b2.setMyJavaBean(new JavaBean2(new BigDecimal JavaDoc(5),
631                                       (double)5,
632                                       (long)2,
633                                       (short)1,
634                                       (int)1,
635                                       Calendar.getInstance(),
636                                       (byte)0x1,
637                                       true,
638                                       "xxx",
639                                       new BigInteger JavaDoc("4"),
640                                       (float)3));
641         
642         
643         // Test operation
644
test.wsdl.marshall2.types.JavaBeanArrayTestResponse value = null;
645         value = binding.javaBeanArrayTest(new test.wsdl.marshall2.types.JavaBeanArrayTest(new JavaBean[]{b,b2}));
646         // TBD - validate results
647
}
648
649     public void test26Marshall2PortJavaBeanTest() throws Exception JavaDoc {
650         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
651         try {
652             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
653                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
654         }
655         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
656             if(jre.getLinkedCause()!=null)
657                 jre.getLinkedCause().printStackTrace();
658             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
659         }
660         assertNotNull("binding is null", binding);
661
662         JavaBean b = new JavaBean();
663         b.setMyBigDecimal(new BigDecimal JavaDoc(4));
664         b.setMyBigInteger(new BigInteger JavaDoc("5"));
665         b.setMyBoolean(false);
666         b.setMyByte((byte)0x1);
667         b.setMyCalendar(Calendar.getInstance());
668         b.setMyDouble(4);
669         b.setMyFloat(5);
670         b.setMyInt(6);
671         b.setMyLong(3);
672         b.setMyString("sdfsdf");
673         b.setMyJavaBean(new JavaBean2(new BigDecimal JavaDoc(5),
674                                       (double)5,
675                                       (long)2,
676                                       (short)1,
677                                       (int)1,
678                                       Calendar.getInstance(),
679                                       (byte)0x1,
680                                       true,
681                                       "xxx",
682                                       new BigInteger JavaDoc("4"),
683                                       (float)3));
684         // Time out after a minute
685
binding.setTimeout(60000);
686
687         // Test operation
688
test.wsdl.marshall2.types.JavaBeanTestResponse value = null;
689         value = binding.javaBeanTest(new test.wsdl.marshall2.types.JavaBeanTest(b));
690         // TBD - validate results
691
}
692
693     public void test27Marshall2PortAnyURITest() throws Exception JavaDoc {
694         test.wsdl.marshall2.MarshallTestSoapBindingStub binding;
695         try {
696             binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub)
697                           new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port();
698         }
699         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
700             if(jre.getLinkedCause()!=null)
701                 jre.getLinkedCause().printStackTrace();
702             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
703         }
704         assertNotNull("binding is null", binding);
705
706         URI JavaDoc b = new URI JavaDoc("urn:something");
707         // Time out after a minute
708
binding.setTimeout(60000);
709
710         // Test operation
711
test.wsdl.marshall2.types.FooAnyURITypeResponse value = null;
712         value = binding.fooAnyURITest(new test.wsdl.marshall2.types.FooAnyURIType(b));
713         // TBD - validate results
714
}
715 }
716
Popular Tags