KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > wsdl > wrapped_holders > ThingImpl


1 /**
2  * ThingImpl.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis WSDL2Java emitter.
6  */

7
8 package test.wsdl.wrapped_holders;
9
10
11
12 /**
13  * This test verify's that arrays in a wrapped doc/lit service get holders
14  * generated for them, and that they work.
15  *
16  * @author Tom Jordahl
17  */

18 public class ThingImpl implements test.wsdl.wrapped_holders.Thing{
19     public void find_aThing(String JavaDoc aThing,
20                             test.wsdl.wrapped_holders.holders.AThingArrayHolder aThingUnbounded,
21                             test.wsdl.wrapped_holders.holders.OtherDataArrayHolder otherDataUnbounded)
22             throws java.rmi.RemoteException JavaDoc {
23         // Verify we get a string in aThing input argument
24
String JavaDoc input = aThing;
25         if (input == null || !input.equals("This is a test")) {
26             String JavaDoc error = "Input argument did not match expected string, got: ";
27             error += input != null ? "'" + input + "'" : "NULL";
28             error += " Expected: 'This is a test'";
29             throw new java.rmi.RemoteException JavaDoc(error);
30         }
31         
32         // now send something back
33
String JavaDoc[] things = new String JavaDoc[2];
34         things[0] = new String JavaDoc("Thing one");
35         things[1] = new String JavaDoc("Thing two");
36         aThingUnbounded.value = things;
37         String JavaDoc[] others = new String JavaDoc[2];
38         others[0] = new String JavaDoc("Other 1");
39         others[1] = new String JavaDoc("Other 2");
40         otherDataUnbounded.value = others;
41     }
42
43 }
44
Popular Tags