2010-07-12 69 views
5

我必須從Spring 2.5遷移到3.0。 我的web服務仍然使用Spring 2.5運行在Axis 1.4, 上我很簡單,每個服務實現類都擴展了ServletEndpointSupport。在Spring 3.0中,ServletEndpointSupport已棄用。在現有的Axis 1.4 Web服務中從Spring 2.5遷移到3

例如:

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 3 ApplicationContext中以這樣一種簡單的方式在Spring 2.5。

回答

2

僅僅因爲ServletEndpointSupport已被棄用,並不意味着您不應該使用它,它只是意味着它僅支持過時或過時的機制 - 在本例中爲JAX-RPC(Axis 1)。對於ServletEndpointSupport的Javadoc說:

棄用,取而代之的JAX-WS支持 org.springframework.remoting.jaxws

換句話說,軸1本身已過時(你懂的),所以彈簧3沒有提供爲其提供最新的支持。

這與使用舊的Controller層次結構的春季2.5之前的應用程序數量相當,該層次結構在Spring 3中不推薦使用,但不會很快到達任何地方。