KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > wsi > scm > warehouse > WarehouseServiceTestCase


1 /**
2  * WarehouseServiceTestCase.java
3  *
4  * This file was auto-generated from WSDL
5  * by the Apache Axis 1.2alpha Jan 15, 2004 (11:28:11 EST) WSDL2Java emitter.
6  */

7
8 package org.apache.axis.wsi.scm.warehouse;
9
10 public class WarehouseServiceTestCase extends junit.framework.TestCase {
11     public WarehouseServiceTestCase(java.lang.String JavaDoc name) {
12         super(name);
13     }
14
15     /* FIXME: RUNTIME WSDL broken.
16     public void testWarehouseBPortWSDL() throws Exception {
17         javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
18         java.net.URL url = new java.net.URL(new org.apache.axis.wsi.scm.warehouse.WarehouseServiceLocator().getWarehouseBPortAddress() + "?WSDL");
19         javax.xml.rpc.Service service = serviceFactory.createService(url, new org.apache.axis.wsi.scm.warehouse.WarehouseServiceLocator().getServiceName());
20         assertTrue(service != null);
21     }
22     */

23
24     public void test1WarehouseBPortShipGoods() throws Exception JavaDoc {
25         org.apache.axis.wsi.scm.warehouse.WarehouseSoapBindingStub binding;
26         try {
27             binding = (org.apache.axis.wsi.scm.warehouse.WarehouseSoapBindingStub)
28                           new org.apache.axis.wsi.scm.warehouse.WarehouseServiceLocator().getWarehouseBPort();
29         }
30         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
31             if(jre.getLinkedCause()!=null)
32                 jre.getLinkedCause().printStackTrace();
33             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
34         }
35         assertNotNull("binding is null", binding);
36
37         // Time out after a minute
38
binding.setTimeout(60000);
39
40         // Test operation
41
try {
42             org.apache.axis.wsi.scm.warehouse.ItemShippingStatusList value = null;
43             value = binding.shipGoods(new org.apache.axis.wsi.scm.warehouse.ItemList(), new org.apache.axis.types.NormalizedString(), new org.apache.axis.wsi.scm.configuration.ConfigurationType());
44         }
45         catch (org.apache.axis.wsi.scm.configuration.ConfigurationFaultType e1) {
46             throw new junit.framework.AssertionFailedError("ConfigurationFault Exception caught: " + e1);
47         }
48             // TBD - validate results
49
}
50
51     /*
52     public void testWarehouseCPortWSDL() throws Exception {
53         javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
54         java.net.URL url = new java.net.URL(new org.apache.axis.wsi.scm.warehouse.WarehouseServiceLocator().getWarehouseCPortAddress() + "?WSDL");
55         javax.xml.rpc.Service service = serviceFactory.createService(url, new org.apache.axis.wsi.scm.warehouse.WarehouseServiceLocator().getServiceName());
56         assertTrue(service != null);
57     }
58     */

59
60     public void test2WarehouseCPortShipGoods() throws Exception JavaDoc {
61         org.apache.axis.wsi.scm.warehouse.WarehouseSoapBindingStub binding;
62         try {
63             binding = (org.apache.axis.wsi.scm.warehouse.WarehouseSoapBindingStub)
64                           new org.apache.axis.wsi.scm.warehouse.WarehouseServiceLocator().getWarehouseCPort();
65         }
66         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
67             if(jre.getLinkedCause()!=null)
68                 jre.getLinkedCause().printStackTrace();
69             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
70         }
71         assertNotNull("binding is null", binding);
72
73         // Time out after a minute
74
binding.setTimeout(60000);
75
76         // Test operation
77
try {
78             org.apache.axis.wsi.scm.warehouse.ItemShippingStatusList value = null;
79             value = binding.shipGoods(new org.apache.axis.wsi.scm.warehouse.ItemList(), new org.apache.axis.types.NormalizedString(), new org.apache.axis.wsi.scm.configuration.ConfigurationType());
80         }
81         catch (org.apache.axis.wsi.scm.configuration.ConfigurationFaultType e1) {
82             throw new junit.framework.AssertionFailedError("ConfigurationFault Exception caught: " + e1);
83         }
84             // TBD - validate results
85
}
86
87     /*
88     public void testWarehouseAPortWSDL() throws Exception {
89         javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
90         java.net.URL url = new java.net.URL(new org.apache.axis.wsi.scm.warehouse.WarehouseServiceLocator().getWarehouseAPortAddress() + "?WSDL");
91         javax.xml.rpc.Service service = serviceFactory.createService(url, new org.apache.axis.wsi.scm.warehouse.WarehouseServiceLocator().getServiceName());
92         assertTrue(service != null);
93     }
94     */

95
96
97     public void test3WarehouseAPortShipGoods() throws Exception JavaDoc {
98         org.apache.axis.wsi.scm.warehouse.WarehouseSoapBindingStub binding;
99         try {
100             binding = (org.apache.axis.wsi.scm.warehouse.WarehouseSoapBindingStub)
101                           new org.apache.axis.wsi.scm.warehouse.WarehouseServiceLocator().getWarehouseAPort();
102         }
103         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
104             if(jre.getLinkedCause()!=null)
105                 jre.getLinkedCause().printStackTrace();
106             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
107         }
108         assertNotNull("binding is null", binding);
109
110         // Time out after a minute
111
binding.setTimeout(60000);
112
113         // Test operation
114
try {
115             org.apache.axis.wsi.scm.warehouse.ItemShippingStatusList value = null;
116             value = binding.shipGoods(new org.apache.axis.wsi.scm.warehouse.ItemList(), new org.apache.axis.types.NormalizedString(), new org.apache.axis.wsi.scm.configuration.ConfigurationType());
117         }
118         catch (org.apache.axis.wsi.scm.configuration.ConfigurationFaultType e1) {
119             throw new junit.framework.AssertionFailedError("ConfigurationFault Exception caught: " + e1);
120         }
121             // TBD - validate results
122
}
123
124 }
125
Popular Tags