| 1 |
/** |
| 2 |
* EmployeeDatabaseTestCase.java |
| 3 |
* |
| 4 |
* This file was auto-generated from WSDL |
| 5 |
* by the Apache Axis 1.2dev Oct 26, 2003 (08:57:14 EST) WSDL2Java emitter. |
| 6 |
*/ |
| 7 |
|
| 8 |
package test.wsdl.wrapped2; |
| 9 |
|
| 10 |
public class EmployeeDatabaseTestCase extends junit.framework.TestCase { |
| 11 |
public EmployeeDatabaseTestCase(java.lang.String name) { |
| 12 |
super(name); |
| 13 |
} |
| 14 |
|
| 15 |
public void testEmployeeDatabaseWSDL() throws Exception { |
| 16 |
javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance(); |
| 17 |
java.net.URL url = new java.net.URL(new test.wsdl.wrapped2.EmployeeDatabaseLocator().getEmployeeDatabaseAddress() + "?WSDL"); |
| 18 |
javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.wrapped2.EmployeeDatabaseLocator().getServiceName()); |
| 19 |
assertTrue(service != null); |
| 20 |
} |
| 21 |
|
| 22 |
public void test1EmployeeDatabaseGetEmployeeCount() throws Exception { |
| 23 |
test.wsdl.wrapped2.EmployeeDBBindingStub binding; |
| 24 |
try { |
| 25 |
binding = (test.wsdl.wrapped2.EmployeeDBBindingStub) |
| 26 |
new test.wsdl.wrapped2.EmployeeDatabaseLocator().getEmployeeDatabase(); |
| 27 |
} |
| 28 |
catch (javax.xml.rpc.ServiceException jre) { |
| 29 |
if(jre.getLinkedCause()!=null) |
| 30 |
jre.getLinkedCause().printStackTrace(); |
| 31 |
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); |
| 32 |
} |
| 33 |
assertNotNull("binding is null", binding); |
| 34 |
|
| 35 |
// Time out after a minute |
| 36 |
binding.setTimeout(60000); |
| 37 |
|
| 38 |
// Test operation |
| 39 |
int value = -3; |
| 40 |
value = binding.getEmployeeCount(0); |
| 41 |
// TBD - validate results |
| 42 |
} |
| 43 |
|
| 44 |
public void test2EmployeeDatabaseAddGroups() throws Exception { |
| 45 |
test.wsdl.wrapped2.EmployeeDBBindingStub binding; |
| 46 |
try { |
| 47 |
binding = (test.wsdl.wrapped2.EmployeeDBBindingStub) |
| 48 |
new test.wsdl.wrapped2.EmployeeDatabaseLocator().getEmployeeDatabase(); |
| 49 |
} |
| 50 |
catch (javax.xml.rpc.ServiceException jre) { |
| 51 |
if(jre.getLinkedCause()!=null) |
| 52 |
jre.getLinkedCause().printStackTrace(); |
| 53 |
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); |
| 54 |
} |
| 55 |
assertNotNull("binding is null", binding); |
| 56 |
|
| 57 |
// Time out after a minute |
| 58 |
binding.setTimeout(60000); |
| 59 |
|
| 60 |
// Test operation |
| 61 |
boolean value = false; |
| 62 |
value = binding.addGroups(new java.lang.String[0]); |
| 63 |
// TBD - validate results |
| 64 |
} |
| 65 |
|
| 66 |
public void test3EmployeeDatabaseIsManager() throws Exception { |
| 67 |
test.wsdl.wrapped2.EmployeeDBBindingStub binding; |
| 68 |
try { |
| 69 |
binding = (test.wsdl.wrapped2.EmployeeDBBindingStub) |
| 70 |
new test.wsdl.wrapped2.EmployeeDatabaseLocator().getEmployeeDatabase(); |
| 71 |
} |
| 72 |
catch (javax.xml.rpc.ServiceException jre) { |
| 73 |
if(jre.getLinkedCause()!=null) |
| 74 |
jre.getLinkedCause().printStackTrace(); |
| 75 |
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); |
| 76 |
} |
| 77 |
assertNotNull("binding is null", binding); |
| 78 |
|
| 79 |
// Time out after a minute |
| 80 |
binding.setTimeout(60000); |
| 81 |
|
| 82 |
// Test operation |
| 83 |
boolean value = false; |
| 84 |
value = binding.isManager(new java.lang.String(), new java.lang.String()); |
| 85 |
// TBD - validate results |
| 86 |
} |
| 87 |
|
| 88 |
public void test4EmployeeDatabasePromoteEmployee() throws Exception { |
| 89 |
test.wsdl.wrapped2.EmployeeDBBindingStub binding; |
| 90 |
try { |
| 91 |
binding = (test.wsdl.wrapped2.EmployeeDBBindingStub) |
| 92 |
new test.wsdl.wrapped2.EmployeeDatabaseLocator().getEmployeeDatabase(); |
| 93 |
} |
| 94 |
catch (javax.xml.rpc.ServiceException jre) { |
| 95 |
if(jre.getLinkedCause()!=null) |
| 96 |
jre.getLinkedCause().printStackTrace(); |
| 97 |
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); |
| 98 |
} |
| 99 |
assertNotNull("binding is null", binding); |
| 100 |
|
| 101 |
// Time out after a minute |
| 102 |
binding.setTimeout(60000); |
| 103 |
|
| 104 |
// Test operation |
| 105 |
boolean value = false; |
| 106 |
value = binding.promoteEmployee(new test.wsdl.wrapped2.xsd.NameType(), 0); |
| 107 |
// TBD - validate results |
| 108 |
} |
| 109 |
|
| 110 |
public void test5EmployeeDatabaseGetEmployees() throws Exception { |
| 111 |
test.wsdl.wrapped2.EmployeeDBBindingStub binding; |
| 112 |
try { |
| 113 |
binding = (test.wsdl.wrapped2.EmployeeDBBindingStub) |
| 114 |
new test.wsdl.wrapped2.EmployeeDatabaseLocator().getEmployeeDatabase(); |
| 115 |
} |
| 116 |
catch (javax.xml.rpc.ServiceException jre) { |
| 117 |
if(jre.getLinkedCause()!=null) |
| 118 |
jre.getLinkedCause().printStackTrace(); |
| 119 |
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); |
| 120 |
} |
| 121 |
assertNotNull("binding is null", binding); |
| 122 |
|
| 123 |
// Time out after a minute |
| 124 |
binding.setTimeout(60000); |
| 125 |
|
| 126 |
// Test operation |
| 127 |
test.wsdl.wrapped2.xsd.EmployeeType[] value = null; |
| 128 |
value = binding.getEmployees(new test.wsdl.wrapped2.xsd.NameType[0]); |
| 129 |
// TBD - validate results |
| 130 |
} |
| 131 |
|
| 132 |
public void test6EmployeeDatabaseScheduleMtg() throws Exception { |
| 133 |
test.wsdl.wrapped2.EmployeeDBBindingStub binding; |
| 134 |
try { |
| 135 |
binding = (test.wsdl.wrapped2.EmployeeDBBindingStub) |
| 136 |
new test.wsdl.wrapped2.EmployeeDatabaseLocator().getEmployeeDatabase(); |
| 137 |
} |
| 138 |
catch (javax.xml.rpc.ServiceException jre) { |
| 139 |
if(jre.getLinkedCause()!=null) |
| 140 |
jre.getLinkedCause().printStackTrace(); |
| 141 |
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); |
| 142 |
} |
| 143 |
assertNotNull("binding is null", binding); |
| 144 |
|
| 145 |
// Time out after a minute |
| 146 |
binding.setTimeout(60000); |
| 147 |
|
| 148 |
// Test operation |
| 149 |
boolean value = false; |
| 150 |
value = binding.scheduleMtg(new test.wsdl.wrapped2.xsd.EmployeeType[0]); |
| 151 |
// TBD - validate results |
| 152 |
} |
| 153 |
|
| 154 |
} |