View Single Post
Old 09-27-2016, 09:09 AM
ander548 ander548 is offline
Join Date: Jun 2016
Posts: 37
ander548 has 10 reputation points

You may be getting a little over my head with that I can't believe there isn't a way to view the logs from System Manager somewhere! Here is the code I added to my execute class that builds but is most likely causing my error. Any ideas what could be causing an error with this? If I just do an obj.put and return obj that passes the output back to my workflow fine. After adding the http post code it gets the attached error, but no idea what's going on.

try {
String url = "";
InputStream in = null;
HttpClient client = new HttpClient();
PostMethod method = new PostMethod(url);

//Add any parameter if u want to send it with Post req.
method.addParameter("p", "apple");

int statusCode = client.executeMethod(method);

if (statusCode != -1) {
in = method.getResponseBodyAsStream();


obj.put("STTId","Resp(" + statusCode + "): " + in);
} catch(Exception ex){
obj.put("STTId","ERR:" + ex.getMessage());
Reply With Quote