Hi,
I doesn't work for me either. I am using tc Server v6.0 with Spring 2.5.6.SEC01 and Apache CXF 2.2.4
My web.xml is:
Code:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:org/example/remoting/jaxw/cxf-context.xml</param-value>
</context-param>
<listener>
<listenerclass>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/cxf/*</url-pattern>
</servlet-mapping>
The cxf-context.xml is:
Code:
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<context:annotation-config />
<bean id="helloWorld" class="org.example.remoting.SimpleHelloWorld" />
<jaxws:endpoint id="helloWorldService"
implementor="org.example.remoting.jaxws.HelloWorldEndpoint" address="/helloWorldService" />
My endpoint implementation is
Code:
@WebService
public class HelloWorldEndpoint extends SpringBeanAutowiringSupport implements RemoteHelloWorld{
@Autowired
private HelloWorld helloWorld;
@Override
public String getMessage() throws RemoteException {
return helloWorld.getMessage();
}
}
In the logs I see:
Code:
DEBUG: org.springframework.web.context.support.SpringBeanAutowiringSupport - Current WebApplicationContext is not available for processing of HelloWorldEndpoint: Make sure this class gets constructed in a Spring web application. Proceeding without injection.
Zoltan