KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > remoting > marshall > dynamic > local > MarshallerLoadingClient


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.test.remoting.marshall.dynamic.local;
8
9 import org.jboss.remoting.Client;
10 import org.jboss.remoting.InvokerLocator;
11
12 import junit.framework.TestCase;
13
14 /**
15  * @author <a HREF="mailto:telrod@e2technologies.net">Tom Elrod</a>
16  */

17 public class MarshallerLoadingClient extends TestCase implements MarshallerLoadingConstants
18 {
19    public void testInvocation() throws Throwable JavaDoc
20    {
21       Client remotingClient = null;
22
23       try
24       {
25          InvokerLocator locator = new InvokerLocator(locatorURI);
26          System.out.println("Calling remoting server with locator uri of: " + locatorURI);
27
28          remotingClient = new Client(locator);
29          Object JavaDoc response = remotingClient.invoke("Do something", null);
30          assertTrue(true);
31
32          System.out.println("Invocation response: " + response);
33
34       }
35       finally
36       {
37          if(remotingClient != null)
38          {
39             remotingClient.disconnect();
40          }
41       }
42    }
43
44
45 }
Popular Tags