Java RMI newbie-- getting errors in SpringToolSuite for imports in client side app java code
$30-250 USD
ถูกยกเลิก
โพสต์ มากกว่า 11 ปีที่ผ่านมา
$30-250 USD
ชำระเงินเมื่อส่งงาน
Hi
am trying to create an RMI service using Spring. The IDE I am using is the latest version of Spring Tool Suite.
I am following instructions as per this URL--> [login to view URL]
Now, I have created the server-side code correctly, and the RMI server app context XML file is as below-->
Now, I have created the client side app also, and in it this is the code-- (I have omitted the imports/package name)--basically a single variable of integer type is passed as command line param to the client JAR file. This parm is then used as param during call to RMI Service. (It is the only param in RMI invocation).
public class TestClient {
private static Logger logger = [login to view URL](TestClient .class);
/** * Main method of the RMI Service Client * */ public static void main(String[] args) {
[login to view URL]("RMI Service Client is starting...");
//RMI Client Application Context is started... ApplicationContext context = new ClassPathXmlApplicationContext("rmiClientAppContex [login to view URL]");
//Remote User Service is called via RMI Client Application Context... SampleTaskrmiClient = (SampleTask) [login to view URL]("SampleTask"); int userid; //get the user id for whom RMI is to be used...this was passed as an argument to the client JAR file... if([login to view URL]!=1) [login to view URL](1); else userid= [login to view URL](args[0]);
[login to view URL](userid);
[login to view URL]("RMI Service Client is stopped..."); } }
Also, the RMI Client App context XML file is as below--
However I am getting errors in Eclipse-- basically for the 2 imports in client side java code-- the imports for "[login to view URL]" and "[login to view URL]" are showing this error--> The import _ _ _ _ _ cannot be resolved.
What is wrong in my code? Is there some config/setting change that I have to make?
Also, once the above settings are configured, you have to prepare a simple document explaining how to secure the RMI service. And you also have to create a sample RMI service which uses the code as per page quoted above, and secure that RMI service.
Simple work for a good java programmer who knows RMI and Spring.
Please bid really low- this is easy work for an experienced coder.
Thanks,
Arvind.