tomj 2002/05/31 13:28:22 Modified: java/test/wsdl/interop3/docLitParam build.xml Added: java/test/wsdl/interop3 run.sh endpoints client_deploy.wsdd client-config.wsdd java/test/wsdl/interop3/docLitParam DocLitParamTestCase.java Log: Add a driver script for the interop tests and the client configuration files to get Axis to log requests and responses. Also add a test client for the DocLitParam interop test. Revision Changes Path 1.1 xml-axis/java/test/wsdl/interop3/run.sh Index: run.sh =================================================================== #!/bin/sh # # Driver script to run the interop 3 test clients against # a list of endpoints (one for each test) # # Usage: run <endpointfile> # # Where <endpointfile> has the syntax # TESTNAME="<endpoint>" # if [ $# -ne 1 ]; then echo "Usage: run endpointfile" exit 1 fi endpoints=$1 # set up endpoints . $endpoints # EmptySA #if [ ! -z "${Import1}" ]; then #java test.wsdl.interop3.emptySA.EmptySATestCase ${EmptySA} #fi # Import1 echo Import1 if [ ! -z "${Import1}" ]; then java test.wsdl.interop3.import1.Import1TestCase ${Import1} echo "=======================================================" fi # Import2 echo Import2 if [ ! -z "${Import2}" ]; then java test.wsdl.interop3.import2.Import2TestCase ${Import2} echo "=======================================================" fi # Import3 echo Import3 if [ ! -z "${Import3}" ]; then java test.wsdl.interop3.import3.Import3TestCase ${Import3} echo "=======================================================" fi # Compound1 echo Compound1 if [ ! -z "${Compound1}" ]; then java test.wsdl.interop3.compound1.Compound1TestCase ${Compound1} echo "=======================================================" fi # Compound2 echo Compound2 if [ ! -z "${Compound2}" ]; then java test.wsdl.interop3.compound2.Compound2TestCase ${Compound2} echo "=======================================================" fi # DocLit echo DocLit if [ ! -z "${DocLit}" ]; then java test.wsdl.interop3.docLit.DocLitTestCase ${DocLit} echo "=======================================================" fi # DocLitParam echo DocLitParam if [ ! -z "${DocLitParam}" ]; then java test.wsdl.interop3.docLitParam.DocLitParamTestCase ${DocLitParam} echo "=======================================================" fi # RpcEnc echo RpcEnc if [ ! -z "${RpcEnv}" ]; then java test.wsdl.interop3.rpcEnc.RpcEncTestCase ${RpcEnc} echo "=======================================================" fi # TestList echo TestList if [ ! -z "${TestList}" ]; then java test.wsdl.interop3.groupE.client.InteropTestListServiceTestClient ${TestList} echo "=======================================================" fi # TestHeaders #if [ ! -z "${TestHeaders}" ]; then #java test.wsdl.interop3.emptySA.EmptySATestCase ${TestHeaders} #echo "=======================================================" #fi 1.1 xml-axis/java/test/wsdl/interop3/endpoints Index: endpoints =================================================================== # # Whitemesa endpoints # # Where <endpointfile> has the syntax # TESTNAME="<endpoint>" # Import1=http://www.whitemesa.net/interop/r3/import1 Import2=http://www.whitemesa.net/interop/r3/import2 Import3=http://www.whitemesa.net/interop/r3/import3 Compound1=http://www.whitemesa.net/interop/r3/compound1 Compound2=http://www.whitemesa.net/interop/r3/compound2 DocLit=http://www.whitemesa.net/interop/r3/doclit DocLitParam=http://www.whitemesa.net/interop/r3/doclitparam RpcEnc=http://www.whitemesa.net/interop/r3/rpcEnc # EmptySA=http://www.whitemesa.net/interop/r3/emptySA #Group E TestList= TestHeaders=http://www.whitemesa.net/interop/r3/testheaders 1.1 xml-axis/java/test/wsdl/interop3/client_deploy.wsdd Index: client_deploy.wsdd =================================================================== <!-- Use this file to deploy some handlers/chains and services --> <!-- on the client. To do this simply run: --> <!-- java org.apache.axis.utils.Admin client client_deploy.xml --> <!-- from the same dir that the Axis client will run in --> <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <handler name="log" type="java:org.apache.axis.handlers.LogHandler" /> <globalConfiguration> <requestFlow> <handler type="log"/> </requestFlow> <responseFlow> <handler type="log"/> </responseFlow> <globalConfiguration> <!-- <transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/> <transport name="local" pivot="java:org.apache.axis.transport.local.LocalSender"/> --> </deployment> 1.1 xml-axis/java/test/wsdl/interop3/client-config.wsdd Index: client-config.wsdd =================================================================== <?xml version="1.0" encoding="UTF-8"?> <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> <handler name="log" type="java:org.apache.axis.handlers.LogHandler"/> <globalConfiguration> <requestFlow> <handler type="log"/> </requestFlow> <responseFlow> <handler type="log"/> </responseFlow> </globalConfiguration> <transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/> <transport name="local" pivot="java:org.apache.axis.transport.local.LocalSender"/> </deployment> 1.12 +3 -0 xml-axis/java/test/wsdl/interop3/docLitParam/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/interop3/docLitParam/build.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- build.xml 30 May 2002 23:46:03 -0000 1.11 +++ build.xml 31 May 2002 20:28:21 -0000 1.12 @@ -27,6 +27,9 @@ <copy file="WSDLInteropTestDocLitPortBindingImpl.java" overwrite="true" todir="${root.dir}/build/work/test/wsdl/interop3/${testname}"/> + <copy file="DocLitParamTestCase.java" + 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/docLitParam/DocLitParamTestCase.java Index: DocLitParamTestCase.java =================================================================== package test.wsdl.interop3.docLitParam; import test.wsdl.interop3.docLitParam.xsd.ArrayOfstringLiteral; import test.wsdl.interop3.docLitParam.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 DocLitParamTestCase extends junit.framework.TestCase { static URL url; public DocLitParamTestCase(String name) { super(name); } protected void setUp() throws Exception { } public void testStep3() throws Exception { WSDLInteropTestDocLitPortBinding binding; try { if (url != null) { binding = new WSDLInteropTestDocLitServiceLocator().getWSDLInteropTestDocLitPort(url); } else { binding = new WSDLInteropTestDocLitServiceLocator().getWSDLInteropTestDocLitPort(); } } 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" }; ArrayOfstringLiteral param = new ArrayOfstringLiteral(); param.setString(strArray); assertEquals("echoString results differ", binding.echoString(str), str); String [] resArray = binding.echoStringArray(param).getString(); 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(DocLitParamTestCase.class)); } // main }