-
Bug
-
Resolution: Won't Do
-
Critical
-
jboss-fuse-6.3
-
%
-
I have created a test using the header CouchDbMethod to delete a register in CouchDb.
I am using an instance of:
org.apache.camel.ProducerTemplate like:
ProducerTemplate producer = context.createProducerTemplate();
and my test is:
...
final Map<String, Object> headers = new HashMap<>();
headers.put("CouchDbMethod", "DELETE");
headers.put("CouchDbId", id);
headers.put("CouchDbRev", rev);
producer.requestBodyAndHeaders("direct:start", user, headers);
...
'user' is an instance of a class:
@Data
public class LoginUser extends Document {
private String username;
private String password;
}
.. and my camel route:
<route id="producer">
<from uri="direct:start"/>
<marshal ref="gson"/>
<convertBodyTo type="java.lang.String"/>
<to uri="couchdb:http://${couchdb.hostname}:${couchdb.port}/example?createDatabase=true"/>
<unmarshal ref="gson"/>
<to uri="mock:mockProducer"/>
</route>
.. but if i use an instance of
import org.lightcouch.CouchDbClient
is working with for example this method:
client.remove(id,rev);
It seems in the first case ignore the CouchDbMethod header so it is translating to a PUT couchdb sentence instead of DELETE sentence.
I am using wireshark to sniff traffic in the http protocol.