Hi,
I am using Castor in a messaging service and I validate messages against a
schema. For flexibility reasons, I am trying to avoid having a hard coded
path to my schema inside the XML messages. (trying to avoid:
xsi:schemaLocation="http://myNamespace /some/hard/coded/path/schema.xsd")
I have created an EntityResolver that I assign to Castor's unmarshaller :
Unmarshaller unmarshaller = new Unmarshaller(EMSMessage.class);
unmarshaller.setEntityResolver(new EmsEntityResolver());
Within the EmsEntityResolver, I have implemented the resolveEntity method:
public InputSource resolveEntity(String publicId, String systemId) throws
SAXException, IOException
{
System.err.println("EmsEntityResolver - public ID: " + publicId);
System.err.println("EmsEntityResolver - System ID: " + systemId);
...
actual resolving code
...
}
I never see the print out (though I see others, so it is not because I am
not looking at the right place).
Why isn't my EntityResolver called by the unmarshaller?
Thanks in advance :)
Vincent Gigu�re
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user