Camel 2.14-SNAPSHOT - Is interceptFrom() broken for the Rest dsl?

2014-09-15 Thread panzerhans
I am struggelig to get interceptFrom() working for the rest-DSL. My project only has one Rest DSL route. If I add interceptFrom().stop() in the beginning of a my RouteDefinition file, no stop of that route occurs. In addition, if I add the interceptFrom().stop() after my rest dsl route is defined

Re: Camel 2.14-SNAPSHOT - Is interceptFrom() broken for the Rest dsl?

2014-09-15 Thread panzerhans
Here is a snippet of the code: @Component @DependsOn("camelConfig") public class IncomingRestCalls extends RouteBuilder { interceptFrom().id("Logging interceptor").bean(NISAccessLog.class); restConfiguration()..; rest(NISConfig.API_VERSION_1 + "/holdings").description("Holdin

Query paramteres in the REST DSL - Camel 2.14

2014-10-17 Thread panzerhans
I am unable to figure out how to expose Query params to a Rest resource exposed with the new Rest DSL in Camel 2.14 How would I go about to enable something like 'username' and 'password' via query params? rest("/user").description("User services") .get("/login").description("Login us

Re: Query paramteres in the REST DSL - Camel 2.14

2014-10-17 Thread panzerhans
Thank you for your answer. If this is how the Rest DSL enables it, how is it then possible to tell E.G. the new Swagger component that we are supporting the two parameters? -- View this message in context: http://camel.465427.n5.nabble.com/Query-paramteres-in-the-REST-DSL-Camel-2-14-tp575765

Re: Camel 2.14-SNAPSHOT - Is interceptFrom() broken for the Rest dsl?

2014-10-20 Thread panzerhans
It will not be possible to intercept a pure RESTdsl route until it has been implemented in the camel-core. However I was able to work around it by piping it into a normal route like this: rest("/holdings").description("Holdings service") .consumes("application/json").produces("applicatio

Re: Query paramteres in the REST DSL - Camel 2.14

2014-10-20 Thread panzerhans
I will, and have: https://issues.apache.org/jira/browse/CAMEL-7936 Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/Query-paramteres-in-the-REST-DSL-Camel-2-14-tp5757650p5757831.html Sent from the Camel - Users mailing list archive at Nabble.com.

Private variables not being inspected camel-swagger

2014-10-21 Thread panzerhans
I I expose this class: @ApiModel(value = "MyDTO ", description = "My data transporter") public class MyDTO { @ApiModelProperty(value = "This is a private field") private String myPrivateField; } Swagger will not document the class as JSON. I am unsure if this is happening in camel-core, o

Re: Private variables not being inspected camel-swagger

2014-10-21 Thread panzerhans
NB, this is happening in camel-swagger 2.14.0 -- View this message in context: http://camel.465427.n5.nabble.com/Private-variables-not-being-inspected-camel-swagger-tp5757833p5757834.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Private variables not being inspected camel-swagger

2014-10-21 Thread panzerhans
I haven't tried going through CXF. We are trying to be consistent in the route definitions, and the REST DSL is extremely clean and nice in that regards (however still lacking a few features - such as interceptors and query paramteres). -- View this message in context: http://camel.465427.n5.n

REST marshal gson with custom Exclustion Strategy

2014-10-23 Thread panzerhans
I am struggling to wrap my head around how to create a Gson ExclusionStrategy that depends on a value in the Message object from the Exchange (this is stored in a Header). I am registering restConfiguration().setJsonDataFormat("json-gson") in my route definition (so Google Gson is being used for m

Re: REST marshal gson with custom Exclustion Strategy

2014-10-24 Thread panzerhans
I am going to answer this one myself. As it is you cannot use content from the Exchange message to manipulate the Gson marshalling. At least not using the built in GsonDataFormat. You need to roll your own dataformat and use that. I guess that is fair enough :) -- View this message in context:

Rest DSL - OutType in case of error message problem

2014-12-01 Thread panzerhans
I have a setup with Swagger and the Rest DSL. Swagger uses the OutType(MyType.class) to annotate the API with the return type. However, there are times when I wish to return something else to the caller, e.g. an error message with a HTTP response code. Take the following Route as an example: Rest

Which strategy should I use Rest + Email

2012-12-19 Thread panzerhans
I am unsure which approach I should take in order to express the following route as a Java DSL. This is part of a password reset function with an email being sent out. 1. Consume a client rest call from the web via a rest URL 2. Do the reset stuff in the database 2a. Return OK to the Rest cal

Websphere 6.1.0.45: Unable to return data from a camel-cxf component (POJO mode)

2013-01-23 Thread panzerhans
I have created a CXF webservice and exposed it with camel. The webservice is code first (JSR-181) annotated Java class, springed up in my application context. The class looks like this: @WebService(name="DataExport", serviceName="DataExport", targetNamespace="com.somecompany.dataexport.v1") publi

Re: Websphere 6.1.0.45: Unable to return data from a camel-cxf component (POJO mode)

2013-01-23 Thread panzerhans
NB: Camel version: 2.6.0 (latest possible on Websphere 6.1). -- View this message in context: http://camel.465427.n5.nabble.com/Websphere-6-1-0-45-Unable-to-return-data-from-a-camel-cxf-component-POJO-mode-tp5726083p5726084.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Websphere 6.1.0.45: Unable to return data from a camel-cxf component (POJO mode)

2013-01-24 Thread panzerhans
Thank you for your reply. For the WSDL: Yes, return type is correct. I have tried both staying away from putting anything into the exchange.out and instead manipulating the in body. This ended with a NPE: 2013-01-24 14:45:33,003 WARN WebContainer : 0 |cxf.phase.PhaseInt

Re: Websphere 6.1.0.45: Unable to return data from a camel-cxf component (POJO mode)

2013-01-24 Thread panzerhans
No change when wrapping the string inside an object. I have two other contract first webservices. Those does not display the above behaviour. So I am going to pick up the WSDL file and rewrite the spring wiring. -- View this message in context: http://camel.465427.n5.nabble.com/Websphere-6-1-0

Re: Websphere 6.1.0.45: Unable to return data from a camel-cxf component (POJO mode)

2013-02-05 Thread panzerhans
I've been able to work a bit more on this topic. Here is what is happening. The exchange headers used in the Camel part propagates into HTTP headers. I wasen't aware of this. Websphere is very strict about the content of the headers and a data object that I was using carried an illegal sequence i

Re: Websphere 6.1.0.45: Unable to return data from a camel-cxf component (POJO mode)

2013-02-05 Thread panzerhans
Yes, I removed the header, and that works fine. However carrying all exchange headers over to HTTP headers makes it very difficult to carry over "route payload" if the CXF endpoint was not the last endpoint. However, I am getting the feeling it is not going to be easily possible to respond back t

Camel-cxf jax-ws POJO and response

2012-06-25 Thread panzerhans
I have a compound problem that i am unsure if has arisen due to lack of architectural understanding. I have a route that consumes a POJO call from a contract first Webservice. This message is a XML that is split up into pieces and consumed individually (as JMS messages). In the process of calling

Re: Camel-cxf jax-ws POJO and response

2012-06-25 Thread panzerhans
I think I have found the answer. For 1: Tell Camel that the message that replies back to the originator is the "ConvertImportFileWSToImportJob" by adding the .inOnly() flag later in the route. Now the exchange.out.body will be sent back to the caller of the Webservice. from("cxf:bean:import-webs

Camel split aggregate over JMS - how determine if any exception occured

2012-06-27 Thread panzerhans
Is it possible to discover if aJMS message processing threw an exception when you aggregate after a split (that splits to JMS)? I have tried using an aggregator that runs on completionSize (that I set prior to splitting). All messages sent to the JMSqueue show up, but no indication of exceptions t