apache-camel

How to access Default Idempotent Repository map from java dsl?

一世执手 提交于 2019-12-24 02:54:47
问题 I am newbie to Apache Camel. How can i access Camel Default Idempotent Repository map in Java DSL. Route: from("file://C:/folderA?noop=true") .to("file://C:/folderB") .end(); When i say noop=true in route, then idempotent will be true. Now i need to get Idempotent map in java dsl. Please tell me how to access this? Thanks in advance. 回答1: If you want to access the underlying map, you should specify your own idempotentRepository bean. Using the existing MemoryIdempotentRepository should be

Camel rest URI works with suffix

时间秒杀一切 提交于 2019-12-24 00:59:47
问题 So I have a REST webservice using Camel. it works just fine except that if I call my URI with a suffix I get the same response and not a 404. Rest Configuration: restConfiguration() .component("restlet") .bindingMode(RestBindingMode.json) .dataFormatProperty("prettyPrint", "true") .contextPath(contextPath).host(host).port(port); rest("/ressource") .description("ressource") .consumes("application/json") .produces("application/json") .get().outType(Ressource.class) .to("bean:ressourceImpl

WebSphere Camel JMS, spring, taskExecutor, haninging Threads

試著忘記壹切 提交于 2019-12-24 00:58:41
问题 I'm trying to integrate Camel with WebSphere. It is working fine, for all but one thing. The scenario looks like: JMS (WMQ) -> routing/transformation -> BEAN (which does a JPA (OpenJPA1.2/DB2) commit). To be able to plug into WAS transaction manager and mangaed threads, I'm inserting the work manager as taskExecutor in camel: <!-- Selected parts of the spring config --> <tx:jta-transaction-manager/> <bean id="wasTaskExecutor" class="org.springframework.scheduling.commonj

Camel JPA query parameters not being seen

时光怂恿深爱的人放手 提交于 2019-12-24 00:58:09
问题 I am currently having an issue getting Camel to see my JPA query parameters for the current code. I have tested that the registry can access the parameters in my map, but my jpa endpoint in the pollenrich is saying it cannot locate my parameters. Versions: JBoss Fuse: 6.2.1.redhat-084 Camel: 6.2.1.redhat-084 Hibernate: 4.2.20.Final-redhat-1 Hibernate jpa 2.0 API: 1.0.1.Final Camel Route: from("direct:routeUpdates").routeId("RouteUpdates") .log(LoggingLevel.DEBUG, "${body}") .beanRef(

Webservice having “No such operation: HTTP GET PATH_INFO”

烂漫一生 提交于 2019-12-24 00:57:15
问题 I currently have a SOAP web service and I am trying to access it's endpoint but I keep getting this error: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <soap:Fault> <faultcode>soap:Server</faultcode> <faultstring> No such operation: (HTTP GET PATH_INFO: /camel-example-reportincident/webservices/incident) </faultstring> </soap:Fault> </soap:Body> </soap:Envelope> UNIT TEST package org.apache.camel.example.reportincident; import junit.framework.TestCase;

Camel example can't find org.apache.camel.impl.DefaultComponent

时光毁灭记忆、已成空白 提交于 2019-12-24 00:37:34
问题 I've created a small Apache Camel example, but it can't find the class org.apache.camel.impl.DefaultComponent . Here the full error log. I've looked the class up on search.maven.org, which says it should be contained in org.apache.camel:camel-core . Adding it does not solve my problem. What's wrong in this example? This is the application @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication app = new SpringApplication(Application.class);

How do I convert my BeanInvocation object in camel to a message body and headers?

一个人想着一个人 提交于 2019-12-23 21:09:02
问题 I'm using Camel Proxy to expose an interface as a starting point for a route. It uses a BeanInvocation object as the message body. How do I set the message body and headers based on the arguments passed to the interface? public interface test{ public void sayHi(String firstName, String lastName); } I'd like to make the body (firstName + " " + lastName). I'd also like to know how to set one argument as a header on the message and the other as the body. 回答1: It uses the same bean parameter

org.apache.camel.ExchangeTimedOutException: The OUT message was not received within: 30000 millis

只愿长相守 提交于 2019-12-23 18:31:44
问题 I'm trying to expose a web service using fuse esb + apache camel + seda/activemq and I'm facing to an issue returing a status message to the web service call. here is my simple camel route : <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://camel.apache.org/schema/cxf" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans

Get visual documentation from camel routes in Java?

Deadly 提交于 2019-12-23 16:09:20
问题 I'm new to apache camel and made some routes working properly via Java DSL. Now I'm wondering if there is a chance to get automatic a visual representation of these routes with JBoss Fuse? I mean not by drawing it by hand again, more for automatic documention :-) Edit: Since a downvote seems to be easier than a answer I try to rephrase my question a bit. I'm looking for a possibility to reverse engineer my defined routes (Java) and get a picture with boxes out of it. Hawtoi, what I tried

Camel route using spring-ws client occasionally throws javax.xml.transform.stax.StAXSource exception

南楼画角 提交于 2019-12-23 15:53:47
问题 I have a camel 'seda' route that contains code roughly: JaxbDataFormat jaxb = new JaxbDataFormat(false); jaxb.setContextPath("com.example.data.api"); from("seda:validate") .marshal(jaxb) .to("spring-ws:" + getDataServiceURL()) .unmarshal(jaxb) I send an object from com.example.data.api, the JaxbDataFormat formatter sets it up as a SOAP request and passes it along wo spring-ws to actually send to my service. This works like a charm most of the time. I say "most" because every now and then,