Re: camel cxfrs with swagger.

2014-10-22 Thread Matt Raible
17, 2014 at 3:08 PM, Matt Raible m...@raibledesigns.com wrote: Here's how I did it. Application.java (to register Camel's servlet): import org.apache.camel.component.servlet.CamelHttpTransportServlet; import org.springframework.boot.SpringApplication; import

Re: camel cxfrs with swagger.

2014-10-17 Thread Matt Raible
Here's how I did it. Application.java (to register Camel's servlet): import org.apache.camel.component.servlet.CamelHttpTransportServlet; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import

Re: Camel's Swagger vs. Spring MVC Swagger

2014-09-28 Thread Matt Raible
On Fri, Sep 26, 2014 at 1:48 AM, Claus Ibsen claus.ib...@gmail.com wrote: Hi On Thu, Sep 25, 2014 at 11:23 PM, Matt Raible m...@raibledesigns.com wrote: Hey all, I'm starting to develop a new application and I'm researching using Camel's REST DSL vs. Spring Boot and it's REST support

Camel's Swagger vs. Spring MVC Swagger

2014-09-25 Thread Matt Raible
Hey all, I'm starting to develop a new application and I'm researching using Camel's REST DSL vs. Spring Boot and it's REST support. The last application I wrote used Apache Camel + Spring Boot, but I only used the external properties support from Boot. For this new application, I have a

CSV Parsing

2014-09-10 Thread Matt Raible
I have a String that's delimited by ~. This string is returned from a database query. I'm able to parse it with the following code in my route: @Override public void configure() throws Exception { CsvDataFormat csv = new CsvDataFormat(); csv.setDelimiter(~); ...

Re: CSV Parsing

2014-09-10 Thread Matt Raible
); } On Sep 10, 2014, at 5:44 PM, Matt Raible m...@raibledesigns.com wrote: I have a String that's delimited by ~. This string is returned from a database query. I'm able to parse it with the following code in my route: @Override public void configure() throws

apache repository down?

2014-08-25 Thread Matt Raible
Hello all, I've been using Camel 2.14-SNAPSHOT in my project for the last couple months. Last week, and today, it seems that the apache repository has been down. Has anyone else experienced this as well? Downloading:

Re: apache repository down?

2014-08-25 Thread Matt Raible
://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani http://blog.raulkr.net | twitter: @raulvk On Mon, Aug 25, 2014 at 2:42 PM, Matt Raible m...@raibledesigns.com wrote: Hello all, I've been using Camel 2.14-SNAPSHOT in my project for the last couple months. Last week

Re: apache repository down?

2014-08-25 Thread Matt Raible
- Software Integration Specialist Apache Member V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer Apache Incubator PMC Member https://www.linkedin.com/pub/christian-mueller/11/551/642 On Mon, Aug 25, 2014 at 7:05 PM, Matt Raible m...@raibledesigns.com wrote

Re: Running a delete query within a route

2014-08-25 Thread Matt Raible
) // convert CSV output to Member object I think a noop would be useful, but using a processor was an easy (and probably cleaner) workaround in this case. Thanks! Matt On Fri, Aug 22, 2014 at 12:06 AM, Matt Raible m...@raibledesigns.com wrote: I have a route that does a number of things

Running a delete query within a route

2014-08-21 Thread Matt Raible
I have a route that does a number of things: .process(lookupToHeadersProcessor) // 1) converts input parameters to headers .to(bean:myStoredProcedure) // 2) calls a stored procedure, that enters a record in a TEMP table and returns the ID .recipientList(simple(sql:select ret_string from TEMP +

Re: Overriding Properties

2014-08-11 Thread Matt Raible
classes for making this work in Spring Boot: https://github.com/spring-projects/spring-boot/blob/master/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java On Fri, Aug 8, 2014 at 4:15 AM, Matt Raible m...@raibledesigns.com wrote: Hello all

Overriding Properties

