1 7 8 package test.wsdl.nested; 9 import org.apache.axis.message.MessageElement; 10 import test.wsdl.nested.holders._PE_ADDRESSHolder; 11 import test.wsdl.nested.holders._RETURNHolder; 12 13 public class Nested2ServiceTestCase extends junit.framework.TestCase { 14 public Nested2ServiceTestCase(String name) { 15 super(name); 16 } 17 18 26 27 public void test1NestedNestedSvc2() { 28 test.wsdl.nested.Nested2PortType binding; 29 try { 30 binding = new test.wsdl.nested.Nested2ServiceLocator().getNested(); 31 } 32 catch (javax.xml.rpc.ServiceException jre) { 33 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 34 } 35 assertTrue("binding is null", binding != null); 36 37 try { 38 _PE_ADDRESSHolder pE_ADDRESS = new _PE_ADDRESSHolder(); 39 _RETURNHolder rETURN = new _RETURNHolder(); 40 binding.nestedSvc2(new java.lang.String ("0000001000"), 41 new java.lang.String ("01"), 42 new java.lang.String ("00"), 43 new java.lang.String (""), 44 new java.lang.String ("1000"), 45 pE_ADDRESS, 46 rETURN); 47 _PE_ADDRESS address = pE_ADDRESS.value; 48 _RETURN ret = rETURN.value; 49 assertTrue("NAME is wrong", address.getNAME().equals("Becker Berlin")); 50 assertTrue("LOGMSGNO is wrong", ret.getLOG_MSG_NO().equals("123456")); 51 MessageElement [] any = address.get_any(); 52 assertNotNull("No 'any' content", any); 53 assertTrue("any is wrong:" + any[0], 54 any[0].getObjectValue().equals("Test Any")); 55 } 56 catch (java.rmi.RemoteException re) { 57 throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); 58 } 59 } 60 61 public static void main(String [] args){ 62 Nested2ServiceTestCase testcase = new Nested2ServiceTestCase("Nested2ServiceTestCase"); 63 testcase.test1NestedNestedSvc2(); 64 } 65 } 66 67 | Popular Tags |