1 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 17 public class MarshallerLoadingClient extends TestCase implements MarshallerLoadingConstants 18 { 19 public void testInvocation() throws Throwable 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 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 |