So, I'm a real java beginner.. I'm doing an application with lot of work and researching...
The thing is. I need to post some information with multipart/form-data... I used to do it with Json HashMap. But don't know which object to use instead... Here is my actioncontroller post:
HashMap<String, ContentDTO> cnt = new HashMap<String, ContentDTO>(); ContentDTO contentDTO = new ContentDTO(); contentDTO.setExternal_id("CNT1"); contentDTO.setTemplate_type_id(103); contentDTO.setChannel_id("CHN1"); contentDTO.setTitle("Conteudo1"); contentDTO.setText("Conteudo teste 1"); RulesDTO rules = new RulesDTO(); SimpleDateFormat publish_date = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss-SSS"); java.util.Date pdate = publish_date.parse("2012-12-28 11:18:00-030"); java.sql.Timestamp pubdate = new java.sql.Timestamp(pdate.getTime()); rules.setPublish_date(pubdate); SimpleDateFormat expiration_date = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss-SSS"); java.util.Date edate = expiration_date.parse("2013-12-28 11:18:00-030"); java.sql.Timestamp expdate = new java.sql.Timestamp(edate.getTime()); rules.setExpiration_date(expdate); rules.setNotify_publish(true); rules.setNotify_expiration(false); rules.setHighlihted(true); contentDTO.setRules(rules); InteractionsDTO interactions = new InteractionsDTO(); interactions.setAllow_comment(true); interactions.setAuto_download(false); contentDTO.setInteractions(interactions); cnt.put("content",contentDTO); HttpEntity<HashMap<String, ContentDTO>> request = new HttpEntity<HashMap<String, ContentDTO>>(cnt, httpHeaders); Can anyone helps me out??