1 7 8 package test.wsdl.header; 9 10 public class HeaderServiceTestCase extends junit.framework.TestCase { 11 public HeaderServiceTestCase(java.lang.String name) { 12 super(name); 13 } 14 15 16 24 25 public void test1headerOp1() throws Exception { 26 test.wsdl.header.BindingStub binding; 27 try { 28 binding = (test.wsdl.header.BindingStub) 29 new test.wsdl.header.HeaderServiceLocator().getheader(); 30 } 31 catch (javax.xml.rpc.ServiceException jre) { 32 if(jre.getLinkedCause()!=null) 33 jre.getLinkedCause().printStackTrace(); 34 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 35 } 36 assertNotNull("binding is null", binding); 37 38 binding.setTimeout(60000); 40 41 try { 43 float value = -3; 44 value = binding.op1(0, new java.lang.String (), new test.wsdl.header.HeaderType()); 45 } 46 catch (test.wsdl.header.Op1Fault e1) { 47 throw new junit.framework.AssertionFailedError("op1Fault Exception caught: " + e1); 48 } 49 } 51 52 public void test2headerOp2() throws Exception { 53 test.wsdl.header.BindingStub binding; 54 try { 55 binding = (test.wsdl.header.BindingStub) 56 new test.wsdl.header.HeaderServiceLocator().getheader(); 57 } 58 catch (javax.xml.rpc.ServiceException jre) { 59 if(jre.getLinkedCause()!=null) 60 jre.getLinkedCause().printStackTrace(); 61 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 62 } 63 assertNotNull("binding is null", binding); 64 65 binding.setTimeout(60000); 67 68 binding.op2(0, new test.wsdl.header.HeaderType()); 70 } 72 73 } 74 | Popular Tags |