You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Chirag Sanghavi (Jira)" <ji...@apache.org> on 2023/03/02 15:28:00 UTC

[jira] [Created] (CAMEL-19111) Yaml DSL does not seem to work with split/xtokenize

Chirag Sanghavi created CAMEL-19111:
---------------------------------------

             Summary: Yaml DSL does not seem to work with split/xtokenize
                 Key: CAMEL-19111
                 URL: https://issues.apache.org/jira/browse/CAMEL-19111
             Project: Camel
          Issue Type: Bug
          Components: camel-yaml-dsl
    Affects Versions: 3.20.2
            Reporter: Chirag Sanghavi


This scenario works with XML DSL

Here is XML DSL
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<!-- camel-k: language=xml --><routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://camel.apache.org/schema/spring"
        xsi:schemaLocation="
            http://camel.apache.org/schema/spring
            https://camel.apache.org/schema/spring/camel-spring.xsd">    <!-- Write your routes here, for example: -->
    
    <route>
        <from uri="file:///c://work//batchsplit//in"/>
        <split streaming="true">
            <xtokenize mode="w">//BatchMaster</xtokenize>
            <to uri="file:///c://work//batchsplit//out?fileName=${exchangeId}.xml"/>
        </split>
    </route></routes>
 {code}
Here is Yaml version that I tried:
{code:yaml}
- route:
    id: route-a6b4
    from:
      uri: file:/work/batchsplit/in
      id: from-d1ca
      steps:
        - split:
            id: split-6d45
            expression: 
              xpath:
                expression: //Batchmaster
                id: xtokenize-460a
            streaming: true
            steps:
              - to:
                  uri: file:/work/batchsplit/out?fileName=${exchangeId}.xml
                  id: to-1a10
{code}

I have tried to run this thru camel-jbang.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)