Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Migrate from Spring 2.5 to 3 within an existing Axis 1.4 webservice

I have to migrate from Spring 2.5 to 3.0. My web services are still running with Axis 1.4, with Spring 2.5 I was rather simple, every class of a service implementation extends the ServletEndpointSupport. In Spring 3.0 the ServletEndpointSupport is deprecated.

For example:

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());
    }
}

Is there a way to get the ApplicationContext in Spring 3 in such a simple way as in Spring 2.5.

like image 444
Alex Avatar asked Nov 06 '22 11:11

Alex


1 Answers

Just because ServletEndpointSupport is deprecated, doesn't mean you shouldn't use it, it just means it's only there to support an obsolete or obsolescent mechanism - in this case JAX-RPC (Axis 1). The javadoc for ServletEndpointSupport says:

deprecated in favor of JAX-WS support in org.springframework.remoting.jaxws

In other words, Axis 1 itself is obsolete (as you know), and so Spring 3 provides no up-to-date support for it.

This is similar to the huge number of pre-Spring 2.5 apps out there still using the old Controller hierarchy, which is deprecated in Spring 3, but isn't going anywhere any time soon.

like image 131
skaffman Avatar answered Nov 11 '22 04:11

skaffman