HTTP POST with ProducerTemplate

2016-07-22 Thread wheli
Hello, I am attempting to make an HTTP POST to an endpoint (using "https://httpbin.org/post"; as a test), but am having trouble figuring out how to pull the HTTP response code (200, 404, etc...). I need to use a ProducerTemplate due to some other restrictions in my application. I looked the camel

RE: HTTP POST with ProducerTemplate

2016-07-25 Thread wheli
Ok...how or where would I set the body of the http post in that example? The new Processor could not have context to anything outside its constructor, right? -- View this message in context: http://camel.465427.n5.nabble.com/HTTP-POST-with-ProducerTemplate-tp5785366p5785430.html Sent from the C

RE: HTTP POST with ProducerTemplate

2016-07-25 Thread wheli
Ok. I was able to figure this out. Changed my code to: Exchange response = template.send(endpoint, new HttpOutboundProcessor(exchange.getOut().getBody().toString())); Integer responseCode = (Integer)response.getOut().getHeader(Exchange.HTTP_RESPONSE_CODE); String responseBody = IOUtils.toString((

Elastic Search GET_BY_ID

2017-01-13 Thread wheli
Having some issues getting the GET_BY_ID search working against an elastic search instance (http://camel.apache.org/elasticsearch.html). Not really getting back the response that I would expect... I am using camel 2.16.1 and Spring DSL. The relevant part of my route is: I have tried multiple d

Re: Elastic Search GET_BY_ID

2017-01-13 Thread wheli
Just in case anyone needs it, i was able to grab the json response via the following java: -- View this message in context: http://camel.465427.n5.nabble.com/Elastic-Search-GET-BY-ID-tp5792533p5792535.html Sent from the Camel - Users mailing list archive at Nabble.com.

Apache Camel bean parameter binding issue with Spring DSL

2015-10-02 Thread wheli
I am running into a strange issue with Apache Camel and Spring DSL. Here is an excerpt of my Spring defined route: Everything works fine up until the last line that I posted. The extractDocumentRootOid(Exchange exchange) java method is executed and th

Re: Apache Camel bean parameter binding issue with Spring DSL

2015-10-05 Thread wheli
Sure... public String extractDocumentRootOid(Exchange exchange) throws Exception public Organization getOrganizationByOid(Exchange exchange, String oid) throws InterchangeException (Organization is a custom java object) public String extractStyleSheetAttributeFromOrganization(Exchange exchange,

Re: Apache Camel bean parameter binding issue with Spring DSL

2015-10-05 Thread wheli
I'd rather not be pigeon-holed with the header namemeaning, I'd like to make it so that the creator of any route can name the header whatever they want, and use this method, without having any knowledge of the method parameters (having to go look at the java components). -- View this message

Re: Apache Camel bean parameter binding issue with Spring DSL

2015-10-05 Thread wheli
Ok, thanks Claus. Would you recommend trying 2.15.3 or 2.16? Is 2.15.3 the latest stable? -- View this message in context: http://camel.465427.n5.nabble.com/Apache-Camel-bean-parameter-binding-issue-with-Spring-DSL-tp5772200p5772294.html Sent from the Camel - Users mailing list archive at Nabb

Re: Apache Camel bean parameter binding issue with Spring DSL

2015-10-05 Thread wheli
I upgraded and it made no difference, but then I noticed that I was missing a closing parenthesis on my "transformBodyUsingStyleSheet" method. I fixed this and it resolved the issue. Sorry for not seeing that, but i am all set now. Thanks! -- View this message in context: http://camel.465427.n5

Pulling multiple files in simultaneously

2015-10-23 Thread wheli
I have a file input java DSL defined route. Users are uploading file via SFTP, so I have the readLock values set pretty high (to prevent processing the file before the transfer is complete). from(file:///tmp/input?readLock=changed&readLockTimeout=2&readLockCheckInterval=1)

Spring-ws response when using split/aggregate

2015-11-17 Thread wheli
Hello, I have a Java DSL route that takes a spring-ws request and sends a response. from("spring-ws:rootqname:{urn:foo}barRequest?endpointMapping=#endpointMapping") .beanRef(BeanRef.UTILS, "blah") .beanRef("xdsLogic", "processResponse")