1 7 8 package test.wsdl.schema2; 9 10 public class Schema2ServiceTestCase extends junit.framework.TestCase { 11 public Schema2ServiceTestCase(java.lang.String name) { 12 super(name); 13 } 14 15 public void testSchema2ServiceWSDL() 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.schema2.Schema2ServiceLocator().getSchema2ServiceAddress() + "?WSDL"); 18 javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.schema2.Schema2ServiceLocator().getServiceName()); 19 assertTrue(service != null); 20 } 21 22 public void test1Schema2ServiceEchoLanguageTypeTest() throws Exception { 23 test.wsdl.schema2.Schema2ServiceSoapBindingStub binding; 24 try { 25 binding = (test.wsdl.schema2.Schema2ServiceSoapBindingStub) 26 new test.wsdl.schema2.Schema2ServiceLocator().getSchema2Service(); 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 java.lang.String value = null; 40 value = binding.echoLanguageTypeTest(new java.lang.String ("ABC")); 41 } 43 44 public void test2Schema2ServiceEchoTokenTypeTest() throws Exception { 45 test.wsdl.schema2.Schema2ServiceSoapBindingStub binding; 46 try { 47 binding = (test.wsdl.schema2.Schema2ServiceSoapBindingStub) 48 new test.wsdl.schema2.Schema2ServiceLocator().getSchema2Service(); 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 java.lang.String value = null; 62 value = binding.echoTokenTypeTest(new java.lang.String ("ABC")); 63 } 65 66 public void test3Schema2ServiceEchoNameTypeTest() throws Exception { 67 test.wsdl.schema2.Schema2ServiceSoapBindingStub binding; 68 try { 69 binding = (test.wsdl.schema2.Schema2ServiceSoapBindingStub) 70 new test.wsdl.schema2.Schema2ServiceLocator().getSchema2Service(); 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 java.lang.String value = null; 84 value = binding.echoNameTypeTest(new java.lang.String ("ABC")); 85 } 87 88 public void test4Schema2ServiceEchoNCNameTypeTest() throws Exception { 89 test.wsdl.schema2.Schema2ServiceSoapBindingStub binding; 90 try { 91 binding = (test.wsdl.schema2.Schema2ServiceSoapBindingStub) 92 new test.wsdl.schema2.Schema2ServiceLocator().getSchema2Service(); 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 java.lang.String value = null; 106 value = binding.echoNCNameTypeTest(new java.lang.String ("ABC")); 107 } 109 110 public void test5Schema2ServiceEchoIDTypeTest() throws Exception { 111 test.wsdl.schema2.Schema2ServiceSoapBindingStub binding; 112 try { 113 binding = (test.wsdl.schema2.Schema2ServiceSoapBindingStub) 114 new test.wsdl.schema2.Schema2ServiceLocator().getSchema2Service(); 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 java.lang.String value = null; 128 value = binding.echoIDTypeTest(new java.lang.String ("ABC")); 129 } 131 132 public void test6Schema2ServiceEchoUnsignedShortTest() throws Exception { 133 test.wsdl.schema2.Schema2ServiceSoapBindingStub binding; 134 try { 135 binding = (test.wsdl.schema2.Schema2ServiceSoapBindingStub) 136 new test.wsdl.schema2.Schema2ServiceLocator().getSchema2Service(); 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 int value = -3; 150 value = binding.echoUnsignedShortTest(123); 151 } 153 154 public void test7Schema2ServiceEchoUnsignedIntTest() throws Exception { 155 test.wsdl.schema2.Schema2ServiceSoapBindingStub binding; 156 try { 157 binding = (test.wsdl.schema2.Schema2ServiceSoapBindingStub) 158 new test.wsdl.schema2.Schema2ServiceLocator().getSchema2Service(); 159 } 160 catch (javax.xml.rpc.ServiceException jre) { 161 if(jre.getLinkedCause()!=null) 162 jre.getLinkedCause().printStackTrace(); 163 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 164 } 165 assertNotNull("binding is null", binding); 166 167 binding.setTimeout(60000); 169 170 long value = -3; 172 value = binding.echoUnsignedIntTest(234); 173 } 175 176 public void test8Schema2ServiceEchoUnsignedByteTest() throws Exception { 177 test.wsdl.schema2.Schema2ServiceSoapBindingStub binding; 178 try { 179 binding = (test.wsdl.schema2.Schema2ServiceSoapBindingStub) 180 new test.wsdl.schema2.Schema2ServiceLocator().getSchema2Service(); 181 } 182 catch (javax.xml.rpc.ServiceException jre) { 183 if(jre.getLinkedCause()!=null) 184 jre.getLinkedCause().printStackTrace(); 185 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 186 } 187 assertNotNull("binding is null", binding); 188 189 binding.setTimeout(60000); 191 192 short value = -3; 194 value = binding.echoUnsignedByteTest((short)456); 195 } 197 198 public void test9Schema2ServiceEchoUnsignedLongTest() throws Exception { 199 test.wsdl.schema2.Schema2ServiceSoapBindingStub binding; 200 try { 201 binding = (test.wsdl.schema2.Schema2ServiceSoapBindingStub) 202 new test.wsdl.schema2.Schema2ServiceLocator().getSchema2Service(); 203 } 204 catch (javax.xml.rpc.ServiceException jre) { 205 if(jre.getLinkedCause()!=null) 206 jre.getLinkedCause().printStackTrace(); 207 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 208 } 209 assertNotNull("binding is null", binding); 210 211 binding.setTimeout(60000); 213 214 java.math.BigInteger value = null; 216 value = binding.echoUnsignedLongTest(new java.math.BigInteger ("567")); 217 } 219 220 public void test10Schema2ServiceEchoNonPositiveIntegerTest() throws Exception { 221 test.wsdl.schema2.Schema2ServiceSoapBindingStub binding; 222 try { 223 binding = (test.wsdl.schema2.Schema2ServiceSoapBindingStub) 224 new test.wsdl.schema2.Schema2ServiceLocator().getSchema2Service(); 225 } 226 catch (javax.xml.rpc.ServiceException jre) { 227 if(jre.getLinkedCause()!=null) 228 jre.getLinkedCause().printStackTrace(); 229 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 230 } 231 assertNotNull("binding is null", binding); 232 233 binding.setTimeout(60000); 235 236 java.math.BigInteger value = null; 238 value = binding.echoNonPositiveIntegerTest(new java.math.BigInteger ("678")); 239 } 241 242 public void test11Schema2ServiceEchoNonNegativeIntegerTest() throws Exception { 243 test.wsdl.schema2.Schema2ServiceSoapBindingStub binding; 244 try { 245 binding = (test.wsdl.schema2.Schema2ServiceSoapBindingStub) 246 new test.wsdl.schema2.Schema2ServiceLocator().getSchema2Service(); 247 } 248 catch (javax.xml.rpc.ServiceException jre) { 249 if(jre.getLinkedCause()!=null) 250 jre.getLinkedCause().printStackTrace(); 251 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 252 } 253 assertNotNull("binding is null", binding); 254 255 binding.setTimeout(60000); 257 258 java.math.BigInteger value = null; 260 value = binding.echoNonNegativeIntegerTest(new java.math.BigInteger ("8910")); 261 } 263 264 public void test12Schema2ServiceEchoPositiveIntegerTest() throws Exception { 265 test.wsdl.schema2.Schema2ServiceSoapBindingStub binding; 266 try { 267 binding = (test.wsdl.schema2.Schema2ServiceSoapBindingStub) 268 new test.wsdl.schema2.Schema2ServiceLocator().getSchema2Service(); 269 } 270 catch (javax.xml.rpc.ServiceException jre) { 271 if(jre.getLinkedCause()!=null) 272 jre.getLinkedCause().printStackTrace(); 273 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 274 } 275 assertNotNull("binding is null", binding); 276 277 binding.setTimeout(60000); 279 280 java.math.BigInteger value = null; 282 value = binding.echoPositiveIntegerTest(new java.math.BigInteger ("91011")); 283 } 285 286 public void test13Schema2ServiceEchoNegativeIntegerTest() throws Exception { 287 test.wsdl.schema2.Schema2ServiceSoapBindingStub binding; 288 try { 289 binding = (test.wsdl.schema2.Schema2ServiceSoapBindingStub) 290 new test.wsdl.schema2.Schema2ServiceLocator().getSchema2Service(); 291 } 292 catch (javax.xml.rpc.ServiceException jre) { 293 if(jre.getLinkedCause()!=null) 294 jre.getLinkedCause().printStackTrace(); 295 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 296 } 297 assertNotNull("binding is null", binding); 298 299 binding.setTimeout(60000); 301 302 java.math.BigInteger value = null; 304 value = binding.echoNegativeIntegerTest(new java.math.BigInteger ("111213")); 305 } 307 308 public void test14Schema2ServiceEchoTimeTest() throws Exception { 309 test.wsdl.schema2.Schema2ServiceSoapBindingStub binding; 310 try { 311 binding = (test.wsdl.schema2.Schema2ServiceSoapBindingStub) 312 new test.wsdl.schema2.Schema2ServiceLocator().getSchema2Service(); 313 } 314 catch (javax.xml.rpc.ServiceException jre) { 315 if(jre.getLinkedCause()!=null) 316 jre.getLinkedCause().printStackTrace(); 317 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 318 } 319 assertNotNull("binding is null", binding); 320 321 binding.setTimeout(60000); 323 324 java.util.Calendar value = null; 326 value = binding.echoTimeTest(java.util.Calendar.getInstance()); 327 } 329 330 public void test15Schema2ServiceEchoDateTest() throws Exception { 331 test.wsdl.schema2.Schema2ServiceSoapBindingStub binding; 332 try { 333 binding = (test.wsdl.schema2.Schema2ServiceSoapBindingStub) 334 new test.wsdl.schema2.Schema2ServiceLocator().getSchema2Service(); 335 } 336 catch (javax.xml.rpc.ServiceException jre) { 337 if(jre.getLinkedCause()!=null) 338 jre.getLinkedCause().printStackTrace(); 339 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 340 } 341 assertNotNull("binding is null", binding); 342 343 binding.setTimeout(60000); 345 346 java.util.Calendar value = null; 348 value = binding.echoDateTest(java.util.Calendar.getInstance()); 349 } 351 352 public void test16Schema2ServiceEchoDocumentTest() throws Exception { 353 test.wsdl.schema2.Schema2ServiceSoapBindingStub binding; 354 try { 355 binding = (test.wsdl.schema2.Schema2ServiceSoapBindingStub) 356 new test.wsdl.schema2.Schema2ServiceLocator().getSchema2Service(); 357 } 358 catch (javax.xml.rpc.ServiceException jre) { 359 if(jre.getLinkedCause()!=null) 360 jre.getLinkedCause().printStackTrace(); 361 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 362 } 363 assertNotNull("binding is null", binding); 364 365 binding.setTimeout(60000); 367 368 Document value = new Document(); 370 value.set_value("XYZ"); 371 value.setID("ID#1"); 372 value = binding.echoDocument(value); 373 assertEquals("ID#1",value.getID()); 375 assertEquals("XYZ",value.get_value()); 376 } 377 } 378 | Popular Tags |