I have the echo application on the following path: C:\Program
Files\Red5\webapps\echo.
But I keep getting this msg
ERROR [main] (RemotingClient.java:323) - Error while invoking remoting
method.
java.lang.RuntimeException: Didn't receive success from remoting server.
at org.red5.server.net.remoting.RemotingClient.invokeMethod(
RemotingClient.java:307)
at org.red5.samples.NonRTMPClient.main(NonRTMPClient.java:17)
null
package org.red5.samples;
import org.red5.server.net.remoting.IRemotingCallback;
import org.red5.server.net.remoting.RemotingClient;
public class NonRTMPClient {
public static void main(String[] args)
{
// The following url returns double
String url = "http://localhost:5080/echo";
RemotingClient client = new RemotingClient(url);
Object[] obj = {"world"};
IRemotingCallback callback = new
NonRTMPClient.CallbackHandler();
Object result = client.invokeMethod("echo", obj);
// If i comment the line above and uncomment the line
below and execute, it throws a NullPointerException
//client.invokeMethod("test.echo", 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);
}
}
}
Shashank Tilwalli
Hughes Systique Corporation
D-8, Infocity - II, Sector - 33
Gurgaon - 122022
Haryana, India
http://www.hsc.com
*****************************************************DISCLAIMER*****************************************************
This message and/or attachment(s) contained here are confidential, proprietary
to HUGHES SYSTIQUE and its customers.
Contents may be privileged or otherwise protected by law. The information is
solely intended for the entity it is
addressed to. If you are not the intended recipient of this message, it is
strictly prohibited to read, forward,
print, retain, copy or disseminate this message or any part of it. If you have
received this e-mail in error,
please notify the sender immediately and delete the message.
********************************************************************************************************************
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org