001: /**
002: * WarehouseServiceTestCase.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.warehouse;
007:
008: public class WarehouseServiceTestCase extends junit.framework.TestCase {
009: public WarehouseServiceTestCase(java.lang.String name) {
010: super (name);
011: }
012:
013: /* FIXME: RUNTIME WSDL broken.
014: public void testWarehouseBPortWSDL() throws Exception {
015: javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
016: java.net.URL url = new java.net.URL(new org.apache.axis.wsi.scm.warehouse.WarehouseServiceLocator().getWarehouseBPortAddress() + "?WSDL");
017: javax.xml.rpc.Service service = serviceFactory.createService(url, new org.apache.axis.wsi.scm.warehouse.WarehouseServiceLocator().getServiceName());
018: assertTrue(service != null);
019: }
020: */
021:
022: public void test1WarehouseBPortShipGoods() throws Exception {
023: org.apache.axis.wsi.scm.warehouse.WarehouseSoapBindingStub binding;
024: try {
025: binding = (org.apache.axis.wsi.scm.warehouse.WarehouseSoapBindingStub) new org.apache.axis.wsi.scm.warehouse.WarehouseServiceLocator()
026: .getWarehouseBPort();
027: } catch (javax.xml.rpc.ServiceException jre) {
028: if (jre.getLinkedCause() != null)
029: jre.getLinkedCause().printStackTrace();
030: throw new junit.framework.AssertionFailedError(
031: "JAX-RPC ServiceException caught: " + jre);
032: }
033: assertNotNull("binding is null", binding);
034:
035: // Time out after a minute
036: binding.setTimeout(60000);
037:
038: // Test operation
039: try {
040: org.apache.axis.wsi.scm.warehouse.ItemShippingStatusList value = null;
041: value = binding
042: .shipGoods(
043: new org.apache.axis.wsi.scm.warehouse.ItemList(),
044: new org.apache.axis.types.NormalizedString(),
045: new org.apache.axis.wsi.scm.configuration.ConfigurationType());
046: } catch (org.apache.axis.wsi.scm.configuration.ConfigurationFaultType e1) {
047: throw new junit.framework.AssertionFailedError(
048: "ConfigurationFault Exception caught: " + e1);
049: }
050: // TBD - validate results
051: }
052:
053: /*
054: public void testWarehouseCPortWSDL() throws Exception {
055: javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
056: java.net.URL url = new java.net.URL(new org.apache.axis.wsi.scm.warehouse.WarehouseServiceLocator().getWarehouseCPortAddress() + "?WSDL");
057: javax.xml.rpc.Service service = serviceFactory.createService(url, new org.apache.axis.wsi.scm.warehouse.WarehouseServiceLocator().getServiceName());
058: assertTrue(service != null);
059: }
060: */
061:
062: public void test2WarehouseCPortShipGoods() throws Exception {
063: org.apache.axis.wsi.scm.warehouse.WarehouseSoapBindingStub binding;
064: try {
065: binding = (org.apache.axis.wsi.scm.warehouse.WarehouseSoapBindingStub) new org.apache.axis.wsi.scm.warehouse.WarehouseServiceLocator()
066: .getWarehouseCPort();
067: } catch (javax.xml.rpc.ServiceException jre) {
068: if (jre.getLinkedCause() != null)
069: jre.getLinkedCause().printStackTrace();
070: throw new junit.framework.AssertionFailedError(
071: "JAX-RPC ServiceException caught: " + jre);
072: }
073: assertNotNull("binding is null", binding);
074:
075: // Time out after a minute
076: binding.setTimeout(60000);
077:
078: // Test operation
079: try {
080: org.apache.axis.wsi.scm.warehouse.ItemShippingStatusList value = null;
081: value = binding
082: .shipGoods(
083: new org.apache.axis.wsi.scm.warehouse.ItemList(),
084: new org.apache.axis.types.NormalizedString(),
085: new org.apache.axis.wsi.scm.configuration.ConfigurationType());
086: } catch (org.apache.axis.wsi.scm.configuration.ConfigurationFaultType e1) {
087: throw new junit.framework.AssertionFailedError(
088: "ConfigurationFault Exception caught: " + e1);
089: }
090: // TBD - validate results
091: }
092:
093: /*
094: public void testWarehouseAPortWSDL() throws Exception {
095: javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
096: java.net.URL url = new java.net.URL(new org.apache.axis.wsi.scm.warehouse.WarehouseServiceLocator().getWarehouseAPortAddress() + "?WSDL");
097: javax.xml.rpc.Service service = serviceFactory.createService(url, new org.apache.axis.wsi.scm.warehouse.WarehouseServiceLocator().getServiceName());
098: assertTrue(service != null);
099: }
100: */
101:
102: public void test3WarehouseAPortShipGoods() throws Exception {
103: org.apache.axis.wsi.scm.warehouse.WarehouseSoapBindingStub binding;
104: try {
105: binding = (org.apache.axis.wsi.scm.warehouse.WarehouseSoapBindingStub) new org.apache.axis.wsi.scm.warehouse.WarehouseServiceLocator()
106: .getWarehouseAPort();
107: } catch (javax.xml.rpc.ServiceException jre) {
108: if (jre.getLinkedCause() != null)
109: jre.getLinkedCause().printStackTrace();
110: throw new junit.framework.AssertionFailedError(
111: "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: org.apache.axis.wsi.scm.warehouse.ItemShippingStatusList value = null;
121: value = binding
122: .shipGoods(
123: new org.apache.axis.wsi.scm.warehouse.ItemList(),
124: new org.apache.axis.types.NormalizedString(),
125: new org.apache.axis.wsi.scm.configuration.ConfigurationType());
126: } catch (org.apache.axis.wsi.scm.configuration.ConfigurationFaultType e1) {
127: throw new junit.framework.AssertionFailedError(
128: "ConfigurationFault Exception caught: " + e1);
129: }
130: // TBD - validate results
131: }
132:
133: }
|