kashya...@gmail.com
unread,Mar 10, 2015, 5:52:14 AM3/10/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to camunda-...@googlegroups.com
Hi,
I am trying to complete a task using rest template. below is the code that i am using.
restTemplate = (RestTemplate)this.getApplicationContext().getBean("restTemplate");
messageConverters = new ArrayList<HttpMessageConverter<?>>();
con = new MappingJacksonHttpMessageConverter();
messageConverters.add(con);
restTemplate.setMessageConverters(messageConverters);
JSONObject procVars = new JSONObject().put("variables", userMap);
HttpEntity response = restTemplate.postForObject(url, procVars, HttpEntity.class);
Here JSONObject is camunda json object. userMap is the map in which I am passing all the process variables.
While executing this code I am getting the exception mentioned below:
org.springframework.web.client.RestClientException: Could not write request: no suitable HttpMessageConverter found for request type [org.camunda.bpm.engine.impl.util.json.JSONObject]
Problem is that MappingJacksonHttpMessageConverter converts the data into javax JsonObject but i need it to convert the data in camunda JSONObject.
Is there any converter class that can solve my problem or is there any other way to do this.
Thanks in advance.