01: /**
02: * StarWarsTestCase.java
03: *
04: * This file was auto-generated from WSDL
05: * by the Apache Axis 1.3 Oct 16, 2005 (11:41:21 EDT) WSDL2Java emitter.
06: */package samples.xbeans;
07:
08: public class StarWarsTestCase extends junit.framework.TestCase {
09: public StarWarsTestCase(java.lang.String name) {
10: super (name);
11: }
12:
13: /** TODO: Fix me
14: public void testStarWarsPortWSDL() throws Exception {
15: javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
16: java.net.URL url = new java.net.URL(new samples.xbeans.StarWarsLocator().getStarWarsPortAddress() + "?WSDL");
17: javax.xml.rpc.Service service = serviceFactory.createService(url, new samples.xbeans.StarWarsLocator().getServiceName());
18: assertTrue(service != null);
19: }
20:
21: **/
22:
23: public void test1StarWarsPortGetChewbecca() throws Exception {
24: samples.xbeans.StarWarsBindingStub binding;
25: try {
26: binding = (samples.xbeans.StarWarsBindingStub) new samples.xbeans.StarWarsLocator()
27: .getStarWarsPort();
28: } catch (javax.xml.rpc.ServiceException jre) {
29: if (jre.getLinkedCause() != null)
30: jre.getLinkedCause().printStackTrace();
31: throw new junit.framework.AssertionFailedError(
32: "JAX-RPC ServiceException caught: " + jre);
33: }
34: assertNotNull("binding is null", binding);
35:
36: // Time out after a minute
37: binding.setTimeout(60000);
38:
39: // Test operation
40: com.superflaco.xbeans.Character value = null;
41: value = binding.getChewbecca();
42: // TBD - validate results
43:
44: assertNotNull(value);
45:
46: System.out.println(value.toString());
47: }
48: }
|