tomj 2002/05/31 14:31:17 Modified: java/test/wsdl/interop3 run.sh java/test/wsdl/interop3/rpcEnc build.xml Added: java/test/wsdl/interop3/rpcEnc RpcEncTestCase.java Log: Add test client for RpcEnc tests Revision Changes Path 1.2 +2 -2 xml-axis/java/test/wsdl/interop3/run.sh Index: run.sh =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/interop3/run.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- run.sh 31 May 2002 20:28:21 -0000 1.1 +++ run.sh 31 May 2002 21:31:17 -0000 1.2 @@ -76,7 +76,7 @@ # RpcEnc echo RpcEnc -if [ ! -z "${RpcEnv}" ]; then +if [ ! -z "${RpcEnc}" ]; then java test.wsdl.interop3.rpcEnc.RpcEncTestCase ${RpcEnc} echo "=======================================================" fi @@ -84,7 +84,7 @@ # TestList echo TestList if [ ! -z "${TestList}" ]; then -java test.wsdl.interop3.groupE.client.InteropTestListServiceTestClient ${TestList} +java test.wsdl.interop3.groupE.client.InteropTestListServiceTestClient -l ${TestList} echo "=======================================================" fi 1.12 +3 -0 xml-axis/java/test/wsdl/interop3/rpcEnc/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/interop3/rpcEnc/build.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- build.xml 30 May 2002 23:46:04 -0000 1.11 +++ build.xml 31 May 2002 21:31:17 -0000 1.12 @@ -27,6 +27,9 @@ <copy file="WSDLInteropTestRpcEncPortBindingImpl.java" overwrite="true" todir="${root.dir}/build/work/test/wsdl/interop3/${testname}"/> + <copy file="RpcEncTestCase.java" overwrite="true" + todir="${root.dir}/build/work/test/wsdl/interop3/${testname}"/> + <!-- compile the skeletons --> <javac srcdir="${build.dir}/work" destdir="${build.dest}" debug="on"> 1.1 xml-axis/java/test/wsdl/interop3/rpcEnc/RpcEncTestCase.java Index: RpcEncTestCase.java =================================================================== package test.wsdl.interop3.rpcEnc; import test.wsdl.interop3.rpcEnc.xsd.SOAPStruct; import java.net.URL; /* <!-- SOAP Builder's round III web services --> <!-- interoperability testing: import1 --> <!-- (see http://www.whitemesa.net/r3/plan.html) --> <!-- Step 1. Start with predefined WSDL --> <!-- Step 2. Generate client from predefined WSDL --> <!-- Step 3. Test generated client against --> <!-- pre-built server --> <!-- Step 4. Generate server from predefined WSDL --> <!-- Step 5. Test generated client against --> <!-- generated server --> <!-- Step 6. Generate second client from --> <!-- generated server's WSDL (some clients --> <!-- can do this dynamically) --> <!-- Step 7. Test second generated client against --> <!-- generated server --> <!-- Step 8. Test second generated client against --> <!-- pre-built server --> */ public class RpcEncTestCase extends junit.framework.TestCase { static URL url; public RpcEncTestCase(String name) { super(name); } protected void setUp() throws Exception { } public void testStep3() throws Exception { WSDLInteropTestRpcEncPortType binding; try { if (url != null) { binding = new WSDLInteropTestRpcEncServiceLocator().getWSDLInteropTestRpcEncPort(url); } else { binding = new WSDLInteropTestRpcEncServiceLocator().getWSDLInteropTestRpcEncPort(); } } catch (javax.xml.rpc.ServiceException jre) { throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); } assertNotNull("binding is null", binding); String str = "Hello there!"; String [] strArray = new String [] { "1", "two", "trois" }; assertEquals("echoString results differ", binding.echoString(str), str); String [] resArray = binding.echoStringArray(strArray); assertEquals("String array lengths differ", strArray.length, resArray.length); for (int i = 0; i < strArray.length; i++) { assertEquals("Array members at index " + i + " differ", strArray[i], resArray[i]); } SOAPStruct struct = new SOAPStruct(); struct.setVarFloat(3.14159F); struct.setVarInt(69); struct.setVarString("Struct-o-rama"); assertTrue("Structs weren't equal", struct.equals(binding.echoStruct(struct))); } public static void main(String[] args) { if (args.length == 1) { try { url = new URL(args[0]); } catch (Exception e) { } } junit.textui.TestRunner.run(new junit.framework.TestSuite(RpcEncTestCase.class)); } // main }