1 7 8 package test.wsdl.wrapped_inout; 9 10 public class WrappedInOutTestCase extends junit.framework.TestCase { 11 public WrappedInOutTestCase(java.lang.String name) { 12 super(name); 13 } 14 public void test1WrappedInOutEchoString() throws Exception { 15 test.wsdl.wrapped_inout.WrappedInOutInterface binding; 16 try { 17 binding = new test.wsdl.wrapped_inout.WrappedInOutLocator().getWrappedInOut(); 18 } 19 catch (javax.xml.rpc.ServiceException jre) { 20 if(jre.getLinkedCause()!=null) 21 jre.getLinkedCause().printStackTrace(); 22 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 23 } 24 assertTrue("binding is null", binding != null); 25 26 java.lang.String expected = new String ("This is a test"); 27 java.lang.String value = null; 28 value = binding.echoString(expected); 29 assertEquals(value, expected); 30 } 31 32 public void test1WrappedInOutEchoEmptyString() throws Exception { 33 test.wsdl.wrapped_inout.WrappedInOutInterface binding; 34 try { 35 binding = new test.wsdl.wrapped_inout.WrappedInOutLocator().getWrappedInOut(); 36 } 37 catch (javax.xml.rpc.ServiceException jre) { 38 if(jre.getLinkedCause()!=null) 39 jre.getLinkedCause().printStackTrace(); 40 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 41 } 42 assertTrue("binding is null", binding != null); 43 44 java.lang.String expected = new String (""); 45 java.lang.String value = null; 46 value = binding.echoString(expected); 47 assertEquals(value, expected); 48 } 49 50 public void test2WrappedInOutEchoStringIO() throws Exception { 51 test.wsdl.wrapped_inout.WrappedInOutInterface binding; 52 try { 53 binding = new test.wsdl.wrapped_inout.WrappedInOutLocator().getWrappedInOut(); 54 } 55 catch (javax.xml.rpc.ServiceException jre) { 56 if(jre.getLinkedCause()!=null) 57 jre.getLinkedCause().printStackTrace(); 58 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 59 } 60 assertTrue("binding is null", binding != null); 61 62 java.lang.String expected = new String ("This is a test"); 63 java.lang.String value = null; 64 value = binding.echoStringIO(expected); 65 assertEquals(value, expected); 66 } 67 68 public void test3WrappedInOutEchoStringIOret() throws Exception { 69 test.wsdl.wrapped_inout.WrappedInOutInterface binding; 70 try { 71 binding = new test.wsdl.wrapped_inout.WrappedInOutLocator().getWrappedInOut(); 72 } 73 catch (javax.xml.rpc.ServiceException jre) { 74 if(jre.getLinkedCause()!=null) 75 jre.getLinkedCause().printStackTrace(); 76 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 77 } 78 assertTrue("binding is null", binding != null); 79 80 java.lang.String value = null; 81 javax.xml.rpc.holders.StringHolder ioarg = new javax.xml.rpc.holders.StringHolder ("in1"); 82 value = binding.echoStringIOret(ioarg); 83 assertEquals(value, "return"); 84 assertNotNull(ioarg); 85 assertEquals(ioarg.value, "out1"); 86 } 87 88 public void test4WrappedInOutEchoStringInIO() throws Exception { 89 test.wsdl.wrapped_inout.WrappedInOutInterface binding; 90 try { 91 binding = new test.wsdl.wrapped_inout.WrappedInOutLocator().getWrappedInOut(); 92 } 93 catch (javax.xml.rpc.ServiceException jre) { 94 if(jre.getLinkedCause()!=null) 95 jre.getLinkedCause().printStackTrace(); 96 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 97 } 98 assertTrue("binding is null", binding != null); 99 100 javax.xml.rpc.holders.StringHolder holder = new javax.xml.rpc.holders.StringHolder ("in2"); 101 binding.echoStringInIO("in1", holder); 102 assertNotNull(holder); 103 assertEquals(holder.value, "in1"); 104 } 105 106 public void test5WrappedInOutEchoStringBig() throws Exception { 107 test.wsdl.wrapped_inout.WrappedInOutInterface binding; 108 try { 109 binding = new test.wsdl.wrapped_inout.WrappedInOutLocator().getWrappedInOut(); 110 } 111 catch (javax.xml.rpc.ServiceException jre) { 112 if(jre.getLinkedCause()!=null) 113 jre.getLinkedCause().printStackTrace(); 114 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 115 } 116 assertTrue("binding is null", binding != null); 117 118 java.lang.String value = null; 119 javax.xml.rpc.holders.StringHolder ioarg1 = new javax.xml.rpc.holders.StringHolder ("ioarg1"); 120 javax.xml.rpc.holders.StringHolder ioarg2 = new javax.xml.rpc.holders.StringHolder ("ioarg2"); 121 value = binding.echoStringBig("firstin1", ioarg1, ioarg2); 122 assertNotNull(value); 123 assertEquals(value, "firstin1"); 124 assertEquals(ioarg1.value, "out1"); 125 assertEquals(ioarg2.value, "out2"); 126 } 127 128 public void test6WrappedInOutHelloInOut() throws Exception { 129 test.wsdl.wrapped_inout.WrappedInOutInterface binding; 130 try { 131 binding = new test.wsdl.wrapped_inout.WrappedInOutLocator().getWrappedInOut(); 132 } 133 catch (javax.xml.rpc.ServiceException jre) { 134 if(jre.getLinkedCause()!=null) 135 jre.getLinkedCause().printStackTrace(); 136 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 137 } 138 assertTrue("binding is null", binding != null); 139 140 javax.xml.rpc.holders.StringHolder ioarg1 = new javax.xml.rpc.holders.StringHolder ("ioarg1"); 141 javax.xml.rpc.holders.StringHolder ioarg2 = new javax.xml.rpc.holders.StringHolder ("ioarg2"); 142 javax.xml.rpc.holders.StringHolder ioarg3 = new javax.xml.rpc.holders.StringHolder ("ioarg3"); 143 javax.xml.rpc.holders.StringHolder ioarg4 = new javax.xml.rpc.holders.StringHolder ("ioarg4"); 144 binding.helloInOut(ioarg1, ioarg2, ioarg3, ioarg4, "onlyInput"); 145 assertEquals(ioarg1.value, "out1"); 146 assertEquals(ioarg2.value, "out2"); 147 assertEquals(ioarg3.value, "out3"); 148 assertEquals(ioarg4.value, "out4"); 149 } 150 151 public void test7WrappedInOutEchoPhone() throws Exception { 152 test.wsdl.wrapped_inout.WrappedInOutInterface binding; 153 try { 154 binding = new test.wsdl.wrapped_inout.WrappedInOutLocator().getWrappedInOut(); 155 } 156 catch (javax.xml.rpc.ServiceException jre) { 157 if(jre.getLinkedCause()!=null) 158 jre.getLinkedCause().printStackTrace(); 159 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 160 } 161 assertTrue("binding is null", binding != null); 162 163 test.wsdl.wrapped_inout.Phone value = null; 164 test.wsdl.wrapped_inout.Phone in = new test.wsdl.wrapped_inout.Phone(); 165 in.setAreaCode("503"); 166 in.setPrefix("281"); 167 in.setNumber("0816"); 168 value = binding.echoPhone(in); 169 assertNotNull(value); 170 assertEquals(value, in); 171 } 172 173 } 174 | Popular Tags |