Not knowing an exact answer, but the introspector is by default used fro
classes onyl where there is *no* mapping. Which would somehow explain
why they are not being used ... ;-(. Does this make sense ?
Werner
________________________________
From: Iyer, Vidya [mailto:[EMAIL PROTECTED]
Sent: Dienstag, 12. Dezember 2006 00:33
To: [email protected]
Subject: [castor-user] Marshaller ignoring custom handler
factories
Hi,
I'm using castor 1.0.5 and I see something slightly suspicious.
I have a few special handlers, and after reading this posting
http://www.mail-archive.com/[email protected]/msg01443.html
<http://www.mail-archive.com/[email protected]/msg01443.html> ,
However the marshaller is totally ignoring my custom handlers.
classDescriptorResolver = new
XMLClassDescriptorResolverImpl();
classDescriptorResolver.getIntrospector().addFieldHandlerFactory(new
CustomBooleanHandlerFactory());
classDescriptorResolver.getIntrospector().addFieldHandlerFactory(new
CustomDoubleHandlerFactory());
classDescriptorResolver.getIntrospector().addFieldHandlerFactory(new
CustomDateHandlerFactory());
Marshaller marshaller = new Marshaller(document);
marshaller.setValidation(false);
marshaller.setMapping(mapping);
marshaller.marshal(resultObject);
The _cdResolver is getting set correctly, but the marshaller
just isn't using it. Am I missing something obvious?
Thanks,
Vidya