Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.3.0
-
None
-
Unknown
Description
The following yaml
- rest: id: rest-c658 get: - id: get-2028 to: direct:start - route: id: route-a41e nodePrefixId: route-7fd from: id: from-131e uri: direct parameters: name: start steps: - setBody: id: setBody-31fe expression: simple: id: simple-56a9 expression: ${headers.CamelFtpReplyCode} - log: id: log-793d message: ${body}
is transformed, via
camel transform route --format=xml test.yaml
into the following XML
<camel> <route id="route-a41e" nodePrefixId="route-7fd"> <from id="from-131e" uri="direct:start"/> <setBody id="setBody-31fe"> <simple>${headers.CamelFtpReplyCode}</simple> </setBody> <log id="log-793d" message="${body}"/> </route> <rests> <rest id="rest-c658"> <get id="get-2028"> <to uri="direct:start"/> </get> </rest> </rests> </camel>
the rests section does not work as is, in particular the camel run fails with the following error XmlPullParserException: Unexpected element '{}rests'.
Removing <rests> tag, camel run works as expected
<camel> <route id="route-a41e" nodePrefixId="route-7fd"> <from id="from-131e" uri="direct:start"/> <setBody id="setBody-31fe"> <simple>${headers.CamelFtpReplyCode}</simple> </setBody> <log id="log-793d" message="${body}"/> </route> <rest id="rest-c658"> <get id="get-2028"> <to uri="direct:start"/> </get> </rest> </camel>