-
May 18th, 2009, 01:04 PM
#1
Jaxb2Marshaller not invoking the ValidationEventHandler
Hi,
The following is the configuration for jaxb2marshaller:
<bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshalle r">
<property name="contextPath" value="${jaxb2Marshaller.contextPath}" />
<property name="validationEventHandler" ref="validationEventHandler" />
<property name="schemas" ref="schemaList" />
<property name="schemaLanguage" value="http://www.w3.org/2001/XMLSchema" />
</bean>
<!-- schema list -->
<util:list id="schemaList">
<value>classpath:subscription/service-contracts/subscriptionService-1.0.xsd</value>
</util:list>
<!-- extends ValidationEventHandler from JAXB -->
<bean id="validationEventHandler" class="com.my.org.client.CustomValidationEventHand ler" />
This configuration does not invoke the validation handler at all while unmarshalling. I receive an Exception in the following code:
//-----
String failureMessageString = "<...valid...message.../>";
jaxb2Marshaller.unmarshal(new StringSource(failureMessageString));
//-----
Any ideas what I am doing wrong?
Thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules