RE: deploy service in apache tomcat and access it through ksoap
"Alexandru Dovlecel" <[email protected]> Mon, 19 Apr 2004 10:39:59 +0300
| Newsgroups | gmane.comp.java.enhydra.ksoap |
|---|---|
| Message-ID | <000d01c425e1$8493bb00$7eeff2a3@ro1cv02d> |
You have to make the call from a separate thread.
Implement the method that makes the call as a
public void run()
{
write the code here
}
When you click the button (Command) to access the WS,
you will do
new Thread( this ).start() ;
This is a change in MIDP2.0, so you have to make the call outside of the
main 'gui' thread.
HIH,
Alex (aka dovle)
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf
> Of Rub=E9n
> Sent: Sunday, April 18, 2004 8:18 PM
> To: [email protected]
> Subject: Ksoap: deploy service in apache tomcat and access it through
> ksoap
>
>
> 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 =3D 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 =3D 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)
>
> _______________________________________________
> Ksoap mailing list
> [email protected]
> http://www.enhydra.org/mailman/listinfo.cgi/ksoap