Thanks for the reply. I should add that i'm using spring on camel 2.14 with
the regular http component.
here is the stacktrace, I hit the service with telnet, and it returned no
headers, so I am assuming that is the issue here. Furthermore, the service
that does have headers works fine. the header
Hello all,
I have a route which GETs JSON from an external HTTP service. Some of the
servers do not respond with any headers, resulting in
httpclient.clientProtocolException. what is the best way to have the route
assume a response header like the following?
HTTP/1.1 200 OK
Content-Type: applicati
Hello,
What is the best way to index an entire JSON file? Say i have a file called
"widgets.json" with structure
{"widgets": {
{"name":"foo","properties":{"status":"green", "type": "fooWidget"}},
{"name": "ayy", "properties":{"status":"lmao"}}
}
}
I am currently using a splitter, but the actua
Hello,
I had a similar situation. From my google-fu, it seems like Unmarshalling
with jackson is your best bet. The 'nesting' is a bit of a curveball. I
found explicitly binding the POJO is the easiest for uniform keys- I think
your POJO structure should look something like
public class myJson{
@
Hello,
I'm using Spring to make a route, and I've written a Jackson-annotated
transformation bean with a method which takes a JSON String, uses Jackson to
unmarshal it into a POJO, reorders it, and marshals it to a re-ordered
String. I get how to define DataFormats, beans and the like, but 1) wh
Hi,
Sorry for going AWOL for a while... anyways, I'm in the process of doing
essentially what Mark suggested. I ended up splitting the large file, using
Jackson and JAXB to unmarshal the entries into a TreeMap, translating the
TreeMap into my own defined POJO, and marshaling back into JSON. Another
Hello,
I am building a camel route and I am looking to manipulate an inputStream
formatted as JSON into a different "hierarchy".
The endgame is to turn the service's response
{"foo":
{"bar":{"type": "motor","status":"spinning"}},
{"baz":{"type": "calculator","status":"crunching"}}
}
Hi Yogesh,
Thanks for the advice. The enclosure didn't function correctly, however I
solved the problem on a suggestion from Claus to use groovy instead.
My working code is
request.body.substring(10, request.body.length()-[n])
I also needed to add the camel-script and camel-groovy dependencies
Hello,
I have a route in Spring that has been converted to a string. I only want
the 8th character to 3rd from the end, so I tried to transform based on
indices. Here is what I've tried.
${body.substring(8,${body.length}-1)}
the message is 10989 characters long, so it tries to cas