Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.2.0
-
None
-
Unknown
Description
When loading rest definitions via "xml-rests" path defined in property
camel.springboot.xml-rests = classpath:folder-camel/folder-rest/*.xml
The camel 3.2 fails with error
Failed to start route first-test-get-id because of duplicate id detected: first-test-to-id. Please correct ids to be unique among all your routes.
My rest XML file is defined as
<?xml version="1.0" encoding="UTF-8"?><?xml version="1.0" encoding="UTF-8"?>
<rests xmlns="http://camel.apache.org/schema/spring" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
{{ xsi:schemaLocation="}}
{{ http://camel.apache.org/schema/spring https://camel.apache.org/schema/spring/camel-spring-3.2.0.xsd}}
{{ ">}}
{{ <rest id="id1" path="/test">}}
{{ <get id="id2" uri="/folderuri">}}
{\{ <to id="id3" uri="log:test-log-rest" />}}
{{ </get>}}
{{ </rest>}}
</rests>
However, when I envelope TO tag in the ROUTE tag, the issue gets resolved
<rest id="id1" path="/test">
<get id="id2" uri="/folderuri">
<route id="id4">
<to id="id3" uri="log:test-log-rest" />
</route>
</get>
</rest>