1 package test.wsdl.interop3.import1; 2 3 import test.wsdl.interop3.import1.definitions.SoapInteropImport1PortType; 4 5 import java.net.URL ; 6 25 26 public class Import1TestCase extends junit.framework.TestCase { 27 public static URL url = null; 28 29 public Import1TestCase(String name) { 30 super(name); 31 } 32 33 public void testStep3() { 34 SoapInteropImport1PortType binding; 35 try { 36 if (url == null) { 37 binding = new Import1Locator().getSoapInteropImport1Port(); 38 } else { 39 binding = new Import1Locator().getSoapInteropImport1Port(url); 40 } 41 } 42 catch (javax.xml.rpc.ServiceException jre) { 43 throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre); 44 } 45 assertTrue("binding is null", binding != null); 46 47 try { 48 String value = "import1 test string"; 49 String result = binding.echoString(value); 50 assertEquals("Strings didn't match", value, result); 51 } 52 catch (java.rmi.RemoteException re) { 53 throw new junit.framework.AssertionFailedError("Remote Exception caught: " + re); 54 } 55 } 56 57 78 79 public static void main(String [] args) { 80 if (args.length == 1) { 81 try { 82 url = new URL (args[0]); 83 } catch (Exception e) { 84 } 85 } 86 87 junit.textui.TestRunner.run(new junit.framework.TestSuite(Import1TestCase.class)); 88 } 90 } 91 92 | Popular Tags |