camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sipapptesting <sipapptest...@gmail.com>
Subject Call third party restful web-service using jboss fuse camel
Date Wed, 11 Jan 2017 23:54:42 GMT
Please find below context.xml details:
 
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="         http://camel.apache.org/schema/spring         
http://camel.apache.org/schema/spring/camel-spring.xsd        
http://www.springframework.org/schema/beans         
http://www.springframework.org/schema/beans/spring-beans.xsd        
http://www.springframework.org/schema/context         
http://www.springframework.org/schema/context/spring-context.xsd">
 
  <camelContext id="amq-example-context"
xmlns="http://camel.apache.org/schema/spring"
  xmlns:order="http://com.mycompany/examples/order">
  <restConfiguration bindingMode="auto" component="restlet"
  port="443" />
 
  <route id="file-to-jms-route">
  
  
  <from id="_from1" uri="direct:status" />
  <to id="_to2"
 
uri="restlet:https://sample-rest-service.com:443/api/v15.0/objects/user/427?exchangePattern=InOut&restletMethod=POST&restletRealm=Authorization"
/>
  <to id="_to1" uri="file:C:\workspace\jbdevstudio\restfuloutput" />
  </route>
  </camelContext>
</beans>
 
Adding image of my folder structure and its contents to have more idea how i
have done it:
<http://camel.465427.n5.nabble.com/file/n5792429/example.jpg> 
 
After deploying the bundle using osgi:install i am getting below exception:
 
JBossFuse:karaf@root> Exception in thread "SpringOsgiExtenderThread-4"
org.apache.camel.RuntimeCamelException:
org.apache.camel.FailedToCreateRouteException: Failed
to create route file-to-jms-route at: >>>
To[restlet:https://sample-rest-service.com:443/api/v15.0/objects/user/427?exchangePattern=InOut&restletMethod=POST&restletR
ealm=Authorization] <<< in route:
Route(file-to-jms-route)[[From[direct:status]] -> [To[restle... because of
Failed to resolve endpoint: restlet://https://sample-res
t-service.com:443/api/v15.0/objects/user/427?exchangePattern=InOut&restletMethod=POST&restletRealm=Authorization
due to: No component found with scheme: restlet
        at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1690)
        at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:138)
        at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:340)
        at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
        at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
        at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:954)
        at
org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)
        at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)
        at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
        at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:32
0)
        at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplica
tionContextExecutor.java:132)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create
route file-to-jms-route at: >>>
To[restlet:https://sample-rest-service.com:443/api/v15.0/o
bjects/user/427?exchangePattern=InOut&restletMethod=POST&restletRealm=Authorization]
<<< in route: Route(file-to-jms-route)[[From[direct:status]] ->
[To[restle... be
cause of Failed to resolve endpoint:
restlet://https://sample-rest-service.com:443/api/v15.0/objects/user/427?exchangePattern=InOut&restletMethod=POST&restletRealm=A
uthorization due to: No component found with scheme: restlet
        at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1072)
        at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:196)
        at
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:974)
        at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:3301)
        at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3024)
        at
org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:175)
        at
org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2854)
        at
org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2850)
        at
org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2873)
        at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2850)
        at
org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
        at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2819)
        at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:275)
        at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:136)
        ... 10 more
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint:
restlet://https://sample-rest-service.com:443/api/v15.0/objects/user/427?exch
angePattern=InOut&restletMethod=POST&restletRealm=Authorization due to: No
component found with scheme: restlet
        at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:594)
        at
org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:79)
        at
org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:211)
        at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:107)
        at
org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113)
        at
org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:62)
        at
org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:56)
        at
org.apache.camel.model.ProcessorDefinition.makeProcessorImpl(ProcessorDefinition.java:534)
        at
org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:495)
        at
org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:219)
        at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:1069)
        ... 23 more



--
View this message in context: http://camel.465427.n5.nabble.com/Call-third-party-restful-web-service-using-jboss-fuse-camel-tp5792429.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message