| 1 |
/** |
| 2 |
* Wrapped_HoldersTestCase.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 |
* This test verify's that arrays in a wrapped doc/lit service get holders |
| 12 |
* generated for them, and that they work. |
| 13 |
* |
| 14 |
* @author Tom Jordahl |
| 15 |
*/ |
| 16 |
public class Wrapped_HoldersTestCase extends junit.framework.TestCase { |
| 17 |
public Wrapped_HoldersTestCase(java.lang.String name) { |
| 18 |
super(name); |
| 19 |
} |
| 20 |
public void test1ThingFind_aThing() throws Exception { |
| 21 |
test.wsdl.wrapped_holders.Thing binding; |
| 22 |
try { |
| 23 |
binding = new test.wsdl.wrapped_holders.Wrapped_holdersLocator().getThing(); |
| 24 |
} |
| 25 |
catch (javax.xml.rpc.ServiceException jre) { |
| 26 |
if(jre.getLinkedCause()!=null) |
| 27 |
jre.getLinkedCause().printStackTrace(); |
| 28 |
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); |
| 29 |
} |
| 30 |
assertTrue("binding is null", binding != null); |
| 31 |
|
| 32 |
// expected results |
| 33 |
String[] things = new String[2]; |
| 34 |
things[0] = new String("Thing one"); |
| 35 |
things[1] = new String("Thing two"); |
| 36 |
String[] others = new String[2]; |
| 37 |
others[0] = new String("Other 1"); |
| 38 |
others[1] = new String("Other 2"); |
| 39 |
|
| 40 |
// input arguments |
| 41 |
String AthingInput = new String("This is a test"); |
| 42 |
test.wsdl.wrapped_holders.holders.AThingArrayHolder AThingsOut = new test.wsdl.wrapped_holders.holders.AThingArrayHolder(); |
| 43 |
test.wsdl.wrapped_holders.holders.OtherDataArrayHolder OtherDataOut = new test.wsdl.wrapped_holders.holders.OtherDataArrayHolder(); |
| 44 |
|
| 45 |
// call the operation |
| 46 |
binding.find_aThing(AthingInput, AThingsOut, OtherDataOut); |
| 47 |
|
| 48 |
// verify results |
| 49 |
assertEquals("Output argument (Things) does not match expected", things[0], AThingsOut.value[0]); |
| 50 |
assertEquals("Output argument (Things) does not match expected", things[1], AThingsOut.value[1]); |
| 51 |
assertEquals("Output argument (OtherData) does not match expected", others[0], OtherDataOut.value[0]); |
| 52 |
assertEquals("Output argument (OtherData) does not match expected", others[1], OtherDataOut.value[1]); |
| 53 |
} |
| 54 |
|
| 55 |
} |