KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > wsi > scm > logging > LoggingFacilityServiceTestCase


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

23
24     public void test1LoggingFacilityPortLogEvent() throws Exception JavaDoc {
25         org.apache.axis.wsi.scm.logging.LoggingFacilitySoapBindingStub binding;
26         try {
27             binding = (org.apache.axis.wsi.scm.logging.LoggingFacilitySoapBindingStub)
28                           new org.apache.axis.wsi.scm.logging.LoggingFacilityServiceLocator().getLoggingFacilityPort();
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
binding.logEvent(new org.apache.axis.wsi.scm.logging.LogEventRequestType());
42         // TBD - validate results
43
}
44
45     public void test2LoggingFacilityPortGetEvents() throws Exception JavaDoc {
46         org.apache.axis.wsi.scm.logging.LoggingFacilitySoapBindingStub binding;
47         try {
48             binding = (org.apache.axis.wsi.scm.logging.LoggingFacilitySoapBindingStub)
49                           new org.apache.axis.wsi.scm.logging.LoggingFacilityServiceLocator().getLoggingFacilityPort();
50         }
51         catch (javax.xml.rpc.ServiceException JavaDoc jre) {
52             if(jre.getLinkedCause()!=null)
53                 jre.getLinkedCause().printStackTrace();
54             throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
55         }
56         assertNotNull("binding is null", binding);
57
58         // Time out after a minute
59
binding.setTimeout(60000);
60
61         // Test operation
62
try {
63             org.apache.axis.wsi.scm.logging.GetEventsResponseType value = null;
64             value = binding.getEvents(new org.apache.axis.wsi.scm.logging.GetEventsRequestType());
65         }
66         catch (org.apache.axis.wsi.scm.logging.GetEventsFaultType e1) {
67             throw new junit.framework.AssertionFailedError("RepositoryMissingFault Exception caught: " + e1);
68         }
69             // TBD - validate results
70
}
71
72 }
73
Popular Tags