From: <php...@li...> - 2011-09-19 16:06:53
|
Hi! I've been using the old native bridge for some time - but I had to upgrade to the new API on a recent server upgrade and then ran in to some problems... I Have a very simple RMI service with one remote interface. I used to interface it using the old native API, with the following code: $remote = new java("se.something.SomeServerRemote"); $lookup = new java_class("java.rmi.Naming"); $remote = $lookup->lookup("rmi://www.something.net/SomeServer"); And then I could interface and send data on the defined remote interface and methods like: // just method call, not passing any object $result = $remote->sendEcho(); // instantiate object to be sent to RMI-server $someObject = new java("org.jpos.ISOMsg", 3); // call RMI with data $response = $remote->sendTransaction($somObject); This used to work just great! I've now compiled the bridge into a very simple standalone server that receives the bridge API-calls and then just interfaces the RMI server. This works fine when I'm not passing any objects to the remote service (i.e. using the $remote->sendEcho() ) but I get a java exception when I try to pass any object/data: PHP Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed: [[o:SomeServer_Stub]]->sendTransaction((o:ISOMsg)[o:ISOMsg]). Cause: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: \n\tjava.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: \n\tjava.net.MalformedURLException: unknown protocol: rsrc VM: 1.6.0_20@http://java.sun.com/" I'm sorry if this is a newbie question, but I don't realize what I'm doin wrong here. Any help would be so great. Cheers /Mikael |