tomj 02/02/28 10:25:21
Modified: java/test/wsdl/interop3/compound2
SoapInteropCompound2BindingImpl.java build.xml
Added: java/test/wsdl/interop3/compound2 Compound2TestCase.java
Log:
Provide client test case for compound2 interop test.
Revision Changes Path
1.3 +1 -1
xml-axis/java/test/wsdl/interop3/compound2/SoapInteropCompound2BindingImpl.java
Index: SoapInteropCompound2BindingImpl.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/test/wsdl/interop3/compound2/SoapInteropCompound2BindingImpl.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SoapInteropCompound2BindingImpl.java 28 Feb 2002 18:02:39 -0000 1.2
+++ SoapInteropCompound2BindingImpl.java 28 Feb 2002 18:25:21 -0000 1.3
@@ -6,7 +6,7 @@
*/
package test.wsdl.interop3.compound2;
-package test.wsdl.interop3.compound2.xsd;
+
public class SoapInteropCompound2BindingImpl implements
test.wsdl.interop3.compound2.SoapInteropCompound2Binding {
public test.wsdl.interop3.compound2.xsd.Employee
echoEmployee(test.wsdl.interop3.compound2.xsd.Employee xEmployee) throws
java.rmi.RemoteException {
1.6 +4 -1 xml-axis/java/test/wsdl/interop3/compound2/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-axis/java/test/wsdl/interop3/compound2/build.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- build.xml 28 Feb 2002 15:47:04 -0000 1.5
+++ build.xml 28 Feb 2002 18:25:21 -0000 1.6
@@ -23,11 +23,14 @@
<copy file="SoapInteropCompound2BindingImpl.java" overwrite="true"
todir="${root.dir}/build/work/test/wsdl/interop3/compound2"/>
+ <copy file="Compound2TestCase.java"
+ todir="${root.dir}/build/work/test/wsdl/interop3/compound2"/>
+
<!-- compile the skeletons -->
<javac srcdir="${root.dir}/${build.dir}/work"
destdir="${root.dir}/${build.dest}" debug="on">
<classpath refid="test-classpath" />
- <include name="test/wsdl/interop3/**/*.java" />
+ <include name="test/wsdl/interop3/compound2/*.java" />
</javac>
</target>
1.1
xml-axis/java/test/wsdl/interop3/compound2/Compound2TestCase.java
Index: Compound2TestCase.java
===================================================================
package test.wsdl.interop3.compound2;
import java.net.URL;
import test.wsdl.interop3.compound2.xsd.Employee;
import test.wsdl.interop3.compound2.xsd.Person;
import test.wsdl.interop3.compound2.Compound2Locator;
import test.wsdl.interop3.compound2.SoapInteropCompound2Binding;
/*
<!-- 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 Compound2TestCase extends junit.framework.TestCase {
static URL url;
public Compound2TestCase(String name) {
super(name);
}
protected void setUp() throws Exception {
}
public void testStep3() {
SoapInteropCompound2Binding binding;
try {
if (url != null) {
binding = new Compound2Locator().getSoapInteropCompound2Port(url);
} else {
binding = new Compound2Locator().getSoapInteropCompound2Port();
}
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException
caught: " + jre);
}
assertTrue("binding is null", binding != null);
try {
Employee emp = new Employee();
Person person = new Person();
person.setMale(true);
person.setName("Joe Blow");
emp.setPerson(person);
emp.setID(314159);
emp.setSalary(100000.50);
Employee result = binding.echoEmployee(emp);
assertTrue("Results did not match", result.equals(emp));
}
catch (java.rmi.RemoteException re) {
throw new junit.framework.AssertionFailedError("Remote Exception caught:
" + re);
}
}
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(Compound2TestCase.class));
} // main
}