1 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 binding.setTimeout(60000); 37 38 int value = -3; 40 value = binding.getEmployeeCount(0); 41 } 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 binding.setTimeout(60000); 59 60 boolean value = false; 62 value = binding.addGroups(new java.lang.String [0]); 63 } 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 binding.setTimeout(60000); 81 82 boolean value = false; 84 value = binding.isManager(new java.lang.String (), new java.lang.String ()); 85 } 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 binding.setTimeout(60000); 103 104 boolean value = false; 106 value = binding.promoteEmployee(new test.wsdl.wrapped2.xsd.NameType(), 0); 107 } 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 binding.setTimeout(60000); 125 126 test.wsdl.wrapped2.xsd.EmployeeType[] value = null; 128 value = binding.getEmployees(new test.wsdl.wrapped2.xsd.NameType[0]); 129 } 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 binding.setTimeout(60000); 147 148 boolean value = false; 150 value = binding.scheduleMtg(new test.wsdl.wrapped2.xsd.EmployeeType[0]); 151 } 153 154 } 155 | Popular Tags |