Hello, I have still the same problem.
> Follow the example in the URL: > 1. your impl class implements javax.xml.rpc.server.ServiceLifecycle > 2. implement init(Object ctx) and destroy() My problem is hat the init and destroy method is only called, if I implement the ServiceLifecycle interface in the Skeleton class. But this is not what I want to do, because this class is not very nice and would be overwritten if I do another Java2WSDL task. > It works for me in Axis 1.2.1 and Axis 1.3. I use axis 1.4 but I think that's not the problem. > Search for basic mistakes: are you overwriting your impl and deploying > that instead? Is the impl class in Tomcat's webapps/classes really the > one you made? Do you have two versions, one in web-inf/classes and one > in web-inf/lib? I have checked this. > IIRC, the init method will be called when the Axis servlet is activated. > I believe Tomcat activates servlets at start-up time, but Servlet > container implementations are allowed to do this at first access (just > before the first incoming request). I am a little bit confused about the ServiceLifecycle. The ServiceLifecycle seems to be called every time if I call http://localhost:7070/myapp/services/SyncService?method=getPerson in the browser etc.. That's OK and what I want to have. But in some documentations and also in books they write the init method of a service will be called only ONCE before he can accept requests. I think that's not correct?!? > There is no need to set anything in the web.xml or wsdd to make it work. OK. > PS: If you really can't get it to work, send us your appl (or smaller > version of it). That's very kindly from you. Please see the attached short code (including also build.xml and server-config.wsdd). You have only to add the axis libs to test it. The code produces in my case: Skeleton - init Skeleton - destroy Skeleton - init Skeleton - destroy .. I would think, he should generates: Skeleton - init ServiceImpl - init PersonService - init Skeleton - destroy ServiceImpl - destroy PersonService - destroy The init and destroy method of ServieImpl will also not be called if I comment the other two. Your help is very, very appreciated! Many thanks, Ralph PS: Another ugly thing why overwrites Axis with every java2wsdl task the ServiceImpl class?
test.wsdl
Description: Binary data
<?xml version="1.0"?>
<project name="ServiceLifecycle" default="generate" basedir=".">
<property name="src" value="src" />
<property name="lib.server" value="${basedir}/lib" />
<property name="local.wsdl" value="test.wsdl" />
<path id="axis.classpath">
<fileset id="libAxis" dir="${lib.server}">
<include name="*.jar" />
</fileset>
</path>
<taskdef resource="axis-tasks.properties" classpathref="axis.classpath" />
<target name="generate">
<axis-wsdl2java url="${local.wsdl}"
output="${src}"
testcase="false"
deployscope="session"
serverside="true"
skeletonDeploy="true"
implementationclassname="com.name.webservice.server.ServiceImpl"
noimports="false">
<mapping namespace="http://www.name.com/myapp/"
package="com.name.myapp.websevice.axis" />
</axis-wsdl2java>
</target>
</project><?xml version="1.0" encoding="ISO-8859-1"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>Test - ServiceLifecycle</display-name> <!-- Servlet Configuration --> <servlet> <display-name>Apache-Axis Servlet</display-name> <servlet-name>AxisServlet</servlet-name> <servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class> </servlet> <servlet> <display-name>Axis Admin Servlet</display-name> <servlet-name>AdminServlet</servlet-name> <servlet-class>org.apache.axis.transport.http.AdminServlet</servlet-class> <load-on-startup>100</load-on-startup> </servlet> <servlet> <display-name>SOAPMonitorService</display-name> <servlet-name>SOAPMonitorService</servlet-name> <servlet-class>org.apache.axis.monitor.SOAPMonitorService</servlet-class> <init-param> <param-name>SOAPMonitorPort</param-name> <param-value>5001</param-value> </init-param> <load-on-startup>100</load-on-startup> </servlet> <servlet-mapping> <servlet-name>AxisServlet</servlet-name> <url-pattern>/servlet/AxisServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>AxisServlet</servlet-name> <url-pattern>*.jws</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>AxisServlet</servlet-name> <url-pattern>/services/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>SOAPMonitorService</servlet-name> <url-pattern>/SOAPMonitor</url-pattern> </servlet-mapping> <!-- uncomment this if you want the admin servlet --> <!-- <servlet-mapping> <servlet-name>AdminServlet</servlet-name> <url-pattern>/servlet/AdminServlet</url-pattern> </servlet-mapping> --> <welcome-file-list id="WelcomeFileList"> <welcome-file>index.html</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>index.jws</welcome-file> </welcome-file-list> </web-app>
server-config.wsdd
Description: Binary data
ServiceImpl.java
Description: Binary data
PersonService.java
Description: Binary data
MyAppServiceBindingSkeleton.java
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
