AnsweredAssumed Answered

/repository/deployments 'message':'Bad request','exception':'File must be of type .bpmn20.xml

Question asked by grosserbetafan on Nov 5, 2014
Latest reply on Nov 10, 2014 by jbarrez
When I use rest api 5.14.4 I get the follwoing error message when I try to install a new deployment

"message":"Bad request","exception":"File must be of type .bpmn20.xml

When I use 5.14.1 all works fine.

// String deploymentUrl = baseURL + "/repository/deployments"; 5.14.4
         String deploymentUrl = baseURL + "/deployment"; // 5.14.1
         System.out.println("deploymentUrl" + deploymentUrl);
         HttpPost hp = new HttpPost(deploymentUrl);

         MultipartEntity se = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
         File file = new File(localBPMN);
               new StringBody("success", Charset.forName("UTF-8")));
               new StringBody("failure", Charset.forName("UTF-8")));
         FileBody fileBody = new FileBody(file);
         se.addPart("file", fileBody);
         se.addPart("name", new StringBody("TESTContextDealing.bpmn"));