Hello,
Just make a remote object for calling the java class method by writting
then call a function on the client side and inside that function call remoteObjectID.java class method name.
That method name should be configure inside the remoting-config.xml file in the server.
Within that java class just write the some code for calling the servlet
URL url = null;
URLConnection con = null;
con = url.openConnection();
con.setUseCaches(false);
con.setDoOutput(true);
con.setDoInput(true);
ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
DataOutputStream out = new DataOutputStream(byteOut);
out.flush();
byte buf[] = byteOut.toByteArray();
con.setRequestProperty("Content-type", "application/octet-stream");
con.setRequestProperty("Content-length", "" + buf.length);
try
{
dataOut = new DataOutputStream(con.getOutputStream());
}
catch(Exception e)
{
System.out.println("Error :"+e.getMessage());
}
System.out.println(methodName+" : "+1);
dataOut.write(buf);
dataOut.flush();
DataInputStream in = new DataInputStream(con.getInputStream());
BufferedReader rd = new BufferedReader(new InputStreamReader(con.getInputStream()));
String getValue = rd.readLine();
rd.close();
dataOut.close();
in.close();
Then that simple java class use as web-service method.
I Hope This Code Will Help You.
Bye