deploy service in apache tomcat and access it through ksoap
"Rubén" <[email protected]> Sun, 18 Apr 2004 19:17:38 +0200
| Newsgroups | gmane.comp.java.enhydra.ksoap |
|---|---|
| Message-ID | <000501c42569$0ea2f190$0201a8c0@rtb1800> |
Hi!.
I want to invoke some methods deployed in apache tomcat with apache soap 1.2
running on it. I am newbie in that world, so I don't know if I can use
apache soap to deploy services so that ksoap can access them.
I have tried to deploy a simple class on the server and i've tried to invoke
it in my midlet, following the sintax decribed in a taxtCalc example. Here
is the heart of the function:
SoapObject client = new
SoapObject("urn:soap-rtb-mp2p:MobileP2P","authenticate");//urn and class to
invoke
//arguments
client.addProperty("login",login);
client.addProperty("password",password);
//Connection to serverHttpTransport ht = new
HttpTransport("http://localhost:8080/soap/servlet/rpcrouter",
"urn:soap-rtb-mp2p:ServicioMP2P#authenticate");
//call the method
System.out.println("$$$$"+ht.call(client));
In the server side I've deployed the class MobileP2P with a method
authenticate and, it seems to be published.
I compile and run my MIDlet and when the code tries to access de service a
screen apears in the emulator telling if i want to use de network, i press
the yes button and nothing happens. I don't know if the service is not
properly deployed or simply that apache soap is not compatible with ksoap.
Could Anyone tell me alternatives or how to invoke rpc from my midlet and
how deploy and with which technology, servlets,apache soap etc etc...
Thanks, sorry for my english and for being "tan pesado"(in spanish)