I'm running jbossws in standalone tomcat, version 5.5.20.
I have an endpoint that extends ServiceLifecycle. I can see from my logs that init is being called and I have access to ServletEndpointContext.
I have a configuration parameter I'm storing in my web.xml for the web service:
<servlet> <servlet-name>MyServiceEndpoint</servlet-name> <servlet-class>org.service.MyServiceEndpoint</servlet-class> <init-param> <param-name>foo</param-name> <param-value>bar</param-value> </init-param> </servlet>
String paramValue = this.getEndpointContext().getServletContext().getInitParameter(foo);
The param you show is scoped on the servlet not the context.
However it is probably true that from an endpoint bean you cannot access the init params of the ServiceEndpointServlet because the endpoint bean does not have a reference to the servlet.