KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > wsi > scm > manufacturer > ManufacturerServiceTestCase


1 /**
2  * ManufacturerServiceTestCase.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.manufacturer;
9
10 public class ManufacturerServiceTestCase extends junit.framework.TestCase {
11     public ManufacturerServiceTestCase(java.lang.String JavaDoc name) {
12         super(name);
13     }
14
15     /* FIXME: RUNTIME WSDL broken.
16     public void testManufacturerCPortWSDL() 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.manufacturer.ManufacturerServiceLocator().getManufacturerCPortAddress() + "?WSDL");
19         javax.xml.rpc.Service service = serviceFactory.createService(url, new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getServiceName());
20         assertTrue(service != null);
21     }
22     */

23
24     public void test1ManufacturerCPortSubmitPO() throws Exception JavaDoc {
25         org.apache.axis.wsi.scm.manufacturer.ManufacturerSoapBindingStub binding;
26         try {
27             binding = (org.apache.axis.wsi.scm.manufacturer.ManufacturerSoapBindingStub)
28                           new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getManufacturerCPort();
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             boolean value = false;
43             value = binding.submitPO(new org.apache.axis.wsi.scm.manufacturer.po.PurchOrdType(), new org.apache.axis.wsi.scm.configuration.ConfigurationType(), new org.apache.axis.wsi.scm.manufacturer.callback.StartHeaderType());
44         }
45         catch (org.apache.axis.wsi.scm.configuration.ConfigurationFaultType e1) {
46             throw new junit.framework.AssertionFailedError("ConfigurationFault Exception caught: " + e1);
47         }
48         catch (org.apache.axis.wsi.scm.manufacturer.po.SubmitPOFaultType e2) {
49             throw new junit.framework.AssertionFailedError("POFault Exception caught: " + e2);
50         }
51             // TBD - validate results
52
}
53
54     /* FIXME: RUNTIME WSDL broken.
55     public void testManufacturerBPortWSDL() throws Exception {
56         javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
57         java.net.URL url = new java.net.URL(new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getManufacturerBPortAddress() + "?WSDL");
58         javax.xml.rpc.Service service = serviceFactory.createService(url, new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getServiceName());
59         assertTrue(service != null);
60     }
61     */

62
63     public void test2ManufacturerBPortSubmitPO() throws Exception JavaDoc {
64         org.apache.axis.wsi.scm.manufacturer.ManufacturerSoapBindingStub binding;
65         try {
66             binding = (org.apache.axis.wsi.scm.manufacturer.ManufacturerSoapBindingStub)
67                           new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getManufacturerBPort();
68         }
69         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
70             if(jre.getLinkedCause()!=null)
71                 jre.getLinkedCause().printStackTrace();
72             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
73         }
74         assertNotNull("binding is null", binding);
75
76         // Time out after a minute
77
binding.setTimeout(60000);
78
79         // Test operation
80
try {
81             boolean value = false;
82             value = binding.submitPO(new org.apache.axis.wsi.scm.manufacturer.po.PurchOrdType(), new org.apache.axis.wsi.scm.configuration.ConfigurationType(), new org.apache.axis.wsi.scm.manufacturer.callback.StartHeaderType());
83         }
84         catch (org.apache.axis.wsi.scm.configuration.ConfigurationFaultType e1) {
85             throw new junit.framework.AssertionFailedError("ConfigurationFault Exception caught: " + e1);
86         }
87         catch (org.apache.axis.wsi.scm.manufacturer.po.SubmitPOFaultType e2) {
88             throw new junit.framework.AssertionFailedError("POFault Exception caught: " + e2);
89         }
90             // TBD - validate results
91
}
92
93     /* FIXME: RUNTIME WSDL broken.
94     public void testManufacturerAPortWSDL() throws Exception {
95         javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
96         java.net.URL url = new java.net.URL(new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getManufacturerAPortAddress() + "?WSDL");
97         javax.xml.rpc.Service service = serviceFactory.createService(url, new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getServiceName());
98         assertTrue(service != null);
99     }
100     */

