001: /**
002: * ManufacturerServiceTestCase.java
003: *
004: * This file was auto-generated from WSDL
005: * by the Apache Axis 1.2alpha Jan 15, 2004 (11:28:11 EST) WSDL2Java emitter.
006: */package org.apache.axis.wsi.scm.manufacturer;
007:
008: public class ManufacturerServiceTestCase extends
009: junit.framework.TestCase {
010: public ManufacturerServiceTestCase(java.lang.String name) {
011: super (name);
012: }
013:
014: /* FIXME: RUNTIME WSDL broken.
015: public void testManufacturerCPortWSDL() throws Exception {
016: javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
017: java.net.URL url = new java.net.URL(new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getManufacturerCPortAddress() + "?WSDL");
018: javax.xml.rpc.Service service = serviceFactory.createService(url, new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getServiceName());
019: assertTrue(service != null);
020: }
021: */
022:
023: public void test1ManufacturerCPortSubmitPO() throws Exception {
024: org.apache.axis.wsi.scm.manufacturer.ManufacturerSoapBindingStub binding;
025: try {
026: binding = (org.apache.axis.wsi.scm.manufacturer.ManufacturerSoapBindingStub) new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator()
027: .getManufacturerCPort();
028: } catch (javax.xml.rpc.ServiceException jre) {
029: if (jre.getLinkedCause() != null)
030: jre.getLinkedCause().printStackTrace();
031: throw new junit.framework.AssertionFailedError(
032: "JAX-RPC ServiceException caught: " + jre);
033: }
034: assertNotNull("binding is null", binding);
035:
036: // Time out after a minute
037: binding.setTimeout(60000);
038:
039: // Test operation
040: try {
041: boolean value = false;
042: value = binding
043: .submitPO(
044: new org.apache.axis.wsi.scm.manufacturer.po.PurchOrdType(),
045: new org.apache.axis.wsi.scm.configuration.ConfigurationType(),
046: new org.apache.axis.wsi.scm.manufacturer.callback.StartHeaderType());
047: } catch (org.apache.axis.wsi.scm.configuration.ConfigurationFaultType e1) {
048: throw new junit.framework.AssertionFailedError(
049: "ConfigurationFault Exception caught: " + e1);
050: } catch (org.apache.axis.wsi.scm.manufacturer.po.SubmitPOFaultType e2) {
051: throw new junit.framework.AssertionFailedError(
052: "POFault Exception caught: " + e2);
053: }
054: // TBD - validate results
055: }
056:
057: /* FIXME: RUNTIME WSDL broken.
058: public void testManufacturerBPortWSDL() throws Exception {
059: javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
060: java.net.URL url = new java.net.URL(new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getManufacturerBPortAddress() + "?WSDL");
061: javax.xml.rpc.Service service = serviceFactory.createService(url, new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getServiceName());
062: assertTrue(service != null);
063: }
064: */
065:
066: public void test2ManufacturerBPortSubmitPO() throws Exception {
067: org.apache.axis.wsi.scm.manufacturer.ManufacturerSoapBindingStub binding;
068: try {
069: binding = (org.apache.axis.wsi.scm.manufacturer.ManufacturerSoapBindingStub) new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator()
070: .getManufacturerBPort();
071: } catch (javax.xml.rpc.ServiceException jre) {
072: if (jre.getLinkedCause() != null)
073: jre.getLinkedCause().printStackTrace();
074: throw new junit.framework.AssertionFailedError(
075: "JAX-RPC ServiceException caught: " + jre);
076: }
077: assertNotNull("binding is null", binding);
078:
079: // Time out after a minute
080: binding.setTimeout(60000);
081:
082: // Test operation
083: try {
084: boolean value = false;
085: value = binding
086: .submitPO(
087: new org.apache.axis.wsi.scm.manufacturer.po.PurchOrdType(),
088: new org.apache.axis.wsi.scm.configuration.ConfigurationType(),
089: new org.apache.axis.wsi.scm.manufacturer.callback.StartHeaderType());
090: } catch (org.apache.axis.wsi.scm.configuration.ConfigurationFaultType e1) {
091: throw new junit.framework.AssertionFailedError(
092: "ConfigurationFault Exception caught: " + e1);
093: } catch (org.apache.axis.wsi.scm.manufacturer.po.SubmitPOFaultType e2) {
094: throw new junit.framework.AssertionFailedError(
095: "POFault Exception caught: " + e2);
096: }
097: // TBD - validate results
098: }
099:
100: /* FIXME: RUNTIME WSDL broken.
101: public void testManufacturerAPortWSDL() throws Exception {
102: javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
103: java.net.URL url = new java.net.URL(new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getManufacturerAPortAddress() + "?WSDL");
104: javax.xml.rpc.Service service = serviceFactory.createService(url, new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getServiceName());
105: assertTrue(service != null);
106: }
107: */
108:
109: public void test3ManufacturerAPortSubmitPO() throws Exception {
110: org.apache.axis.wsi.scm.manufacturer.ManufacturerSoapBindingStub binding;
111: try {
112: binding = (org.apache.axis.wsi.scm.manufacturer.ManufacturerSoapBindingStub) new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator()
113: .getManufacturerAPort();
114: } catch (javax.xml.rpc.ServiceException jre) {
115: if (jre.getLinkedCause() != null)
116: jre.getLinkedCause().printStackTrace();
117: throw new junit.framework.AssertionFailedError(
118: "JAX-RPC ServiceException caught: " + jre);
119: }
120: assertNotNull("binding is null", binding);
121:
122: // Time out after a minute
123: binding.setTimeout(60000);
124:
125: // Test operation
126: try {
127: boolean value = false;
128: value = binding
129: .submitPO(
130: new org.apache.axis.wsi.scm.manufacturer.po.PurchOrdType(),
131: new org.apache.axis.wsi.scm.configuration.ConfigurationType(),
132: new org.apache.axis.wsi.scm.manufacturer.callback.StartHeaderType());
133: } catch (org.apache.axis.wsi.scm.configuration.ConfigurationFaultType e1) {
134: throw new junit.framework.AssertionFailedError(
135: "ConfigurationFault Exception caught: " + e1);
136: } catch (org.apache.axis.wsi.scm.manufacturer.po.SubmitPOFaultType e2) {
137: throw new junit.framework.AssertionFailedError(
138: "POFault Exception caught: " + e2);
139: }
140: // TBD - validate results
141: }
142:
143: /* FIXME: RUNTIME WSDL broken.
144: public void testWarehouseCallbackPortWSDL() throws Exception {
145: javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
146: java.net.URL url = new java.net.URL(new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getWarehouseCallbackPortAddress() + "?WSDL");
147: javax.xml.rpc.Service service = serviceFactory.createService(url, new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator().getServiceName());
148: assertTrue(service != null);
149: }
150: */
151:
152: public void test4WarehouseCallbackPortSubmitSN() throws Exception {
153: org.apache.axis.wsi.scm.manufacturer.WarehouseCallbackSoapBindingStub binding;
154: try {
155: binding = (org.apache.axis.wsi.scm.manufacturer.WarehouseCallbackSoapBindingStub) new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator()
156: .getWarehouseCallbackPort();
157: } catch (javax.xml.rpc.ServiceException jre) {
158: if (jre.getLinkedCause() != null)
159: jre.getLinkedCause().printStackTrace();
160: throw new junit.framework.AssertionFailedError(
161: "JAX-RPC ServiceException caught: " + jre);
162: }
163: assertNotNull("binding is null", binding);
164:
165: // Time out after a minute
166: binding.setTimeout(60000);
167:
168: // Test operation
169: try {
170: boolean value = false;
171: value = binding
172: .submitSN(
173: new org.apache.axis.wsi.scm.manufacturer.sn.ShipmentNoticeType(),
174: new org.apache.axis.wsi.scm.configuration.ConfigurationType(),
175: new org.apache.axis.wsi.scm.manufacturer.callback.CallbackHeaderType());
176: } catch (org.apache.axis.wsi.scm.configuration.ConfigurationFaultType e1) {
177: throw new junit.framework.AssertionFailedError(
178: "ConfigurationFault Exception caught: " + e1);
179: } catch (org.apache.axis.wsi.scm.manufacturer.callback.CallbackFaultType e2) {
180: throw new junit.framework.AssertionFailedError(
181: "CallbackFault Exception caught: " + e2);
182: }
183: // TBD - validate results
184: }
185:
186: public void test5WarehouseCallbackPortErrorPO() throws Exception {
187: org.apache.axis.wsi.scm.manufacturer.WarehouseCallbackSoapBindingStub binding;
188: try {
189: binding = (org.apache.axis.wsi.scm.manufacturer.WarehouseCallbackSoapBindingStub) new org.apache.axis.wsi.scm.manufacturer.ManufacturerServiceLocator()
190: .getWarehouseCallbackPort();
191: } catch (javax.xml.rpc.ServiceException jre) {
192: if (jre.getLinkedCause() != null)
193: jre.getLinkedCause().printStackTrace();
194: throw new junit.framework.AssertionFailedError(
195: "JAX-RPC ServiceException caught: " + jre);
196: }
197: assertNotNull("binding is null", binding);
198:
199: // Time out after a minute
200: binding.setTimeout(60000);
201:
202: // Test operation
203: try {
204: boolean value = false;
205: value = binding
206: .errorPO(
207: new org.apache.axis.wsi.scm.manufacturer.po.SubmitPOFaultType(),
208: new org.apache.axis.wsi.scm.configuration.ConfigurationType(),
209: new org.apache.axis.wsi.scm.manufacturer.callback.CallbackHeaderType());
210: } catch (org.apache.axis.wsi.scm.configuration.ConfigurationFaultType e1) {
211: throw new junit.framework.AssertionFailedError(
212: "ConfigurationFault Exception caught: " + e1);
213: } catch (org.apache.axis.wsi.scm.manufacturer.callback.CallbackFaultType e2) {
214: throw new junit.framework.AssertionFailedError(
215: "CallbackFault Exception caught: " + e2);
216: }
217: // TBD - validate results
218: }
219:
220: }
|