you have to specify the following context param in your webservice web.xml:
<context-param> <param-name>org.jboss.ws.webapp.ServletContextListener</param-name> <param-value>mycompany.ServletContextListenerImpl</param-value> </context-param>
It is supported on each AS 4.2.x and above.
Thank you for your reply!
I have two more questions:
1. In my current project package there is no "web.xml". Where should I put a new web.xml? The following is the structure of my ear file. I have tried to put the "WEB-INF/web.xml" on the same level of the two "META-INF" folders, but it does not work.
App.ear - META-INF/ -application.xml - AppClient.jar - App.jar - META-INF/ - wsdl/ - App.wsdl - webservice.xml - mapping.xml - jboss.xml - ejb-jar.xml - classes/ - saaj-impl.jar - jaxrpc-spi.jar - jaxrpc-impl.jar
2. Currently I am using the JBoss version 4.0.2 (with Patch 10). Due to several reasons I can't upgrade the JBoss server to version 4.2.x. Do you think the "context-param" will work in the verson 4.0.2? I tried the "ServletContextListener" in a WAR application in 4.0.2 und it works.
1.) You can use ServletContextListeners for JaxWS POJO endpoints (no EJB3). I see you're using ejb's. It will not work there.
2.) AFAIK JBossAS 4.0.2 webservice module is AXIS based. I have no idea, if it's supported there :(