101
102     public void test3ManufacturerAPortSubmitPO() throws Exception JavaDoc {
103         org.apache.axis.wsi.scm.manufacturer.ManufacturerSoapBindingStub binding;
104         try {
105             binding = (org.apache.axis.wsi.scm.manufacturer.ManufacturerSoapBindingStub)
106                           new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getManufacturerAPort();
107         }
108         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
109             if(jre.getLinkedCause()!=null)
110                 jre.getLinkedCause().printStackTrace();
111             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
112         }
113         assertNotNull("binding is null", binding);
114
115         // Time out after a minute
116
binding.setTimeout(60000);
117
118         // Test operation
119
try {
120             boolean value = false;
121             value = binding.submitPO(new org.apache.axis.wsi.scm.manufacturer.po.PurchOrdType(), new org.apache.axis.wsi.scm.configuration.ConfigurationType(), new org.apache.axis.wsi.scm.manufacturer.callback.StartHeaderType());
122         }
123         catch (org.apache.axis.wsi.scm.configuration.ConfigurationFaultType e1) {
124             throw new junit.framework.AssertionFailedError("ConfigurationFault Exception caught: " + e1);
125         }
126         catch (org.apache.axis.wsi.scm.manufacturer.po.SubmitPOFaultType e2) {
127             throw new junit.framework.AssertionFailedError("POFault Exception caught: " + e2);
128         }
129             // TBD - validate results
130
}
131
132
133     /* FIXME: RUNTIME WSDL broken.
134     public void testWarehouseCallbackPortWSDL() throws Exception {
135         javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
136         java.net.URL url = new java.net.URL(new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getWarehouseCallbackPortAddress() + "?WSDL");
137         javax.xml.rpc.Service service = serviceFactory.createService(url, new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getServiceName());
138         assertTrue(service != null);
139     }
140     */

141
142     public void test4WarehouseCallbackPortSubmitSN() throws Exception JavaDoc {
143         org.apache.axis.wsi.scm.manufacturer.WarehouseCallbackSoapBindingStub binding;
144         try {
145             binding = (org.apache.axis.wsi.scm.manufacturer.WarehouseCallbackSoapBindingStub)
146                           new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getWarehouseCallbackPort();
147         }
148         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
149             if(jre.getLinkedCause()!=null)
150                 jre.getLinkedCause().printStackTrace();
151             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
152         }
153         assertNotNull("binding is null", binding);
154
155         // Time out after a minute
156
binding.setTimeout(60000);
157
158         // Test operation
159
try {
160             boolean value = false;
161             value = binding.submitSN(new org.apache.axis.wsi.scm.manufacturer.sn.ShipmentNoticeType(), new org.apache.axis.wsi.scm.configuration.ConfigurationType(), new org.apache.axis.wsi.scm.manufacturer.callback.CallbackHeaderType());
162         }
163         catch (org.apache.axis.wsi.scm.configuration.ConfigurationFaultType e1) {
164             throw new junit.framework.AssertionFailedError("ConfigurationFault Exception caught: " + e1);
165         }
166         catch (org.apache.axis.wsi.scm.manufacturer.callback.CallbackFaultType e2) {
167             throw new junit.framework.AssertionFailedError("CallbackFault Exception caught: " + e2);
168         }
169             // TBD - validate results
170
}
171
172     public void test5WarehouseCallbackPortErrorPO() throws Exception JavaDoc {
173         org.apache.axis.wsi.scm.manufacturer.WarehouseCallbackSoapBindingStub binding;
174         try {
175             binding = (org.apache.axis.wsi.scm.manufacturer.WarehouseCallbackSoapBindingStub)
176                           new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getWarehouseCallbackPort();
177         }
178         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
179             if(jre.getLinkedCause()!=null)
180                 jre.getLinkedCause().printStackTrace();
181             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
182         }
183         assertNotNull("binding is null", binding);
184
185         // Time out after a minute
186
binding.setTimeout(60000);
187
188         // Test operation
189
try {
190             boolean value = false;
191             value = binding.errorPO(new org.apache.axis.wsi.scm.manufacturer.po.SubmitPOFaultType(), new org.apache.axis.wsi.scm.configuration.ConfigurationType(), new org.apache.axis.wsi.scm.manufacturer.callback.CallbackHeaderType());
192         }
193         catch (org.apache.axis.wsi.scm.configuration.ConfigurationFaultType e1) {
194             throw new junit.framework.AssertionFailedError("ConfigurationFault Exception caught: " + e1);
195         }
196         catch (org.apache.axis.wsi.scm.manufacturer.callback.CallbackFaultType e2) {
197             throw new junit.framework.AssertionFailedError("CallbackFault Exception caught: " + e2);
198         }
199             // TBD - validate results
200
}
201
202 }
203
Popular Tags