01: /**
02: * ZipCodeResolverTestCase.java
03: *
04: * This file was auto-generated from WSDL
05: * by the Apache Axis WSDL2Java emitter.
06: */package docStyle.zipCodeNW;
07:
08: public class ZipCodeResolverTestCase extends junit.framework.TestCase {
09: public ZipCodeResolverTestCase(java.lang.String name) {
10: super (name);
11: }
12:
13: public void test1ZipCodeResolverSoapShortZipCode() {
14: docStyle.zipCodeNW.ZipCodeResolverSoap binding;
15: try {
16: binding = new docStyle.zipCodeNW.ZipCodeResolverLocator()
17: .getZipCodeResolverSoap();
18: } catch (javax.xml.rpc.ServiceException jre) {
19: if (jre.getLinkedCause() != null)
20: jre.getLinkedCause().printStackTrace();
21: throw new junit.framework.AssertionFailedError(
22: "JAX-RPC ServiceException caught: " + jre);
23: }
24: assertTrue("binding is null", binding != null);
25:
26: try {
27: docStyle.zipCodeNW.ShortZipCode zc = new docStyle.zipCodeNW.ShortZipCode();
28: zc.setAccessCode("9999");
29: zc.setAddress("607 Trinity");
30: zc.setCity("Austin");
31: zc.setState("TX");
32:
33: docStyle.zipCodeNW.ShortZipCodeResponse value = null;
34: value = binding.shortZipCode(zc);
35:
36: System.out.println("zipcode="
37: + value.getShortZipCodeResult());
38:
39: } catch (java.rmi.RemoteException re) {
40: throw new junit.framework.AssertionFailedError(
41: "Remote Exception caught: " + re);
42: }
43: }
44:
45: public static void main(String[] args) {
46:
47: ZipCodeResolverTestCase t = new ZipCodeResolverTestCase("KJH");
48: t.test1ZipCodeResolverSoapShortZipCode();
49:
50: }
51:
52: }
|