Re: can not locate rest api

2018-05-29 Thread Alex Dettinger
Hi Ranabroto,

  Last time I hit a similar issue, I ended up with something like "
http://localhost:8084/camel/test";.
Also, if you are deploying in minishift, you would need to force address
resolution, example at
https://github.com/aldettinger/validator-service#how-could-i-invoke-the-validator-service-on-minishift-
.

Hope this help,
Alex

On Mon, May 28, 2018 at 1:47 PM, Ranabroto Ghosh <
ranabroto.gh...@globalcharge.com> wrote:

> My rest route if requires
>
> http://camel.apache.org/schema/spring";>
> 
> 
> 
> 
> 
> 
>
> On 28 May 2018 at 12:43, Ranabroto Ghosh  >
> wrote:
>
> > Hi I am using springboot with Camel, my routes are getting started
> > correctly but ca not trigger rest apis as i ca not locate them.
> >
> > *pom.xml *
> > 
> > http://maven.apache.org/POM/4.0.0"; xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance";
> > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > http://maven.apache.org/xsd/maven-4.0.0.xsd";>
> > 4.0.0
> > com.camel
> > spring-camel
> > 0.0.1-SNAPSHOT
> > jar
> >
> > spring-camel
> > Demo project for Spring Boot
> > 
> > UTF-8
> > UTF-8 reporting.outputEncoding>
> > 1.8
> > 2.21.0
> > 
> >
> > 
> > 
> > org.apache.camel
> > camel-spring-boot-starter
> > ${camel.version}
> > 
> > 
> > org.apache.camel
> > camel-restlet
> > ${camel.version}
> > 
> > 
> >
> > 
> > 
> > 
> > org.springframework.boot
> > spring-boot-maven-plugin
> > 
> > 
> > 
> > 
> >
> >
> > *application.xml*
> > camel.springboot.xmlRoutes = true
> > camel.springboot.xmlRoutes = classpath:xml-route/*.xml
> > camel.springboot.main-run-controller=true
> > camel.springboot.xmlRests = true
> > camel.springboot.xmlRests = classpath:xml-rest/*.xml
> > server.port = 8084
> > spring.application.name = spring-camel
> >
> > *Springboot Main class:*
> >
> > @SpringBootApplication
> > @EnableAutoConfiguration
> > public class SpringCamelApplication {
> >
> > public static void main(String[] args) {
> > SpringApplication.run(SpringCamelApplication.class, args);
> > }
> > }
> >
> >
> > *LOG after application started:*
> >
> > 2018-05-28 12:34:46.178  INFO 4852 --- [   main]
> o.a.camel.spring.SpringCamelContext
> > : 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
> > 2018-05-28 12:34:46.211  INFO 4852 --- [   main]
> > o.a.camel.component.file.FileEndpoint: Endpoint is configured with
> > noop=true so forcing endpoint to be idempotent as well
> > 2018-05-28 12:34:46.211  INFO 4852 --- [   main]
> > o.a.camel.component.file.FileEndpoint: Using default memory based
> > idempotent repository with cache max size: 1000
> > 2018-05-28 12:34:46.357  INFO 4852 --- [   main]
> > o.a.camel.spring.boot.RoutesCollector: Starting
> > CamelMainRunController to ensure the main thread keeps running
> > 2018-05-28 12:34:46.361  INFO 4852 --- [   main]
> o.a.camel.spring.SpringCamelContext
> > : Route: first-route started and consuming from: direct://test
> > 2018-05-28 12:34:46.374  INFO 4852 --- [   main]
> o.a.camel.spring.SpringCamelContext
> > : Route: second-route started and consuming from:
> > file://E://inputFolder?noop=true
> > 2018-05-28 12:34:46.384  INFO 4852 --- [   main]
> o.a.camel.spring.SpringCamelContext
> > : Route: route1 started and consuming from: restlet:///test?
> > restletMethods=GET
> > 2018-05-28 12:34:46.385  INFO 4852 --- [   main]
> o.a.camel.spring.SpringCamelContext
> > : Total 3 routes, of which 3 are started
> > 2018-05-28 12:34:46.388  INFO 4852 --- [   main]
> o.a.camel.spring.SpringCamelContext
> > : Apache Camel 2.21.0 (CamelContext: camel-1) started in 0.471
> seconds
> > 2018-05-28 12:34:46.395  INFO 4852 --- [   main] c.c.springcamel.
> SpringCamelApplication
> >  : Started SpringCamelApplication in 3.543 seconds (JVM running for
> 3.878)
> > 2018-05-28 12:34:47.389  INFO 4852 --- [E://inputFolder] second-route
> >: ROUTE STARTED
> >
> >
> >
> > So clearly it says ' route1 started and consuming from: restlet:///test?
> restletMethods=GET'
> > but when i call http:localhost:8084/test its says unreachable.
> >
> >
> > Badly need help, thanks in advance.
> > --
> > Kind Regards
> > Rana
> >
>
>
>
> --
> Kind Regards
> Rana
>


Re: can not locate rest api

2018-05-28 Thread Ranabroto Ghosh
My rest route if requires

http://camel.apache.org/schema/spring";>







On 28 May 2018 at 12:43, Ranabroto Ghosh 
wrote:

> Hi I am using springboot with Camel, my routes are getting started
> correctly but ca not trigger rest apis as i ca not locate them.
>
> *pom.xml *
> 
> http://maven.apache.org/POM/4.0.0"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
> 4.0.0
> com.camel
> spring-camel
> 0.0.1-SNAPSHOT
> jar
>
> spring-camel
> Demo project for Spring Boot
> 
> UTF-8
> UTF-8
> 1.8
> 2.21.0
> 
>
> 
> 
> org.apache.camel
> camel-spring-boot-starter
> ${camel.version}
> 
> 
> org.apache.camel
> camel-restlet
> ${camel.version}
> 
> 
>
> 
> 
> 
> org.springframework.boot
> spring-boot-maven-plugin
> 
> 
> 
> 
>
>
> *application.xml*
> camel.springboot.xmlRoutes = true
> camel.springboot.xmlRoutes = classpath:xml-route/*.xml
> camel.springboot.main-run-controller=true
> camel.springboot.xmlRests = true
> camel.springboot.xmlRests = classpath:xml-rest/*.xml
> server.port = 8084
> spring.application.name = spring-camel
>
> *Springboot Main class:*
>
> @SpringBootApplication
> @EnableAutoConfiguration
> public class SpringCamelApplication {
>
> public static void main(String[] args) {
> SpringApplication.run(SpringCamelApplication.class, args);
> }
> }
>
>
> *LOG after application started:*
>
> 2018-05-28 12:34:46.178  INFO 4852 --- [   main] 
> o.a.camel.spring.SpringCamelContext
> : 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
> 2018-05-28 12:34:46.211  INFO 4852 --- [   main]
> o.a.camel.component.file.FileEndpoint: Endpoint is configured with
> noop=true so forcing endpoint to be idempotent as well
> 2018-05-28 12:34:46.211  INFO 4852 --- [   main]
> o.a.camel.component.file.FileEndpoint: Using default memory based
> idempotent repository with cache max size: 1000
> 2018-05-28 12:34:46.357  INFO 4852 --- [   main]
> o.a.camel.spring.boot.RoutesCollector: Starting
> CamelMainRunController to ensure the main thread keeps running
> 2018-05-28 12:34:46.361  INFO 4852 --- [   main] 
> o.a.camel.spring.SpringCamelContext
> : Route: first-route started and consuming from: direct://test
> 2018-05-28 12:34:46.374  INFO 4852 --- [   main] 
> o.a.camel.spring.SpringCamelContext
> : Route: second-route started and consuming from:
> file://E://inputFolder?noop=true
> 2018-05-28 12:34:46.384  INFO 4852 --- [   main] 
> o.a.camel.spring.SpringCamelContext
> : Route: route1 started and consuming from: restlet:///test?
> restletMethods=GET
> 2018-05-28 12:34:46.385  INFO 4852 --- [   main] 
> o.a.camel.spring.SpringCamelContext
> : Total 3 routes, of which 3 are started
> 2018-05-28 12:34:46.388  INFO 4852 --- [   main] 
> o.a.camel.spring.SpringCamelContext
> : Apache Camel 2.21.0 (CamelContext: camel-1) started in 0.471 seconds
> 2018-05-28 12:34:46.395  INFO 4852 --- [   main] 
> c.c.springcamel.SpringCamelApplication
>  : Started SpringCamelApplication in 3.543 seconds (JVM running for 3.878)
> 2018-05-28 12:34:47.389  INFO 4852 --- [E://inputFolder] second-route
>: ROUTE STARTED
>
>
>
> So clearly it says ' route1 started and consuming from: 
> restlet:///test?restletMethods=GET'
> but when i call http:localhost:8084/test its says unreachable.
>
>
> Badly need help, thanks in advance.
> --
> Kind Regards
> Rana
>



-- 
Kind Regards
Rana


can not locate rest api

2018-05-28 Thread Ranabroto Ghosh
Hi I am using springboot with Camel, my routes are getting started
correctly but ca not trigger rest apis as i ca not locate them.

*pom.xml *

http://maven.apache.org/POM/4.0.0"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
4.0.0
com.camel
spring-camel
0.0.1-SNAPSHOT
jar

spring-camel
Demo project for Spring Boot

UTF-8
UTF-8
1.8
2.21.0




org.apache.camel
camel-spring-boot-starter
${camel.version}


org.apache.camel
camel-restlet
${camel.version}






org.springframework.boot
spring-boot-maven-plugin






*application.xml*
camel.springboot.xmlRoutes = true
camel.springboot.xmlRoutes = classpath:xml-route/*.xml
camel.springboot.main-run-controller=true
camel.springboot.xmlRests = true
camel.springboot.xmlRests = classpath:xml-rest/*.xml
server.port = 8084
spring.application.name = spring-camel

*Springboot Main class:*

@SpringBootApplication
@EnableAutoConfiguration
public class SpringCamelApplication {

public static void main(String[] args) {
SpringApplication.run(SpringCamelApplication.class, args);
}
}


*LOG after application started:*

2018-05-28 12:34:46.178  INFO 4852 --- [   main]
o.a.camel.spring.SpringCamelContext  : 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
2018-05-28 12:34:46.211  INFO 4852 --- [   main]
o.a.camel.component.file.FileEndpoint: Endpoint is configured with
noop=true so forcing endpoint to be idempotent as well
2018-05-28 12:34:46.211  INFO 4852 --- [   main]
o.a.camel.component.file.FileEndpoint: Using default memory based
idempotent repository with cache max size: 1000
2018-05-28 12:34:46.357  INFO 4852 --- [   main]
o.a.camel.spring.boot.RoutesCollector: Starting CamelMainRunController
to ensure the main thread keeps running
2018-05-28 12:34:46.361  INFO 4852 --- [   main]
o.a.camel.spring.SpringCamelContext  : Route: first-route started and
consuming from: direct://test
2018-05-28 12:34:46.374  INFO 4852 --- [   main]
o.a.camel.spring.SpringCamelContext  : Route: second-route started and
consuming from: file://E://inputFolder?noop=true
2018-05-28 12:34:46.384  INFO 4852 --- [   main]
o.a.camel.spring.SpringCamelContext  : Route: route1 started and
consuming from: restlet:///test?restletMethods=GET
2018-05-28 12:34:46.385  INFO 4852 --- [   main]
o.a.camel.spring.SpringCamelContext  : Total 3 routes, of which 3 are
started
2018-05-28 12:34:46.388  INFO 4852 --- [   main]
o.a.camel.spring.SpringCamelContext  : Apache Camel 2.21.0
(CamelContext: camel-1) started in 0.471 seconds
2018-05-28 12:34:46.395  INFO 4852 --- [   main]
c.c.springcamel.SpringCamelApplication   : Started SpringCamelApplication
in 3.543 seconds (JVM running for 3.878)
2018-05-28 12:34:47.389  INFO 4852 --- [E://inputFolder] second-route
   : ROUTE STARTED



So clearly it says ' route1 started and consuming from:
restlet:///test?restletMethods=GET' but when i call
http:localhost:8084/test its says unreachable.


Badly need help, thanks in advance.
-- 
Kind Regards
Rana