camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shekher awasthi <shekher.awas...@gmail.com>
Subject Custom URIResolver for Camel
Date Thu, 04 Aug 2011 07:40:45 GMT
we are trying to use xsl for converting xml to our custom xml format using
camel and its out of the box xslt support here is a sample route

<from uri="file://target/inventory/updates?noop=true"/>
        <unmarshal>
                <csv />
            </unmarshal>
       <to uri="bean:XMLConverter?method=processCSVInvoice" />
       <to uri="xslt:file//target/inventory/updates/xlsconvertor/XMLConverter.xsl"/>
      <to uri="file://target/inventory/updates/test?fileName=test11.xml"/>
    </route>

my problem is when i am putting this xls file in the class path camel is
happily picking the xls and doing the work as per the route but moment we
are placing the xls file out of class path like in a file system camel is
unable to resolve this and we are struck as the whole purpose to use xls is
to take custom xml formatting out of the jar

as a workaround i tried to create a customURLResolver and than tried to use
it as

<from uri="file://target/inventory/updates?noop=true"/>
        <unmarshal>
                <csv />
            </unmarshal>
       <to uri="bean:XMLConverter?method=processCSVInvoice" />
       <to uri="xslt:file//target/inventory/updates/xlsconvertor/XMLConverter.xsl?uriResolver=customURIResolver"/>
      <to uri="file://target/inventory/updates/test?fileName=test11.xml"/>
    </route>

but in this case camel is not calling my customURIResolver any idea how i
can make camel to use my custom URIResolver in place of its default resolver



thanks in advance

Shekher

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message