Re: Can anyone please explain how to get the invoked method name?
KHOURY Shérine (Dr&T) <[email protected]> Wed, 15 Oct 2003 17:18:50 +0200
| Newsgroups | gmane.comp.java.enhydra.ksoap |
|---|---|
| Message-ID | <[email protected]> |
Stefan Haustein wrote: >>If I understand correctly from reading the ksoap source files, is that >>on the kSOAP Servlet side, the name of the class to be called is in the >>URL found in the HttpServletRequest, while the method's name is found >>with SoapObject.getName(). >>My question is, what 's the use of ClassMap, and instanceMap then? >> >> > >The classMap is used to map method parameters. > >kSOAP is originally intended to be used on the client side, and the >servlet capabilities were only added to be able to provide an interop >testing server. Thus, the mapping of uris, classes and method names may >not fit your needs very well... The best approach may be to copy the >source of the servlet and modify it to meet your own needs. > >Best, >Stefan > > >_______________________________________________ >Ksoap mailing list >[email protected] >http://www.enhydra.org/mailman/listinfo.cgi/ksoap > > > Hi Stephan, I'm working on implementing SOAP on J2ME peers, in a P2P network. Since I wont be using SOAP/ HTTP, but rather SOAP/ P2PMessages (JXME) , I cannot assume that the class name is the URL in HttpRequest and that the method name is the SOAP element name. This is why using the kSoapServlet code is not very usefull for me from this point of view. I saw that in the SoapServlet, there are publishClass, publishInstance and publishMethod methods. These methods are not used! Add to that that there are no methods that could search instanceMap and ClassMap for a match given a namespace+ element name (name of method to be invoked) Do they exist somewhere? or should I implement such methods by myself? My guess is: With the namespace and the elementname (methodname), I lookup a template in the ClassMap. I didn't understand how to use this template though... Then, with this, I have to find a way to locate the class's name, and by so its instance from the instanceMap, then call the corresponding method + arguments. Can you please explain to me how the template thing works? Thanks a lot Sherine