You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Stanislav (Jira)" <ji...@apache.org> on 2019/10/30 14:40:00 UTC

[jira] [Created] (CAMEL-14114) Static resolver extension for validation with xsd

Stanislav created CAMEL-14114:
---------------------------------

             Summary: Static resolver extension for validation with xsd
                 Key: CAMEL-14114
                 URL: https://issues.apache.org/jira/browse/CAMEL-14114
             Project: Camel
          Issue Type: Improvement
          Components: came-core
    Affects Versions: 2.24.2
            Reporter: Stanislav


In our project, we process xml documents and pass each document through one of the xsd schemes that we store in the mongo database. The problem is that with the xslt conversion we perform by calling
{code:java}
transactedDefinition.to ("xslt: mongo: dbf860e2-2589-4113-9c26-7cc2235f306d")
{code}
And Camel uses SpringUriResolver, which can be redefined so that it understands the mongo protocol. In ValidationEndPoint, a SchemaReader is created explicitly setting the class in the constructor and cannot be overridden, and the standard SchemaReader does resolving by calling the static method
{code:java}
org.apache.camel.util.ResourceHelper#resolveMandatoryResourceAsInputStream (org.apache.camel.CamelContext, java.lang.String)
{code}
In the end, I had to override ValidationEndPoint and SchemaReader to add mongo protocol recognition there.
Is it possible to make using SpringUriResolver in ValidationEndPoint?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)