hello,
I'm building api project with java and i have few problems to update entities:
I'm using sdk 1.7, win 7, 64 bit,
first problem - checkout
the scenario:
1. qcAuthenticate - works
2. qcLock - works
3. qcCheckout :
the java code :
public static String entity= "tests/7747";
URL url = new URL("http://"+ALMServer+"/qcbin/rest/domains/"+DOMAIN_NAME+"/projects/"+PROJECT_NAME+"/"+entity+"/versions/check-out");
conn = (HttpURLConnection) url.openConnection();
cm.setCookies(conn);
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "application/xml");
conn.setRequestProperty("Accept", "application/xml");
conn.setRequestProperty("Input", "<VersionParameters><Comment>blablabla</Comment></VersionParameters>");
System.out.println(conn.getResponseMessage());
System.out.println(conn.getResponseCode());
System.out.println(conn.getHeaderFields());
the server answer :
Bad Request
400
{null=[HTTP/1.1 400 Bad Request], Date=[Wed, 03 Jul 2013 08:46:29 GMT], Transfer-Encoding=[chunked], Connection=[close], Content-Type=[application/xml], X-Powered-By=[Servlet 2.5; JBoss-5.0/JBossWeb-2.1], Server=[Apache-Coyote/1.1]}
I tried many ways and still i got : 400 , what should i do diffrent? do you have any example in java for this?
second problem - get to an entity
I'm mannage to get only simple entities for example : defect/1 or tests/6632
how do i get to more complexed entity like :
test lab -> root -> folder/name1 -> subFolder/name2 -> subSubFolder/name3 -> Test-set/id(2651) ->test ?
can you please send me a java example ?
Thanks,
and a very good day!
Or