1 7 8 package test.wsdl.marshall2; 9 10 import org.apache.axis.Constants; 11 12 import javax.xml.namespace.QName ; 13 import java.math.BigDecimal ; 14 import java.math.BigInteger ; 15 import java.util.Calendar ; 16 import java.util.GregorianCalendar ; 17 import java.net.URI ; 18 19 import test.wsdl.marshall2.types.JavaBean; 20 import test.wsdl.marshall2.types.JavaBean2; 21 22 public class Marshall2ServiceTestCase extends junit.framework.TestCase { 23 public Marshall2ServiceTestCase(java.lang.String name) { 24 super(name); 25 } 26 27 public void testMarshall2PortWSDL() throws Exception { 28 javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance(); 29 java.net.URL url = new java.net.URL (new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2PortAddress() + "?WSDL"); 30 javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.marshall2.Marshall2ServiceLocator().getServiceName()); 31 assertTrue(service != null); 32 } 33 34 public void test1Marshall2PortBigDecimalArrayTest() throws Exception { 35 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 36 try { 37 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 38 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 39 } 40 catch (javax.xml.rpc.ServiceException jre) { 41 if(jre.getLinkedCause()!=null) 42 jre.getLinkedCause().printStackTrace(); 43 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 44 } 45 assertNotNull("binding is null", binding); 46 47 binding.setTimeout(60000); 49 50 test.wsdl.marshall2.types.BigDecimalArrayTestResponse value = null; 52 value = binding.bigDecimalArrayTest(new test.wsdl.marshall2.types.BigDecimalArrayTest(new BigDecimal []{new BigDecimal ("5.0"), 53 new BigDecimal ("3512359.1456"), 54 new BigDecimal ("3512360.1456"), 55 null 56 })); 57 } 58 59 public void test2Marshall2PortBigDecimalTest() throws Exception { 60 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 61 try { 62 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 63 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 64 } 65 catch (javax.xml.rpc.ServiceException jre) { 66 if(jre.getLinkedCause()!=null) 67 jre.getLinkedCause().printStackTrace(); 68 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 69 } 70 assertNotNull("binding is null", binding); 71 72 binding.setTimeout(60000); 74 75 test.wsdl.marshall2.types.BigDecimalTestResponse value = null; 77 value = binding.bigDecimalTest(new test.wsdl.marshall2.types.BigDecimalTest(new BigDecimal ("5.0"))); 78 } 80 81 public void test3Marshall2PortBigIntegerArrayTest() throws Exception { 82 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 83 try { 84 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 85 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 86 } 87 catch (javax.xml.rpc.ServiceException jre) { 88 if(jre.getLinkedCause()!=null) 89 jre.getLinkedCause().printStackTrace(); 90 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 91 } 92 assertNotNull("binding is null", binding); 93 94 binding.setTimeout(60000); 96 97 test.wsdl.marshall2.types.BigIntegerArrayTestResponse value = null; 99 value = binding.bigIntegerArrayTest(new test.wsdl.marshall2.types.BigIntegerArrayTest(new BigInteger []{new BigInteger ("5"), 100 new BigInteger ("3512359"), 101 new BigInteger ("3512360"), 102 null 103 })); 104 } 106 107 public void test4Marshall2PortBigIntegerTest() throws Exception { 108 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 109 try { 110 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 111 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 112 } 113 catch (javax.xml.rpc.ServiceException jre) { 114 if(jre.getLinkedCause()!=null) 115 jre.getLinkedCause().printStackTrace(); 116 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 117 } 118 assertNotNull("binding is null", binding); 119 120 binding.setTimeout(60000); 122 123 test.wsdl.marshall2.types.BigIntegerTestResponse value = null; 125 value = binding.bigIntegerTest(new test.wsdl.marshall2.types.BigIntegerTest(new BigInteger ("8"))); 126 } 128 129 public void test5Marshall2PortBooleanArrayTest() throws Exception { 130 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 131 try { 132 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 133 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 134 } 135 catch (javax.xml.rpc.ServiceException jre) { 136 if(jre.getLinkedCause()!=null) 137 jre.getLinkedCause().printStackTrace(); 138 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 139 } 140 assertNotNull("binding is null", binding); 141 142 binding.setTimeout(60000); 144 145 test.wsdl.marshall2.types.BooleanArrayTestResponse value = null; 147 value = binding.booleanArrayTest(new test.wsdl.marshall2.types.BooleanArrayTest(new boolean[]{true,false})); 148 } 150 151 public void test6Marshall2PortBooleanTest() throws Exception { 152 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 153 try { 154 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 155 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 156 } 157 catch (javax.xml.rpc.ServiceException jre) { 158 if(jre.getLinkedCause()!=null) 159 jre.getLinkedCause().printStackTrace(); 160 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 161 } 162 assertNotNull("binding is null", binding); 163 164 binding.setTimeout(60000); 166 167 test.wsdl.marshall2.types.BooleanTestResponse value = null; 169 value = binding.booleanTest(new test.wsdl.marshall2.types.BooleanTest(true)); 170 } 172 173 public void test7Marshall2PortByteArrayTest() throws Exception { 174 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 175 try { 176 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 177 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 178 } 179 catch (javax.xml.rpc.ServiceException jre) { 180 if(jre.getLinkedCause()!=null) 181 jre.getLinkedCause().printStackTrace(); 182 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 183 } 184 assertNotNull("binding is null", binding); 185 186 binding.setTimeout(60000); 188 189 test.wsdl.marshall2.types.ByteArrayTestResponse value = null; 191 value = binding.byteArrayTest(new test.wsdl.marshall2.types.ByteArrayTest("hello".getBytes())); 192 } 194 195 public void test8Marshall2PortByteTest() throws Exception { 196 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 197 try { 198 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 199 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 200 } 201 catch (javax.xml.rpc.ServiceException jre) { 202 if(jre.getLinkedCause()!=null) 203 jre.getLinkedCause().printStackTrace(); 204 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 205 } 206 assertNotNull("binding is null", binding); 207 208 binding.setTimeout(60000); 210 211 test.wsdl.marshall2.types.ByteTestResponse value = null; 213 value = binding.byteTest(new test.wsdl.marshall2.types.ByteTest("x".getBytes()[0])); 214 } 216 217 public void test9Marshall2PortDoubleArrayTest() throws Exception { 218 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 219 try { 220 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 221 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 222 } 223 catch (javax.xml.rpc.ServiceException jre) { 224 if(jre.getLinkedCause()!=null) 225 jre.getLinkedCause().printStackTrace(); 226 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 227 } 228 assertNotNull("binding is null", binding); 229 230 binding.setTimeout(60000); 232 233 test.wsdl.marshall2.types.DoubleArrayTestResponse value = null; 235 value = binding.doubleArrayTest(new test.wsdl.marshall2.types.DoubleArrayTest(new double[]{4,5})); 236 } 238 239 public void test10Marshall2PortDoubleTest() throws Exception { 240 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 241 try { 242 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 243 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 244 } 245 catch (javax.xml.rpc.ServiceException jre) { 246 if(jre.getLinkedCause()!=null) 247 jre.getLinkedCause().printStackTrace(); 248 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 249 } 250 assertNotNull("binding is null", binding); 251 252 binding.setTimeout(60000); 254 255 test.wsdl.marshall2.types.DoubleTestResponse value = null; 257 value = binding.doubleTest(new test.wsdl.marshall2.types.DoubleTest(4)); 258 } 260 261 public void test11Marshall2PortFloatArrayTest() throws Exception { 262 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 263 try { 264 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 265 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 266 } 267 catch (javax.xml.rpc.ServiceException jre) { 268 if(jre.getLinkedCause()!=null) 269 jre.getLinkedCause().printStackTrace(); 270 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 271 } 272 assertNotNull("binding is null", binding); 273 274 binding.setTimeout(60000); 276 277 test.wsdl.marshall2.types.FloatArrayTestResponse value = null; 279 value = binding.floatArrayTest(new test.wsdl.marshall2.types.FloatArrayTest(new float[]{67,75})); 280 } 282 283 public void test12Marshall2PortFloatTest() throws Exception { 284 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 285 try { 286 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 287 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 288 } 289 catch (javax.xml.rpc.ServiceException jre) { 290 if(jre.getLinkedCause()!=null) 291 jre.getLinkedCause().printStackTrace(); 292 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 293 } 294 assertNotNull("binding is null", binding); 295 296 binding.setTimeout(60000); 298 299 test.wsdl.marshall2.types.FloatTestResponse value = null; 301 value = binding.floatTest(new test.wsdl.marshall2.types.FloatTest(56)); 302 } 304 305 public void test13Marshall2PortIntArrayTest() throws Exception { 306 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 307 try { 308 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 309 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 310 } 311 catch (javax.xml.rpc.ServiceException jre) { 312 if(jre.getLinkedCause()!=null) 313 jre.getLinkedCause().printStackTrace(); 314 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 315 } 316 assertNotNull("binding is null", binding); 317 318 binding.setTimeout(60000); 320 321 test.wsdl.marshall2.types.IntArrayTestResponse value = null; 323 value = binding.intArrayTest(new test.wsdl.marshall2.types.IntArrayTest(new int[]{3,4})); 324 } 326 327 public void test14Marshall2PortIntTest() throws Exception { 328 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 329 try { 330 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 331 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 332 } 333 catch (javax.xml.rpc.ServiceException jre) { 334 if(jre.getLinkedCause()!=null) 335 jre.getLinkedCause().printStackTrace(); 336 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 337 } 338 assertNotNull("binding is null", binding); 339 340 binding.setTimeout(60000); 342 343 test.wsdl.marshall2.types.IntTestResponse value = null; 345 value = binding.intTest(new test.wsdl.marshall2.types.IntTest(3)); 346 } 348 349 public void test15Marshall2PortLongArrayTest() throws Exception { 350 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 351 try { 352 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 353 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 354 } 355 catch (javax.xml.rpc.ServiceException jre) { 356 if(jre.getLinkedCause()!=null) 357 jre.getLinkedCause().printStackTrace(); 358 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 359 } 360 assertNotNull("binding is null", binding); 361 362 binding.setTimeout(60000); 364 365 test.wsdl.marshall2.types.LongArrayTestResponse value = null; 367 value = binding.longArrayTest(new test.wsdl.marshall2.types.LongArrayTest(new long[]{3,4})); 368 } 370 371 public void test16Marshall2PortLongTest() throws Exception { 372 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 373 try { 374 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 375 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 376 } 377 catch (javax.xml.rpc.ServiceException jre) { 378 if(jre.getLinkedCause()!=null) 379 jre.getLinkedCause().printStackTrace(); 380 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 381 } 382 assertNotNull("binding is null", binding); 383 384 binding.setTimeout(60000); 386 387 test.wsdl.marshall2.types.LongTestResponse value = null; 389 value = binding.longTest(new test.wsdl.marshall2.types.LongTest(5467)); 390 } 392 393 public void test17Marshall2PortShortArrayTest() throws Exception { 394 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 395 try { 396 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 397 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 398 } 399 catch (javax.xml.rpc.ServiceException jre) { 400 if(jre.getLinkedCause()!=null) 401 jre.getLinkedCause().printStackTrace(); 402 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 403 } 404 assertNotNull("binding is null", binding); 405 406 binding.setTimeout(60000); 408 409 test.wsdl.marshall2.types.ShortArrayTestResponse value = null; 411 value = binding.shortArrayTest(new test.wsdl.marshall2.types.ShortArrayTest(new short[]{(short)3,(short)4})); 412 } 414 415 public void test18Marshall2PortShortTest() throws Exception { 416 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 417 try { 418 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 419 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 420 } 421 catch (javax.xml.rpc.ServiceException jre) { 422 if(jre.getLinkedCause()!=null) 423 jre.getLinkedCause().printStackTrace(); 424 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 425 } 426 assertNotNull("binding is null", binding); 427 428 binding.setTimeout(60000); 430 431 test.wsdl.marshall2.types.ShortTestResponse value = null; 433 value = binding.shortTest(new test.wsdl.marshall2.types.ShortTest((short)4)); 434 } 436 437 public void test19Marshall2PortStringArrayTest() throws Exception { 438 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 439 try { 440 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 441 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 442 } 443 catch (javax.xml.rpc.ServiceException jre) { 444 if(jre.getLinkedCause()!=null) 445 jre.getLinkedCause().printStackTrace(); 446 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 447 } 448 assertNotNull("binding is null", binding); 449 450 binding.setTimeout(60000); 452 453 test.wsdl.marshall2.types.StringArrayTestResponse value = null; 455 value = binding.stringArrayTest(new test.wsdl.marshall2.types.StringArrayTest(new String []{ "foo1", 456 "foo2", 457 "foo3", 458 "", 459 null 460 })); 461 } 463 464 public void test20Marshall2PortStringTest() throws Exception { 465 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 466 try { 467 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 468 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 469 } 470 catch (javax.xml.rpc.ServiceException jre) { 471 if(jre.getLinkedCause()!=null) 472 jre.getLinkedCause().printStackTrace(); 473 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 474 } 475 assertNotNull("binding is null", binding); 476 477 binding.setTimeout(60000); 479 480 test.wsdl.marshall2.types.StringTestResponse value = null; 482 value = binding.stringTest(new test.wsdl.marshall2.types.StringTest("foo")); 483 } 485 486 public void test21Marshall2PortQnameTest() throws Exception { 487 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 488 try { 489 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 490 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 491 } 492 catch (javax.xml.rpc.ServiceException jre) { 493 if(jre.getLinkedCause()!=null) 494 jre.getLinkedCause().printStackTrace(); 495 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 496 } 497 assertNotNull("binding is null", binding); 498 499 binding.setTimeout(60000); 501 502 test.wsdl.marshall2.types.QNameTestResponse value = null; 504 value = binding.qnameTest(new test.wsdl.marshall2.types.QNameTest(Constants.QNAME_FAULTDETAIL_HOSTNAME)); 505 } 507 508 public void test22Marshall2PortQnameArrayTest() throws Exception { 509 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 510 try { 511 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 512 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 513 } 514 catch (javax.xml.rpc.ServiceException jre) { 515 if(jre.getLinkedCause()!=null) 516 jre.getLinkedCause().printStackTrace(); 517 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 518 } 519 assertNotNull("binding is null", binding); 520 521 binding.setTimeout(60000); 523 524 test.wsdl.marshall2.types.QNameArrayTestResponse value = null; 526 value = binding.qnameArrayTest(new test.wsdl.marshall2.types.QNameArrayTest(new QName []{Constants.QNAME_FAULTDETAIL_HOSTNAME,Constants.QNAME_FAULTDETAIL_EXCEPTIONNAME, new QName ("someLocalPart"), 527 new QName ("http://someURI.org/", "someLocalPart"), 528 null 529 })); 530 } 532 533 public void test23Marshall2PortCalendarArrayTest() throws Exception { 534 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 535 try { 536 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 537 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 538 } 539 catch (javax.xml.rpc.ServiceException jre) { 540 if(jre.getLinkedCause()!=null) 541 jre.getLinkedCause().printStackTrace(); 542 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 543 } 544 assertNotNull("binding is null", binding); 545 546 binding.setTimeout(60000); 548 549 test.wsdl.marshall2.types.CalendarArrayTestResponse value = null; 551 value = binding.calendarArrayTest(new test.wsdl.marshall2.types.CalendarArrayTest(new Calendar []{Calendar.getInstance(), 552 new GregorianCalendar (96,5,1), 553 new GregorianCalendar (99,10,25), 554 null 555 })); 556 } 557 558 public void test24Marshall2PortCalendarTest() throws Exception { 559 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 560 try { 561 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 562 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 563 } 564 catch (javax.xml.rpc.ServiceException jre) { 565 if(jre.getLinkedCause()!=null) 566 jre.getLinkedCause().printStackTrace(); 567 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 568 } 569 assertNotNull("binding is null", binding); 570 571 binding.setTimeout(60000); 573 574 test.wsdl.marshall2.types.CalendarTestResponse value = null; 576 value = binding.calendarTest(new test.wsdl.marshall2.types.CalendarTest(Calendar.getInstance())); 577 } 579 580 public void test25Marshall2PortJavaBeanArrayTest() throws Exception { 581 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 582 try { 583 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 584 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 585 } 586 catch (javax.xml.rpc.ServiceException jre) { 587 if(jre.getLinkedCause()!=null) 588 jre.getLinkedCause().printStackTrace(); 589 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 590 } 591 assertNotNull("binding is null", binding); 592 593 binding.setTimeout(60000); 595 596 JavaBean b = new JavaBean(); 597 b.setMyBigDecimal(new BigDecimal (4)); 598 b.setMyBigInteger(new BigInteger ("5")); 599 b.setMyBoolean(false); 600 b.setMyByte((byte)0x1); 601 b.setMyCalendar(Calendar.getInstance()); 602 b.setMyDouble(4); 603 b.setMyFloat(5); 604 b.setMyInt(6); 605 b.setMyLong(3); 606 b.setMyString("sdfsdf"); 607 b.setMyJavaBean(new JavaBean2(new BigDecimal (5), 608 (double)5, 609 (long)2, 610 (short)1, 611 (int)1, 612 Calendar.getInstance(), 613 (byte)0x1, 614 true, 615 "xxx", 616 new BigInteger ("4"), 617 (float)3)); 618 619 JavaBean b2 = new JavaBean(); 620 b2.setMyBigDecimal(new BigDecimal (4)); 621 b2.setMyBigInteger(new BigInteger ("5")); 622 b2.setMyBoolean(false); 623 b2.setMyByte((byte)0x1); 624 b2.setMyCalendar(Calendar.getInstance()); 625 b2.setMyDouble(4); 626 b2.setMyFloat(5); 627 b2.setMyInt(6); 628 b2.setMyLong(3); 629 b2.setMyString("sdfsdf"); 630 b2.setMyJavaBean(new JavaBean2(new BigDecimal (5), 631 (double)5, 632 (long)2, 633 (short)1, 634 (int)1, 635 Calendar.getInstance(), 636 (byte)0x1, 637 true, 638 "xxx", 639 new BigInteger ("4"), 640 (float)3)); 641 642 643 test.wsdl.marshall2.types.JavaBeanArrayTestResponse value = null; 645 value = binding.javaBeanArrayTest(new test.wsdl.marshall2.types.JavaBeanArrayTest(new JavaBean[]{b,b2})); 646 } 648 649 public void test26Marshall2PortJavaBeanTest() throws Exception { 650 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 651 try { 652 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 653 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 654 } 655 catch (javax.xml.rpc.ServiceException jre) { 656 if(jre.getLinkedCause()!=null) 657 jre.getLinkedCause().printStackTrace(); 658 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 659 } 660 assertNotNull("binding is null", binding); 661 662 JavaBean b = new JavaBean(); 663 b.setMyBigDecimal(new BigDecimal (4)); 664 b.setMyBigInteger(new BigInteger ("5")); 665 b.setMyBoolean(false); 666 b.setMyByte((byte)0x1); 667 b.setMyCalendar(Calendar.getInstance()); 668 b.setMyDouble(4); 669 b.setMyFloat(5); 670 b.setMyInt(6); 671 b.setMyLong(3); 672 b.setMyString("sdfsdf"); 673 b.setMyJavaBean(new JavaBean2(new BigDecimal (5), 674 (double)5, 675 (long)2, 676 (short)1, 677 (int)1, 678 Calendar.getInstance(), 679 (byte)0x1, 680 true, 681 "xxx", 682 new BigInteger ("4"), 683 (float)3)); 684 binding.setTimeout(60000); 686 687 test.wsdl.marshall2.types.JavaBeanTestResponse value = null; 689 value = binding.javaBeanTest(new test.wsdl.marshall2.types.JavaBeanTest(b)); 690 } 692 693 public void test27Marshall2PortAnyURITest() throws Exception { 694 test.wsdl.marshall2.MarshallTestSoapBindingStub binding; 695 try { 696 binding = (test.wsdl.marshall2.MarshallTestSoapBindingStub) 697 new test.wsdl.marshall2.Marshall2ServiceLocator().getMarshall2Port(); 698 } 699 catch (javax.xml.rpc.ServiceException jre) { 700 if(jre.getLinkedCause()!=null) 701 jre.getLinkedCause().printStackTrace(); 702 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 703 } 704 assertNotNull("binding is null", binding); 705 706 URI b = new URI ("urn:something"); 707 binding.setTimeout(60000); 709 710 test.wsdl.marshall2.types.FooAnyURITypeResponse value = null; 712 value = binding.fooAnyURITest(new test.wsdl.marshall2.types.FooAnyURIType(b)); 713 } 715 } 716 | Popular Tags |