Issue in reading documents from couchbase using camel-couchbase

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Issue in reading documents from couchbase using camel-couchbase

gmeka
Hi,

I'm trying to read documents from Couchbase datastore. But for some reason I always get empty response.
My route definition looks like this

from("direct:getBeerSample")
.to("couchbase:http://localhost/beer-sample?designDocumentName=beer&viewName=brewery_beers&limit=10&operation=GET");

Do you see anything wrong here.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Issue in reading documents from couchbase using camel-couchbase

cemmersb
Hi,

as far as I can see it at a glance, the URI seems to be fine.

Can you post a little more detail about the database as well as e.g. a unit test to reconstruct the issue?

Best,

Christoph

On 21 Jul 2014, at 00:14, gmeka [via camel-extra] <[hidden email]> wrote:

Hi,

I'm trying to read documents from Couchbase datastore. But for some reason I always get empty response.
My route definition looks like this

from("direct:getBeerSample")
.to("couchbase:http://localhost/beer-sample?designDocumentName=beer&viewName=brewery_beers&limit=10&operation=GET");

Do you see anything wrong here.


If you reply to this email, your message will be added to the discussion below:
http://camel-extra.1091541.n5.nabble.com/Issue-in-reading-documents-from-couchbase-using-camel-couchbase-tp346.html
To start a new topic under camel-extra, email [hidden email]
To unsubscribe from camel-extra, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Issue in reading documents from couchbase using camel-couchbase

ugolandini
In reply to this post by gmeka
gmeka wrote
Hi,

I'm trying to read documents from Couchbase datastore. But for some reason I always get empty response.
My route definition looks like this

from("direct:getBeerSample")
.to("couchbase:http://localhost/beer-sample?designDocumentName=beer&viewName=brewery_beers&limit=10&operation=GET");

Do you see anything wrong here.
Yep,
Looks like you are using  a GET without setting properly the header (the id he wants to GET), so it should probably be something like:

from("direct:getBeerSample")
    .setHeader(CouchbaseConstants.HEADER_ID, constant("123456"))
    .to("couchbase:http://localhost/default?operation='GET'")
Loading...