Was it actually called?
I think, you must setup some beans <bean> in configuration xml of spring
framework, no?
Tom
2007/5/25, Sri Kalyanaraman <[EMAIL PROTECTED]>:
Hi ,
I was trying to write a non-rtmp simple client to invoke methods on red5.
Here are the results. It would be great if someone explains the reasons.
import org.red5.server.net.remoting.IRemotingCallback;
import org.red5.server.net.remoting.RemotingClient;
public class NonRTMPClient
{
// Expected result : HELLO WORLD
public static void main(String[] args)
{
// The following url returns double
String url =
"http://127.0.0.1:5080/test/gateway"<http://127.0.0.1:5080/test/gateway>
;
// The following url returns null
// String url =
"http://127.0.0.1:5080/test/gateway/somescope"<http://127.0.0.1:5080/test/gateway/somescope>
;
RemotingClient client = new RemotingClient(url);
Object[] obj = { "Hello world" };
IRemotingCallback callback = new NonRTMPClient.CallbackHandler();
Object result = client.invokeMethod("test.testMe", obj);
// If i comment the line above and uncomment the line below and
execute, it throws a NullPointerException
// client.invokeMethod("test.testMe", obj,callback);
System.out.println(result);
}
static class CallbackHandler implements IRemotingCallback
{
public void errorReceived(RemotingClient client, String method,
Object[] params, Throwable error)
{
error.printStackTrace();
}
public void resultReceived(RemotingClient client, String method,
Object[] params, Object result)
{
System.out.println(method);
System.out.println(params);
System.out.println(result);
}
}
}
Thanks,
Sri.
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org