2014-08-07 Thread Matt Raible
Hello all, In my Camel app, I recently integrated Spring Boot to use its external configuration feature. Basically, I can put default properties in an src/main/resources/application.properties file. Then I can override them on different servers using various mechanisms, from using a

Load Testing Camel Routes

2014-07-29 Thread Matt Raible
Hello all, I'm getting ready to put a Camel / CXF / Spring Boot application into production. Before I do, I want to load test and verify it has the same throughput as a the IBM Message Broker system it's replacing. Apparently, the old system can only do 6 concurrent connections because of

Convert from Fault to Message

2014-07-25 Thread Matt Raible
Hello, Is it possible to convert from returning a SOAP Fault to a SOAP Message when using the CXF component? I'm developing a new system to replace one written with IBM Message Broker 6.1. When faults occur with IBM, error messages are returned that looked the following: ?xml version=1.0

Re: weaveById - works with 2.13.1, not with 2.14-SNAPSHOT

2014-07-21 Thread Matt Raible
, you are welcome to provide an unit test / sample project / github project or whatever that reproduces the issue. That helps us fix the issue. On Wed, Jul 16, 2014 at 9:11 AM, Matt Raible m...@raibledesigns.com wrote: I believe you. However, it seems it also creates an issue when using

Re: weaveById - works with 2.13.1, not with 2.14-SNAPSHOT

2014-07-21 Thread Matt Raible
, Matt On Jul 21, 2014, at 9:54 AM, Matt Raible m...@raibledesigns.com wrote: If I remove the continue line on 253 in ProcessDefinitionHelper and install locally (with -DskipTests), my test passes. There is a test failure in camel-core after making this change

Re: weaveById - works with 2.13.1, not with 2.14-SNAPSHOT

