01: /**
02: * ConfiguratorServiceTestCase.java
03: *
04: * This file was auto-generated from WSDL
05: * by the Apache Axis 1.2alpha Jan 15, 2004 (11:28:11 EST) WSDL2Java emitter.
06: */package org.apache.axis.wsi.scm.configurator;
07:
08: public class ConfiguratorServiceTestCase extends
09: junit.framework.TestCase {
10: public ConfiguratorServiceTestCase(java.lang.String name) {
11: super (name);
12: }
13:
14: /* FIXME: RUNTIME WSDL broken.
15: public void testConfiguratorPortWSDL() throws Exception {
16: javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
17: java.net.URL url = new java.net.URL(new org.apache.axis.wsi.scm.configurator.ConfiguratorServiceLocator().getConfiguratorPortAddress() + "?WSDL");
18: javax.xml.rpc.Service service = serviceFactory.createService(url, new org.apache.axis.wsi.scm.configurator.ConfiguratorServiceLocator().getServiceName());
19: assertTrue(service != null);
20: }
21: */
22:
23: public void test1ConfiguratorPortGetConfigurationOptions()
24: throws Exception {
25: org.apache.axis.wsi.scm.configurator.ConfiguratorBindingStub binding;
26: try {
27: binding = (org.apache.axis.wsi.scm.configurator.ConfiguratorBindingStub) new org.apache.axis.wsi.scm.configurator.ConfiguratorServiceLocator()
28: .getConfiguratorPort();
29: } catch (javax.xml.rpc.ServiceException jre) {
30: if (jre.getLinkedCause() != null)
31: jre.getLinkedCause().printStackTrace();
32: throw new junit.framework.AssertionFailedError(
33: "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.configurator.ConfigOptionsType value = null;
43: value = binding.getConfigurationOptions(true);
44: } catch (org.apache.axis.wsi.scm.configurator.ConfiguratorFailedFault e1) {
45: throw new junit.framework.AssertionFailedError(
46: "configuratorFailedFault Exception caught: " + e1);
47: }
48: // TBD - validate results
49: }
50:
51: }
|