KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > wsdl > interop3 > emptysa > EmptySATestCase


1 /**
2  * EmptySATestCase.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis WSDL2Java emitter.
6  */

7
8 package test.wsdl.interop3.emptysa;
9
10 import java.net.URL JavaDoc;
11
12 public class EmptySATestCase extends junit.framework.TestCase {
13     
14     
15     public static URL JavaDoc url = null;
16     
17     public static void main(String JavaDoc[] args) throws Exception JavaDoc {
18         if (args.length == 1) {
19             url = new URL JavaDoc(args[0]);
20         }
21         junit.textui.TestRunner.run(new junit.framework.TestSuite(EmptySATestCase.class));
22     } // main
23

24     
25     public EmptySATestCase(java.lang.String JavaDoc name) throws Exception JavaDoc {
26         super(name);
27         if (url == null) {
28             url = new URL JavaDoc(new EmptySALocator().getSoapInteropEmptySAPortAddress());
29         }
30         
31     }
32     public void test1SoapInteropEmptySAPortEchoString() throws Exception JavaDoc {
33         test.wsdl.interop3.emptysa.SoapInteropEmptySAPortType binding;
34         try {
35             binding = new test.wsdl.interop3.emptysa.EmptySALocator().getSoapInteropEmptySAPort();
36         }
37         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
38             if(jre.getLinkedCause()!=null)
39                 jre.getLinkedCause().printStackTrace();
40             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
41         }
42         assertTrue("binding is null", binding != null);
43
44         // Test operation
45
java.lang.String JavaDoc value = null;
46         String JavaDoc expected = "empty SOAP Action";
47         value = binding.echoString(expected);
48         
49         // validate results
50
assertEquals(expected, value);
51     }
52
53 }
54
Popular Tags