ewcchan commented on issue #731: camelContext is not supported in XML DSL 
routedefinition
URL: https://github.com/apache/camel-k/issues/731#issuecomment-500487048
 
 
   I tried with separating the rest fragments out in its standalone xml.
   
   ```
   <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <rests xmlns="http://camel.apache.org/schema/spring";>
     <restConfiguration component="restlet" port="8081" host="127.0.0.1"/>      
     <rest path="/api/demo2">
        <post>
           <to uri="direct:handleRestRequest"/>
        </post>
     </rest>  
   </rests>
   ```
   however the `port` and `host` are not consumed.
   ```
   [1] OpenJDK 64-Bit Server VM warning: If the number of processors is 
expected to increase from one, then you should configure the number of parallel 
GC threads appropriately using -XX:ParallelGCThreads=N
   [1] 2019-06-10 16:34:26.747 INFO  [main] ApplicationRuntime - Add listener: 
org.apache.camel.k.listener.ContextConfigurer@3c407114
   [1] 2019-06-10 16:34:26.755 INFO  [main] ApplicationRuntime - Add listener: 
org.apache.camel.k.listener.ContextLifecycleConfigurer@7714e963
   [1] 2019-06-10 16:34:26.757 INFO  [main] ApplicationRuntime - Add listener: 
org.apache.camel.k.listener.RoutesConfigurer@55b7a4e0
   [1] 2019-06-10 16:34:26.758 INFO  [main] ApplicationRuntime - Add listener: 
org.apache.camel.k.listener.RoutesDumper@72057ecf
   [1] 2019-06-10 16:34:26.813 INFO  [main] RoutesConfigurer - Loading routes 
from: file:/etc/camel/sources/i-source-000/rests.xml?language=xml
   [1] 2019-06-10 16:34:26.893 INFO  [main] DefaultTypeConverter - Type 
converters loaded (core: 195, classpath: 10)
   [1] 2019-06-10 16:34:27.962 DEBUG [main] XmlLoader - Loaded 1 rests from 
Source{location='file:/etc/camel/sources/i-source-000/rests.xml', language=xml, 
compressed=false}
   [1] 2019-06-10 16:34:27.982 INFO  [main] DefaultCamelContext - Apache Camel 
2.23.2 (CamelContext: camel-k) is starting
   [1] 2019-06-10 16:34:27.984 INFO  [main] ManagedManagementStrategy - JMX is 
enabled
   [1] 2019-06-10 16:34:28.211 INFO  [main] DefaultCamelContext - StreamCaching 
is not in use. If using streams then its recommended to enable stream caching. 
See more details at http://camel.apache.org/stream-caching.html
   [1] 2019-06-10 16:34:28.376 INFO  [main] DefaultCamelContext - Route: route1 
started and consuming from: restlet:///api/demo2?restletMethods=POST
   [1] 2019-06-10 16:34:28.377 INFO  [main] DefaultCamelContext - Total 1 
routes, of which 1 are started
   [1] 2019-06-10 16:34:28.379 INFO  [main] DefaultCamelContext - Apache Camel 
2.23.2 (CamelContext: camel-k) started in 0.396 seconds
   [1] 2019-06-10 16:34:28.595 DEBUG [main] RoutesDumper - Routes: 
   [1] <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   [1] <routes xmlns="http://camel.apache.org/schema/spring";>
   [1]     <route customId="false" id="route1" rest="true">
   [1]         <from uri="rest://post:/api/demo2?routeId=route1"/>
   [1]         <to id="to1" uri="direct:handleRestRequest"/>
   [1]     </route>
   [1] </routes>
   [1] 
   [1] 2019-06-10 16:34:28.731 DEBUG [main] RoutesDumper - Rests: 
   [1] <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   [1] <rests xmlns="http://camel.apache.org/schema/spring";>
   [1]     <rest path="/api/demo2">
   [1]         <post id="verb1" routeId="route1">
   [1]             <to id="to1" uri="direct:handleRestRequest"/>
   [1]         </post>
   [1]     </rest>
   [1] </rests>
   [1] 
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to