XML Schema-based Configuration:-
Marshallers could be configured more concisely using tags from the OXM
namespace. To make these tags available, the appropriate schema has to be
referenced first in the preamble of the XML configuration file. Now the code
below is related to OXM:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:oxm="http://www.springframework.org/schema/oxm"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/oxm
http://www.springframework.org/schema/oxm/spring-oxm.xsd">
</beans>
Currently, the following tags are available:
1 jaxb2-marshaller
2 xmlbeans-marshaller
3 castor-marshaller
4 jibx-marshaller
Each tag will be explained in its respective marshaller’s section. As an
example though, here is how the configuration of a JAXB2 marshaller might
look like:
<oxm:jaxb2-marshaller id="marshaller" contextPath="org.springframework.ws.samples.airline.schema"/>