Hallo alles, ich versuche Prozessdefinition in activiti-Rest durch Verwendung von Java rest.But Fehler als 'Ausnahme im Thread "Main" Bad Request (400) 'Ich habe viel in Google versucht, aber keine Lösung dafür gefunden.Bitte helfen Sie mir, wo ist der eigentliche Fehler in meinem Code.Find unter meinem Java-Code und Fehler.Fehler bei der Bereitstellung der Prozessdefinition in activiti-rest mit Java-Code
Mein Fehler
Starting the internal HTTP client
Exception in thread "main" Bad Request (400) - The request could not be understood by the server due to malformed syntax
\t at org.restlet.resource.ClientResource.doError(ClientResource.java:590)
\t at org.restlet.resource.ClientResource.handleInbound(ClientResource.java:1153)
\t at org.restlet.resource.ClientResource.handle(ClientResource.java:1048)
\t at org.restlet.resource.ClientResource.handle(ClientResource.java:1023)
\t at org.restlet.resource.ClientResource.post(ClientResource.java:1485)
\t at org.restlet.resource.ClientResource.post(ClientResource.java:1424)
\t at com.bizruntime.activiti.rest.Activiti_Rest_BuyEconomyOrBusinsessClassTIcket.TicketClass.createdeployment(TicketClass.java:40)
\t at com.bizruntime.activiti.rest.Activiti_Rest_BuyEconomyOrBusinsessClassTIcket.Ticke_Test.main(Ticke_Test.java:13)
/**
*Client Resource
*/
private static ClientResource getClientResource(String uri){
\t ClientResource resource=new ClientResource("http://localhost:8431/activiti-rest/service");
\t resource.setChallengeResponse(ChallengeScheme.HTTP_BASIC,kermit,kermit);
\t return resource;
}
/**
* Creating Deployment
*/
public static JSONObject createdeployment(){
\t String uri=REST_URI+"/repository/deployments";
\t log.debug("uri(Create Deploymnet):: "+uri);
\t JSONObject my_data=new JSONObject();
\t try {
\t \t my_data.put("name","BuyTicket.bpmn20.xml");
\t \t Representation response=getClientResource(uri).post(my_data);
\t \t JSONObject object=new JSONObject(response.getText());
\t \t if(object!=null){
\t \t log.info("Deployed Successfully.....");
\t \t return object;
\t \t }
\t \t
\t } catch (JSONException e) {
\t \t e.printStackTrace();
\t } catch (IOException e) {
\t \t e.printStackTrace();
\t }
\t return null;
}