butek 02/02/18 13:25:44 Modified: java/test/wsdl Wsdl2javaTestSuite.xml Added: java/test/wsdl/interop3 Import1TestCase.java Import2TestCase.java Import3TestCase.java Log: Added some round III interop tests. For details, see http://www.whitemesa.net/r3/plan.html. Revision Changes Path 1.72 +136 -0 xml-axis/java/test/wsdl/Wsdl2javaTestSuite.xml Index: Wsdl2javaTestSuite.xml =================================================================== RCS file: /home/cvs/xml-axis/java/test/wsdl/Wsdl2javaTestSuite.xml,v retrieving revision 1.71 retrieving revision 1.72 diff -u -r1.71 -r1.72 --- Wsdl2javaTestSuite.xml 15 Feb 2002 20:26:52 -0000 1.71 +++ Wsdl2javaTestSuite.xml 18 Feb 2002 21:25:43 -0000 1.72 @@ -416,6 +416,142 @@ <mapping namespace="http://soapinterop.org/xsd" package="mssoapinterop.interopc"/> </wsdl2java> + <!-- 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 --> + + <!-- Steps 1, 2 and 4: --> + <wsdl2java url="http://www.whitemesa.net/r3/import1.wsdl" + output="build/work" + skeleton="yes"> + <mapping namespace="http://soapinterop.org/" package="test.wsdl.interop3.import1"/> + <mapping namespace="http://soapinterop.org/definitions/" package="test.wsdl.interop3.import1.definitions"/> + </wsdl2java> + <javac srcdir="${build.dir}/work" destdir="${build.dest}" debug="on"> + <classpath refid="test-classpath" /> + <include name="test/wsdl/interop3/import1/*.java" /> + </javac> + + <!-- Step 3: see test/wsdl/interop3/Import1TestCase.java --> + <!-- Step 5: see test/wsdl/interop3/Import1TestCase.java --> + + <!-- Step 6: --> + <java2wsdl output="build/work/test/wsdl/interop3/import1.wsdl" + className= "test.wsdl.interop3.import1.definitions.SoapInteropImport1PortType" + namespace="http://soapinterop.org/definitions/" + location="http://localhost:8080/axis/services/SoapInteropImport1Port"> + <mapping namespace="http://soapinterop.org/" package="test.wsdl.interop3.import1"/> + <mapping namespace="http://soapinterop.org/definitions/" package="test.wsdl.interop3.import1.definitions"/> + </java2wsdl> + <wsdl2java url="build/work/test/wsdl/interop3/import1.wsdl" + output="build/work" + skeleton="yes"> + <mapping namespace="http://soapinterop.org/" package="test.wsdl.interop3.import1.step6"/> + <mapping namespace="http://soapinterop.org/definitions/" package="test.wsdl.interop3.import1.step6.definitions"/> + </wsdl2java> + + <!-- Step 7: see test/wsdl/interop3/Import1TestCase.java --> + <!-- Step 8: see test/wsdl/interop3/Import1TestCase.java --> + + + <!-- SOAP Builder's round III web services --> + <!-- interoperability testing: import2 --> + + <!-- Steps 1, 2 and 4: --> + <wsdl2java url="http://www.whitemesa.net/r3/import2.wsdl" + output="build/work" + skeleton="yes"> + <mapping namespace="http://soapinterop.org/main/" package="test.wsdl.interop3.import2"/> + <mapping namespace="http://soapinterop.org/definitions/" package="test.wsdl.interop3.import2.definitions"/> + <mapping namespace="http://soapinterop.org/xsd" package="test.wsdl.interop3.import2.xsd"/> + </wsdl2java> + <javac srcdir="${build.dir}/work" destdir="${build.dest}" debug="on"> + <classpath refid="test-classpath" /> + <include name="test/wsdl/interop3/import2/*.java" /> + </javac> + + <!-- Step 3: see test/wsdl/interop3/Import2TestCase.java --> + <!-- Step 5: see test/wsdl/interop3/Import2TestCase.java --> + + <!-- Step 6: --> + <java2wsdl output="build/work/test/wsdl/interop3/import2.wsdl" + className= "test.wsdl.interop3.import2.definitions.SoapInteropImport2PortType" + namespace="http://soapinterop.org/definitions/" + location="http://localhost:8080/axis/services/SoapInteropImport2Port"> + <mapping namespace="http://soapinterop.org/main/" package="test.wsdl.interop3.import2"/> + <mapping namespace="http://soapinterop.org/definitions/" package="test.wsdl.interop3.import2.definitions"/> + <mapping namespace="http://soapinterop.org/xsd" package="test.wsdl.interop3.import2.xsd"/> + </java2wsdl> + <wsdl2java url="build/work/test/wsdl/interop3/import2.wsdl" + output="build/work" + skeleton="yes"> + <mapping namespace="http://soapinterop.org/main/" package="test.wsdl.interop3.import2.step6"/> + <mapping namespace="http://soapinterop.org/definitions/" package="test.wsdl.interop3.import2.step6.definitions"/> + <mapping namespace="http://soapinterop.org/xsd" package="test.wsdl.interop3.import2.step6.xsd"/> + </wsdl2java> + + <!-- Step 7: see test/wsdl/interop3/Import2TestCase.java --> + <!-- Step 8: see test/wsdl/interop3/Import2TestCase.java --> + + + <!-- SOAP Builder's round III web services --> + <!-- interoperability testing: import3 --> + + <!-- Steps 1, 2 and 4: --> + <wsdl2java url="http://www.whitemesa.net/r3/import3.wsdl" + output="build/work" + skeleton="yes"> + <mapping namespace="http://soapinterop.org/main2/" package="test.wsdl.interop3.import3"/> + <mapping namespace="http://soapinterop.org/definitions/" package="test.wsdl.interop3.import3.definitions"/> + <mapping namespace="http://soapinterop.org/xsd" package="test.wsdl.interop3.import3.xsd"/> + <mapping namespace="http://soapinterop.org/xsd2" package="test.wsdl.interop3.import3.xsd2"/> + </wsdl2java> + <javac srcdir="${build.dir}/work" destdir="${build.dest}" debug="on"> + <classpath refid="test-classpath" /> + <include name="test/wsdl/interop3/import3/*.java" /> + </javac> + + <!-- Step 3: see test/wsdl/interop3/Import3TestCase.java --> + <!-- Step 5: see test/wsdl/interop3/Import3TestCase.java --> + + <!-- Step 6: --> + <java2wsdl output="build/work/test/wsdl/interop3/import3.wsdl" + className= "test.wsdl.interop3.import3.SoapInteropImport3PortType" + namespace="http://soapinterop.org/definitions/" + location="http://localhost:8080/axis/services/SoapInteropImport3Port"> + <mapping namespace="http://soapinterop.org/main2/" package="test.wsdl.interop3.import3"/> + <mapping namespace="http://soapinterop.org/definitions/" package="test.wsdl.interop3.import3.definitions"/> + <mapping namespace="http://soapinterop.org/xsd" package="test.wsdl.interop3.import3.xsd"/> + <mapping namespace="http://soapinterop.org/xsd2" package="test.wsdl.interop3.import3.xsd2"/> + </java2wsdl> + <wsdl2java url="build/work/test/wsdl/interop3/import3.wsdl" + output="build/work" + skeleton="yes"> + <mapping namespace="http://soapinterop.org/main/" package="test.wsdl.interop3.import3.step6"/> + <mapping namespace="http://soapinterop.org/definitions/" package="test.wsdl.interop3.import3.step6.definitions"/> + <mapping namespace="http://soapinterop.org/xsd" package="test.wsdl.interop3.import3.step6.xsd"/> + <mapping namespace="http://soapinterop.org/xsd2" package="test.wsdl.interop3.import3.step6.xsd2"/> + </wsdl2java> + + <!-- Step 7: see test/wsdl/interop3/Import2TestCase.java --> + <!-- Step 8: see test/wsdl/interop3/Import2TestCase.java --> + + + <!-- Name clash test --> <wsdl2java url="test/wsdl/clash/clash.wsdl" output="build/work" 1.1 xml-axis/java/test/wsdl/interop3/Import1TestCase.java Index: Import1TestCase.java =================================================================== package test.wsdl.interop3; import test.wsdl.interop3.import1.Import1Locator; import test.wsdl.interop3.import1.definitions.SoapInteropImport1PortType; import test.wsdl.interop3.import1.step6.definitions.SoapInteropImport1PortTypeServiceLocator; /* <!-- 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 Import1TestCase extends junit.framework.TestCase { public Import1TestCase(String name) { super(name); } public void testStep3() { SoapInteropImport1PortType binding; try { binding = new Import1Locator().getSoapInteropImport1Port(); } catch (javax.xml.rpc.ServiceException jre) { throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); } assertTrue("binding is null", binding != null); try { java.lang.String value = null; value = binding.echoString(new java.lang.String()); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void testStep5() { SoapInteropImport1PortType binding; try { binding = new Import1Locator().getSoapInteropImport1Port(new java.net.URL("http://localhost:8080/axis/services/SoapInteropImport1Port")); } catch (Throwable t) { throw new junit.framework.AssertionFailedError("Throwable caught: " + t); } assertTrue("binding is null", binding != null); try { java.lang.String value = null; value = binding.echoString(new java.lang.String()); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void testStep7() { test.wsdl.interop3.import1.step6.definitions.SoapInteropImport1PortType binding; try { binding = new SoapInteropImport1PortTypeServiceLocator().getSoapInteropImport1Port(); } catch (Throwable t) { throw new junit.framework.AssertionFailedError("Throwable caught: " + t); } assertTrue("binding is null", binding != null); try { java.lang.String value = null; value = binding.echoString(new java.lang.String()); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } /* doesn't work yet public void testStep8() { test.wsdl.interop3.import1.step6.definitions.SoapInteropImport1PortType binding; try { binding = new SoapInteropImport1PortTypeServiceLocator().getSoapInteropImport1Port(new java.net.URL("http://mssoapinterop.org/stkV3/wsdl/import2.wsdl")); } catch (Throwable t) { throw new junit.framework.AssertionFailedError("Throwable caught: " + t); } assertTrue("binding is null", binding != null); try { java.lang.String value = null; value = binding.echoString(new java.lang.String()); } catch (java.rmi.RemoteException re) { re.printStackTrace(); throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } */ public static void main(String[] args) { junit.textui.TestRunner.run(new junit.framework.TestSuite(Import1TestCase.class)); } // main } 1.1 xml-axis/java/test/wsdl/interop3/Import2TestCase.java Index: Import2TestCase.java =================================================================== package test.wsdl.interop3; import test.wsdl.interop3.import2.Import2Locator; import test.wsdl.interop3.import2.definitions.SoapInteropImport2PortType; import test.wsdl.interop3.import2.step6.definitions.SoapInteropImport2PortTypeServiceLocator; import test.wsdl.interop3.import2.xsd.SOAPStruct; /* <!-- SOAP Builder's round III web services --> <!-- interoperability testing: import2 --> <!-- (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 Import2TestCase extends junit.framework.TestCase { public Import2TestCase(String name) { super(name); } public void testStep3() { SoapInteropImport2PortType binding; try { binding = new Import2Locator().getSoapInteropImport2Port(); } catch (javax.xml.rpc.ServiceException jre) { throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); } assertTrue("binding is null", binding != null); try { SOAPStruct value = null; value = binding.echoStruct(new SOAPStruct()); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void testStep5() { SoapInteropImport2PortType binding; try { binding = new Import2Locator().getSoapInteropImport2Port(new java.net.URL("http://localhost:8080/axis/services/SoapInteropImport2Port")); } catch (Throwable t) { throw new junit.framework.AssertionFailedError("Throwable caught: " + t); } assertTrue("binding is null", binding != null); try { SOAPStruct value = null; value = binding.echoStruct(new SOAPStruct()); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void testStep7() { test.wsdl.interop3.import2.step6.definitions.SoapInteropImport2PortType binding; try { binding = new SoapInteropImport2PortTypeServiceLocator().getSoapInteropImport2Port(); } catch (javax.xml.rpc.ServiceException jre) { throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); } assertTrue("binding is null", binding != null); try { test.wsdl.interop3.import2.step6.xsd.SOAPStruct value = null; value = binding.echoStruct(new test.wsdl.interop3.import2.step6.xsd.SOAPStruct()); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } /* doesn't work yet public void testStep8() { SoapInteropImport2PortType binding; try { binding = new SoapInteropImport2PortTypeServiceLocator().getSoapInteropImport2Port(new java.net.URL("http://mssoapinterop.org/stkV3/wsdl/import2.wsdl")); } catch (Throwable t) { throw new junit.framework.AssertionFailedError("Throwable caught: " + t); } assertTrue("binding is null", binding != null); try { SOAPStruct value = null; value = binding.echoStruct(new SOAPStruct()); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } */ public static void main(String[] args) { junit.textui.TestRunner.run(new junit.framework.TestSuite(Import2TestCase.class)); } // main } 1.1 xml-axis/java/test/wsdl/interop3/Import3TestCase.java Index: Import3TestCase.java =================================================================== package test.wsdl.interop3; import test.wsdl.interop3.import3.Import3Locator; import test.wsdl.interop3.import3.SoapInteropImport3PortType; import test.wsdl.interop3.import3.step6.definitions.SoapInteropImport3PortTypeServiceLocator; import test.wsdl.interop3.import3.xsd.SOAPStruct; /* <!-- SOAP Builder's round III web services --> <!-- interoperability testing: import3 --> <!-- (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 Import3TestCase extends junit.framework.TestCase { public Import3TestCase(String name) { super(name); } public void testStep3EchoStruct() { SoapInteropImport3PortType binding; try { binding = new Import3Locator().getSoapInteropImport3Port(); } catch (javax.xml.rpc.ServiceException jre) { throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); } assertTrue("binding is null", binding != null); try { SOAPStruct value = null; value = binding.echoStruct(new SOAPStruct()); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void testStep3EchoStructArray() { SoapInteropImport3PortType binding; try { binding = new Import3Locator().getSoapInteropImport3Port(); } catch (javax.xml.rpc.ServiceException jre) { throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); } assertTrue("binding is null", binding != null); try { SOAPStruct[] value = null; value = binding.echoStructArray(new SOAPStruct[0]); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void testStep5EchoStruct() { SoapInteropImport3PortType binding; try { binding = new Import3Locator().getSoapInteropImport3Port(new java.net.URL("http://localhost:8080/axis/services/SoapInteropImport3Port")); } catch (Throwable t) { throw new junit.framework.AssertionFailedError("Throwable caught: " + t); } assertTrue("binding is null", binding != null); try { SOAPStruct value = null; value = binding.echoStruct(new SOAPStruct()); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void testStep5EchoStructArray() { SoapInteropImport3PortType binding; try { binding = new Import3Locator().getSoapInteropImport3Port(new java.net.URL("http://localhost:8080/axis/services/SoapInteropImport3Port")); } catch (Throwable t) { throw new junit.framework.AssertionFailedError("Throwable caught: " + t); } assertTrue("binding is null", binding != null); try { SOAPStruct[] value = null; value = binding.echoStructArray(new SOAPStruct[0]); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void testStep7EchoStruct() { test.wsdl.interop3.import3.step6.definitions.SoapInteropImport3PortType binding; try { binding = new SoapInteropImport3PortTypeServiceLocator().getSoapInteropImport3Port(); } catch (javax.xml.rpc.ServiceException jre) { throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); } assertTrue("binding is null", binding != null); try { test.wsdl.interop3.import3.step6.xsd.SOAPStruct value = null; value = binding.echoStruct(new test.wsdl.interop3.import3.step6.xsd.SOAPStruct()); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void testStep7EchoStructArray() { test.wsdl.interop3.import3.step6.definitions.SoapInteropImport3PortType binding; try { binding = new SoapInteropImport3PortTypeServiceLocator().getSoapInteropImport3Port(); } catch (javax.xml.rpc.ServiceException jre) { throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); } assertTrue("binding is null", binding != null); try { test.wsdl.interop3.import3.step6.xsd.SOAPStruct[] value = null; value = binding.echoStructArray(new test.wsdl.interop3.import3.step6.xsd.SOAPStruct[0]); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } /* doesn't work yet public void testStep8EchoStruct() { test.wsdl.interop3.import3.step6.definitions.SoapInteropImport3PortType binding; try { binding = new SoapInteropImport3PortTypeServiceLocator().getSoapInteropImport3Port(new java.net.URL("http://mssoapinterop.org/stkV3/wsdl/import3.wsdl")); } catch (Throwable t) { throw new junit.framework.AssertionFailedError("Throwable caught: " + t); } assertTrue("binding is null", binding != null); try { test.wsdl.interop3.import3.step6.xsd.SOAPStruct value = null; value = binding.echoStruct(new test.wsdl.interop3.import3.step6.xsd.SOAPStruct()); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } public void testStep8EchoStructArray() { test.wsdl.interop3.import3.step6.definitions.SoapInteropImport3PortType binding; try { binding = new SoapInteropImport3PortTypeServiceLocator().getSoapInteropImport3Port(new java.net.URL("http://mssoapinterop.org/stkV3/wsdl/import3.wsdl")); } catch (Throwable t) { throw new junit.framework.AssertionFailedError("Throwable caught: " + t); } assertTrue("binding is null", binding != null); try { test.wsdl.interop3.import3.step6.xsd.SOAPStruct[] value = null; value = binding.echoStructArray(new test.wsdl.interop3.import3.step6.xsd.SOAPStruct[0]); } catch (java.rmi.RemoteException re) { throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); } } */ public static void main(String[] args) { junit.textui.TestRunner.run(new junit.framework.TestSuite(Import3TestCase.class)); } // main }