Pierpaolo Lombardi [http://community.jboss.org/people/pierx83] created the discussion
"Re: Start a process remotely by using Java" To view the discussion, visit: http://community.jboss.org/message/624488#624488 -------------------------------------------------------------- Anyway, I'm trying using the REST interface to start a process but I have a problem cause the answer I get is the html source of the login form How can I sove this? The code I use is: URL url = new URL(" http://localhost:8080/gwt-console-server/rs/process/definition/HelloHT/new_instance http://localhost:8080/gwt-console-server/rs/process/definition/HelloHT/new_instance"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setDoOutput(true); conn.setDoInput(true); conn.setUseCaches(false); conn.setAllowUserInteraction(false); conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); if (conn.getResponseCode() != 200) { throw new IOException(conn.getResponseMessage()); } // Buffer the result into a string BufferedReader rd = new BufferedReader( new InputStreamReader(conn.getInputStream())); StringBuilder sb = new StringBuilder(); String line; while ((line = rd.readLine()) != null) { sb.append(line); } rd.close(); System.out.println(sb.toString()); -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/624488#624488] Start a new discussion in jBPM at Community [http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
