我必须从 Spring 2.5 迁移到 3.0。 我的 Web 服务仍在使用 Axis 1.4 运行, 对于 Spring 2.5,我相当简单,服务实现的每个类都扩展了 ServletEndpointSupport。在 Spring 3.0 中,ServletEndpointSupport 已被弃用。
例如:
public class PersonBindingImpl extends ServletEndpointSupport implements PersonPortType {
public PersonDaten PersonQueryRequest(XPAPersonRequest request) throws RemoteException, XPAException {
PersonsImpl persons = getWebApplicationContext().getBean("personImpl", PersonsImpl.class);
return persons.getAllByGroup(request.getGroup());
}
}
有没有办法像在 Spring 2.5 中那样简单地获取 Spring 3 中的 ApplicationContext。
最佳答案
只是因为 ServletEndpointSupport
已被弃用,并不意味着您不应该使用它,它只是意味着它仅用于支持过时或过时的机制 - 在本例中为 JAX-RPC(Axis 1 ). ServletEndpointSupport
的 javadoc 说:
deprecated in favor of JAX-WS support in
org.springframework.remoting.jaxws
换句话说,Axis 1 本身已经过时(如您所知),因此 Spring 3 不为其提供最新支持。
这类似于仍然使用旧的 Controller
层次结构的大量 pre-Spring 2.5 应用程序,它在 Spring 3 中已被弃用,但不会很快消失。
关于java - 在现有的 Axis 1.4 web 服务中从 Spring 2.5 迁移到 3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3226916/