01: /**
02: * LoggingFacilityServiceTestCase.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.logging;
07:
08: public class LoggingFacilityServiceTestCase extends
09: junit.framework.TestCase {
10: public LoggingFacilityServiceTestCase(java.lang.String name) {
11: super (name);
12: }
13:
14: /* FIXME: RUNTIME WSDL broken.
15: public void testLoggingFacilityPortWSDL() 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.logging.LoggingFacilityServiceLocator().getLoggingFacilityPortAddress() + "?WSDL");
18: javax.xml.rpc.Service service = serviceFactory.createService(url, new org.apache.axis.wsi.scm.logging.LoggingFacilityServiceLocator().getServiceName());
19: assertTrue(service != null);
20: }
21: */
22:
23: public void test1LoggingFacilityPortLogEvent() throws Exception {
24: org.apache.axis.wsi.scm.logging.LoggingFacilitySoapBindingStub binding;
25: try {
26: binding = (org.apache.axis.wsi.scm.logging.LoggingFacilitySoapBindingStub) new org.apache.axis.wsi.scm.logging.LoggingFacilityServiceLocator()
27: .getLoggingFacilityPort();
28: } catch (javax.xml.rpc.ServiceException jre) {
29: if (jre.getLinkedCause() != null)
30: jre.getLinkedCause().printStackTrace();
31: throw new junit.framework.AssertionFailedError(
32: "JAX-RPC ServiceException caught: " + jre);
33: }
34: assertNotNull("binding is null", binding);
35:
36: // Time out after a minute
37: binding.setTimeout(60000);
38:
39: // Test operation
40: binding
41: .logEvent(new org.apache.axis.wsi.scm.logging.LogEventRequestType());
42: // TBD - validate results
43: }
44:
45: public void test2LoggingFacilityPortGetEvents() throws Exception {
46: org.apache.axis.wsi.scm.logging.LoggingFacilitySoapBindingStub binding;
47: try {
48: binding = (org.apache.axis.wsi.scm.logging.LoggingFacilitySoapBindingStub) new org.apache.axis.wsi.scm.logging.LoggingFacilityServiceLocator()
49: .getLoggingFacilityPort();
50: } catch (javax.xml.rpc.ServiceException jre) {
51: if (jre.getLinkedCause() != null)
52: jre.getLinkedCause().printStackTrace();
53: throw new junit.framework.AssertionFailedError(
54: "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
65: .getEvents(new org.apache.axis.wsi.scm.logging.GetEventsRequestType());
66: } catch (org.apache.axis.wsi.scm.logging.GetEventsFaultType e1) {
67: throw new junit.framework.AssertionFailedError(
68: "RepositoryMissingFault Exception caught: " + e1);
69: }
70: // TBD - validate results
71: }
72:
73: }
|