Sample 7 works with the 1.2 version but when I try to validate our rather
complex schema using 1.2 I get the following error:
ERROR ValidateMediator Error creating a new schema objects for schemas :
[validate_schema]
org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name
'common:KnowledgeObjectListSeqType' to a(n) 'type definition' component.

The schema is set in the mediator like this:
     <localEntry key="validate_schema"
src="file:/opt/apps/myxsdpath/my.xsd"/>

The schema imports several other schemas.

I tracked this down to the following code:
sources[i++] =
SynapseConfigUtils.getStreamSource(synCtx.getEntry(propName));
...
cachedSchema = factory.newSchema(sources);


If I replace the above code with:
cachedSchema = factory.newSchema(new File(synCtx.getEntry(propName)));

It works fine.

I'm sure there's a better way to fix it ...

-- 
View this message in context: 
http://www.nabble.com/validate-mediator-not-working-tp22725237p22833917.html
Sent from the Synapse - User mailing list archive at Nabble.com.

Reply via email to