2014-07-16 Thread Matt Raible
xml dsl to define routes (spring or blueprint) On Tue, Jul 15, 2014 at 8:19 PM, Matt Raible m...@raibledesigns.com wrote: FWIW, all tests pass in camel-core with this change reverted. [INFO] [INFO] BUILD SUCCESS [INFO

Re: weaveById - works with 2.13.1, not with 2.14-SNAPSHOT

2014-07-15 Thread Matt Raible
use-case. On Mon, Jul 14, 2014 at 11:31 PM, Matt Raible m...@raibledesigns.com wrote: Hey all, I have the following route defined with the Java DSL: from(direct:localMemberLookup).routeId(localMemberLookup) .process(new MemberLookupToSqlParametersProcessor()).id(sqlParams

Re: weaveById - works with 2.13.1, not with 2.14-SNAPSHOT

2014-07-15 Thread Matt Raible
...@gmail.com wrote: On Tue, Jul 15, 2014 at 3:56 PM, Matt Raible m...@raibledesigns.com wrote: It tried it with 2.13.2 and it works just fine. Thanks. If its possible for you then you are welcome to .zip an unit test / sample project that has this issue and create a JIRA ticket and attach

Re: weaveById - works with 2.13.1, not with 2.14-SNAPSHOT

2014-07-15 Thread Matt Raible
-07-15T12:18:03-07:00 [INFO] Final Memory: 25M/376M On Tue, Jul 15, 2014 at 11:01 AM, Matt Raible m...@raibledesigns.com wrote: If I revert the following change to AdviceWithTasks.java, it seems to solve this issue: https://github.com/apache/camel/commit

weaveById - works with 2.13.1, not with 2.14-SNAPSHOT

2014-07-14 Thread Matt Raible
Hey all, I have the following route defined with the Java DSL: from(direct:localMemberLookup).routeId(localMemberLookup) .process(new MemberLookupToSqlParametersProcessor()).id(sqlParams) .recipientList(simple(sql:{{sql.memberLookup}})).delimiter(false) .to(log:output)

Choice DSL when checking for existence of a header

2014-07-01 Thread Matt Raible
I'm trying to do the following with a the Java DSL in a route: .choice() .when(header(maxRows).isNotNull()) .recipientList(simple(sql:{{sql.claimLookupWithMaxRows}})).delimiter(false) .otherwise()

Re: Mocking SQL results in a route

2014-06-19 Thread Matt Raible
://camel.apache.org/advicewith.html On Thu, Jun 12, 2014 at 6:48 PM, Matt Raible m...@raibledesigns.com wrote: On Jun 12, 2014, at 10:14 AM, Matt Raible m...@raibledesigns.com wrote: OK, I got that to work by using @UseAdviceWith. Here's my @Before method that sets everything up and returns SQL

Re: Mocking SQL results in a route

2014-06-12 Thread Matt Raible
a setter on the camel context. On 12/06/2014, at 9:58 AM, Matt Raible m...@raibledesigns.com wrote: Nope, my routes are defined using the Java DSL, not XML. Changing from: @ContextConfiguration(classes = CamelConfig.class) To: @ContextConfiguration(loader

Re: Mocking SQL results in a route

2014-06-12 Thread Matt Raible
endpoint is dynamic calculated then its easier to use interceptSendToEndpoint and skip, as shown in the book on page 182 with the advice with. On Thu, Jun 12, 2014 at 1:58 AM, Matt Raible m...@raibledesigns.com wrote: Nope, my routes are defined using the Java DSL, not XML. Changing from

Re: Mocking SQL results in a route

2014-06-12 Thread Matt Raible
at 4:30 PM, Matt Raible m...@raibledesigns.com wrote: Is it possible to use adviceWith when using Spring/Camel's annotation support? I was originally trying to use this method, but had to extend CamelTestSupport and its context did not have my routes in it. On Jun 11, 2014, at 11:39 PM, Claus

Re: Mocking SQL results in a route

2014-06-12 Thread Matt Raible
interceptSendToEndpoint and skip, as shown in the book on page 182 with the advice with. On Thu, Jun 12, 2014 at 4:47 PM, Matt Raible m...@raibledesigns.com wrote: Possibly. If I have the following annotations on my class: @MockEndpoints(sql:.*) @UseAdviceWith And I mock the SQL endpoint

Re: Mocking SQL results in a route

2014-06-12 Thread Matt Raible
On Jun 12, 2014, at 10:14 AM, Matt Raible m...@raibledesigns.com wrote: OK, I got that to work by using @UseAdviceWith. Here's my @Before method that sets everything up and returns SQL results: static ListMap results = new ArrayListMap() {{ add(new HashMapString

Mocking SQL results in a route

2014-06-11 Thread Matt Raible
Hello, I have a route that looks as follows: from(uri) .to(log:input) .recipientList(simple(direct:${header.operationName})); from(direct:lookup) .process(new

Re: Mocking SQL results in a route

2014-06-11 Thread Matt Raible
:16 PM, Claus Ibsen claus.ib...@gmail.com wrote: Hi Yeah if you have Camel in Action book, read chapter 6. And see bottom of this page http://camel.apache.org/testing The advice builder is quite nifty and can rework the routes before testing. On Wed, Jun 11, 2014 at 8:10 PM, Matt

Re: Mocking SQL results in a route

2014-06-11 Thread Matt Raible
anything pass the ? in your uri. This wasn't obvious to me. And again camel won't warn you if you get this wrong. @DirtiesContext is a must otherwise you get strange behaviour once one test starts failing. Hope that helps. On 12/06/2014, at 8:27 AM, Matt Raible m...@raibledesigns.com wrote

Re: Mocking SQL results in a route

2014-06-11 Thread Matt Raible
different things in regex. On 12/06/2014, at 9:32 AM, Matt Raible m...@raibledesigns.com wrote: Thanks for your advice. Here's my attempt to modify my test to use CamelSpringJUnit4ClassRunner and annotations to mock my SQL endpoint. @RunWith(CamelSpringJUnit4ClassRunner.class

Re: Dynamic DataSource for SQL

2014-06-09 Thread Matt Raible
*/) .setHeader(target, simple(sql:select * from projects order by id?dataSource=${property.ds}) .recipientList(header(target)) .to(/* what you would do next after the SQL request */) Antoine. [1] http://camel.apache.org/recipient-list.html 2014-06-07 0:08 GMT+02:00 Matt Raible m

Re: Dynamic DataSource for SQL

2014-06-09 Thread Matt Raible
://camel.apache.org/how-do-i-configure-endpoints.html Its only the SQL component that has that special :#key for the SQL placeholders (eg with a colon). On Mon, Jun 9, 2014 at 7:34 PM, Matt Raible m...@raibledesigns.com wrote: Thanks for the advice. I've tried to implement this. Here's what my code looks

Re: Dynamic DataSource for SQL

2014-06-09 Thread Matt Raible
On Jun 9, 2014, at 1:03 PM, Claus Ibsen claus.ib...@gmail.com wrote: On Mon, Jun 9, 2014 at 8:50 PM, Matt Raible m...@raibledesigns.com wrote: I'm not sure that's it. It's almost like the SQL Component doesn't like column names specified in the SQL. I tried changing it to SELECT * FROM

Dynamic DataSource for SQL

2014-06-06 Thread Matt Raible
Hello, I'm converting services written with IBM Message Broker 6.1 to Apache Camel. Here's some of the logic I'm trying to convert: SET Environment.Variables.dataSource = ''; CASE UPPER(InputRoot.XMLNSC.ns:memberLookupRequest.ns:args0.ax21:Client) WHEN 'client1' THEN SET

Re: Making a CXF Endpoint backwards compatible

2014-05-27 Thread Matt Raible
) at org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:74) Do I have to register a type converter or something to help put the response body in a SOAP envelop? Thanks, Matt On May 23, 2014, at 9:04 AM, Matt Raible m...@raibledesigns.com wrote: Hey all, I have a route that produces a CXF Endpoint. public

Re: Making a CXF Endpoint backwards compatible

2014-05-27 Thread Matt Raible
response as close to the old one as possible. Using http://www.charlesproxy.com/ was the biggest help - as it let me see the response was in a soap envelop. Cheers, Matt On May 27, 2014, at 1:59 PM, Matt Raible m...@raibledesigns.com wrote: I've made good progress on getting this to work

Re: Email Error on Route Exception

2014-05-23 Thread Matt Raible
/camel/blob/master/components/camel-freemarker/src/test/resources/org/apache/camel/component/freemarker/BodyAsDomainObject.ftl#L19 ). Have you try this syntax -- ${headers.operationName} ? Regards, Charles On Thu, May 22, 2014 at 10:12 PM, Matt Raible m...@raibledesigns.comwrote: I

Re: Email Error on Route Exception

2014-05-23 Thread Matt Raible
(subject, simple(Message Broker Error ${exception.getClassName()})) On Fri, May 23, 2014 at 3:45 PM, Matt Raible m...@raibledesigns.com wrote: I was able to figure out how to set headers and retrieve those variables in the FreeMarker template. However, I'm still unable to access them

Making a CXF Endpoint backwards compatible

2014-05-23 Thread Matt Raible
Hey all, I have a route that produces a CXF Endpoint. public class FooRoute extends RouteBuilder { private String uri = cxf:/foo?serviceClass= + FooService.class.getName(); @Override public void configure() throws Exception { from(uri)

Email Error on Route Exception

2014-05-22 Thread Matt Raible
Hello all, I'm getting up to speed on Apache Camel and trying to replace a message flow that was originally written for IBM Message Broker 6.1. The flow involves receiving input from a SOAP service, looking up a value in a database, and returning that to the client (again, via SOAP). I have a

Re: Email Error on Route Exception

2014-05-22 Thread Matt Raible
in the email as well, so I'd be interested in knowing how to include those in the FreeMarker template too. Thanks, Matt On May 22, 2014, at 9:41 AM, Matt Raible m...@raibledesigns.com wrote: Hello all, I'm getting up to speed on Apache Camel and trying to replace a message flow