Hi,
here is an example of a SoapServlet. I use that in my application. I
removed some parts (not interesting for demo purpose).
package example.soap;
public class ExampleServiceServlet extends KSoapServlet
{
private static org.apache.log4j.Logger log =
org.apache.log4j.Logger.getLogger(ExampleServiceServlet.class);
public void init() throws ServletException
{
super.init();
BasicConfigurator.configure();
// register all the marshallers we need
ClassMap classMap = super.getClassMap();
new MarshalDate().register(classMap);
// publish our service
// Publishing the class does not work for some strange reason.
Therefore, we have
// to publish each method separatly...
// Note that ExampleWebService is an interface reflecting the WSDL
interface of the service.
super.publishMethod(ExampleWebService.class, "urn:ExampleWS",
"sayHello", new String[]{"name"});
super.publishMethod(ExampleWebService.class, "urn:ExampleWS",
"sayGoodbye", new String[]{"name"});
super.publishMethod(ExampleWebService.class, "urn:ExampleWS",
"sayLocalizedHello", new String[]{"name","locale"});
}
protected Object getInstance(HttpServletRequest request)
{
return new ExampleWebServiceSoapImpl();
}
}
Hope it helps,
Sebastien.
"Geetha P Eringathodi" <[email protected]>
Sent by: [email protected]
2002-10-01 16:10
Please respond to ksoap
To: [email protected]
cc: (bcc: Sebastien Petrucci/LEU/COMP/PHILIPS)
Subject: Ksoap: SoapServlet Implementation Example - URGENT
Classification:
Hi,
Could you please post an example of how the SoapServlet can be used,
how to deploy a web service using that and how its methods are used.
Thanks
peg
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
_______________________________________________
Ksoap mailing list
[email protected]
http://www.enhydra.org/mailman/listinfo.cgi/ksoap
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.