KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > wsi > scm > configurator > ConfiguratorServiceTestCase


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

23
24     public void test1ConfiguratorPortGetConfigurationOptions() throws Exception JavaDoc {
25         org.apache.axis.wsi.scm.configurator.ConfiguratorBindingStub binding;
26         try {
27             binding = (org.apache.axis.wsi.scm.configurator.ConfiguratorBindingStub)
28                           new org.apache.axis.wsi.scm.configurator.ConfiguratorServiceLocator().getConfiguratorPort();
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.configurator.ConfigOptionsType value = null;
43             value = binding.getConfigurationOptions(true);
44         }
45         catch (org.apache.axis.wsi.scm.configurator.ConfiguratorFailedFault e1) {
46             throw new junit.framework.AssertionFailedError("configuratorFailedFault Exception caught: " + e1);
47         }
48             // TBD - validate results
49
}
50
51 }
52
Popular Tags