Refactor to use OXM from Spring 3

Details

Description

Since the OXM stuff from Spring-WS has now been incorporated into Spring 3, Spring-WS will at some point need to be updated to use the OXM code from the core framework. The OXM code in the core has already moved on, and is newer than that in Spring-WS.

I am currently developing a system using Spring 3 M4 and Spring-WS 1.5.x, and I have to be very careful not to include the OXM code from Spring-WS in the build. When Spring 3 goes final, this will become increasingly problematic as prople try to use them together.

Kenny MacLeod
added a comment - 16/Sep/09 12:09 AM It seems that Spring-WS 1.5.8 will not work with the OXM code from Spring 3. However, some of the OXM clases are present in both Spring 3 and Spring-WS, and yet are slightly different.

Arjen Poutsma
added a comment - 16/Sep/09 12:22 AM This is planned for Spring-WS 2.0 (previously known as 1.6), where we drop the OXM module in SWS in favor of the one in SPR.
And no: Spring-WS 1.5.x cannot handle the OXM from Spring Core.

Arjen, can you please elaborate on this subject. Are you saing that - even if we managed our Maven dependencies ourselves and carefully - it is not possible to use Spring 3.0 OXM classes with current (1.5.x) spring-ws code ?

Werner Guttmann
added a comment - 24/Jan/10 11:40 PM {{{
And no: Spring-WS 1.5.x cannot handle the OXM from Spring Core.
}}}
Arjen, can you please elaborate on this subject. Are you saing that - even if we managed our Maven dependencies ourselves and carefully - it is not possible to use Spring 3.0 OXM classes with current (1.5.x) spring-ws code ?

If it works for you, that's good. I have even ran my test suite against SPR's OXM, and it seems to work fine. But it's not 'formally' supported, as I did make some minute changes to the oxm package when it moved to the core.

Arjen Poutsma
added a comment - 09/Feb/10 8:10 PM @Werner
If it works for you, that's good. I have even ran my test suite against SPR's OXM, and it seems to work fine. But it's not 'formally' supported, as I did make some minute changes to the oxm package when it moved to the core.

I've experienced occasional clashes between Spring 3 OXM and Spring-WS OXM, in particular when using the Spring 3 OXM with MVC, and the appserver happens to pick the Spring-WS OXM classes in preference. It's hard to reproduce, and hard to fix when it does happen, to the point where I try to avoud using OXM from both Spring MVC and Spring-WS in the same application.

The problem, of course, is that the Spring 3 OXM classes have evolved onwards since they were copied from Spring-WS, and if the Spring-WS versions get picked by the classloader, you get "no such method" errors and the like.

Kenny MacLeod
added a comment - 09/Feb/10 8:29 PM I've experienced occasional clashes between Spring 3 OXM and Spring-WS OXM, in particular when using the Spring 3 OXM with MVC, and the appserver happens to pick the Spring-WS OXM classes in preference. It's hard to reproduce, and hard to fix when it does happen, to the point where I try to avoud using OXM from both Spring MVC and Spring-WS in the same application.
The problem, of course, is that the Spring 3 OXM classes have evolved onwards since they were copied from Spring-WS, and if the Spring-WS versions get picked by the classloader, you get "no such method" errors and the like.

Using SPR's OXM now works for me locally on the SWS 2.0-M1 branch, but we have to wait till SPR 3.0.1 comes out, since I added some required classes there (GenericMarshaller specifically). It should be out later this week.

Arjen Poutsma
added a comment - 09/Feb/10 10:09 PM Using SPR's OXM now works for me locally on the SWS 2.0-M1 branch, but we have to wait till SPR 3.0.1 comes out, since I added some required classes there (GenericMarshaller specifically). It should be out later this week.