Closed glassfishrobot closed 16 years ago
Reported by al130959@java.net
kohsuke@java.net said: Thanks for the patch and apologies for the delay. Fixed in 1.8.
Was assigned to kohsuke@java.net
This issue was imported from java.net JIRA JAX_WS_COMMONS-14
Marked as fixed on Tuesday, January 15th 2008, 3:28:07 am
When trying to use an XWSS 2.0 style configuration file (/WEB-INF/server_security_config.xml) for my Metro 1.0.1 service endpoint implementation using JAX-WS Commons Spring integration and Provider
I tracked this behavior down to the following issue in com.sun.xml.ws.assembler.PipelineAssemblerFactoryImpl (line 728 in Metro 1.0.1 source code):
ServletContext ctxt = context.getEndpoint().getContainer().getSPI(ServletContext.class);
It turned out that JAX-WS Commons Spring integration uses a SpringService.ContainerWrapper implementation which is unable to return a ServletContext (but instead returns null), as no default Container will be available in class SpringService:
// TODO: how to set the default container? public void setContainer(Container container)
{ this.container = container; }
Luckily, we have the correct ServletContext available in SpringService
I therefore suggest the following two small changes to class SpringService:
1) Add a getter method for the ServletContext instance:
public ServletContext getServletContext()
{ return servletContext; }
2) Take special care of ServletContexts in the ContainerWrapper (inner class):
if(spiType==TubelineAssemblerFactory.class)
{ (... omitted by intention ...) // take special care of requests for the ServletContext }
else if(spiType==ServletContext.class)
{ return spiType.cast(getServletContext()); }
if(container!=null)
{ (... omitted by intention ...) }
After applying these two changes, my Provider
After fixing this, please be so kind as to post a new release of the JAX-WS Commons Spring integration, such that we can return to using an officially released version.
Many thanks in advance and best regards,
Andreas
– Andreas Loew Java Architect Sun Microsystems (Germany)
Environment
Operating System: All Platform: All
Affected Versions
[current]