Hi Stefan,
Try using the wsdl4reg http://sourceforge.net/projects/wsdl4reg, by Olivier
Brand, in Axis lifecycle methods. It should be straightforward.
For example:
public final class MyService implements
javax.xml.rpc.server.ServiceLifecycle {
public final String getStockQuote(String symbol) {
// do stuff
}
/*
* Implementation of javax.xml.rpc.server.ServiceLifecycle.init()
* Called by Axis when its starts this service
*/
public final void init(final Object context) {
//register with UDDI registry
if (context instanceof ServletEndpointContext) {
final ServletEndpointContext sec = (ServletEndpointContext)context;
ServletContext sc = sec.getServletContext();
//do stuff with wsdl4reg
}
}
/*
* Implementation of javax.xml.rpc.server.ServiceLifecycle.destroy()
* Called by Axis when its destroys this service
*/
public final void destroy() {
//unregister from UDDI registry
//do stuff with wsdl4reg
}
}
Let me know if that helps,
Eric H. Jung
-----Original Message-----
From: Stefan Henke [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 18, 2002 1:02 PM
To: [EMAIL PROTECTED]
Subject: Registering service in uddi registry when startup
Hi,
I�m looking for a way to do the following with axis. Maybe you can help me.
I have deployed a webservice using axis sucessfully. Each time the server
which hosts the service starts up, it should automatically register the
service in a uddi registry. Vice a versa, the service has to be unpublished
when the server shuts down.
Maybe there is a way by overwriting the axis servlet and use the servlet
lifecycle methods. But I�m not 100% familiar with the servlet lifecycle.
Thanks
Stefan