When I am try to connect to HP Application Lifecycle Management 11.52 on Jetty Server using java REST API it works fine (Using URL:> http://HPQC-IIS:8080/qcbin).
Authenticate Path : http://hpqc-iis:8080/qcbin/authentication-point/authenticate
Session URL========http://hpqc-iis:8080/qcbin/authentication-point/authenticate
AUTH HEADER : {null=[HTTP/1.1 200 OK], Date=[Mon, 29 Dec 2014 11:33:00 GMT], Content-Length=[0], Expires=[Thu, 01 Jan 1970 00:00:00 GMT], Set-Cookie=[LWSSO_COOKIE_KEY=PF1TI0D__3IMvIIkkEPaf8EVA6-n1eCXyAH9ObGSk3sROV-PKKdTix_Vr6Yk37VykBjBd3l0m0WOo73LFH0o0oIJKRDvOHTtlNoO8Bd5KPF3a5b4LNS6zA4Le4vNW6RcPNFFsaeMe8Dtn-MUKIwnSyUZWpuEl97mAZtfhSxSGvJHlz4Iru4HP2V7-tctl8i9KUQe7GTTA0-tl_oOH9Occw..;Path=/], Server=[Jetty(7.5.4.v20111024)], Pragma=[no-cache], Cache-Control=[no-cache, max-age=0]}
Authentication Conn : true , StatusCode :200 : 200
StartSession : http://hpqc-iis:8080/qcbin/rest/site-session
Session URL========http://hpqc-iis:8080/qcbin/rest/site-session
SESSION HEADER : {null=[HTTP/1.1 200 OK], Date=[Mon, 29 Dec 2014 11:33:00 GMT], Content-Length=[0], Expires=[Thu, 01 Jan 1970 00:00:00 GMT], Set-Cookie=[QCSession=ODM7MnRTVzBhckNGUHdNN3NvdGY0S3R6ZyoqO1JFU1QgY2xpZW50OyA7IA..;Path=/], Server=[Jetty(7.5.4.v20111024)]}
Session Cookie 1st :: [QCSession=ODM7MnRTVzBhckNGUHdNN3NvdGY0S3R6ZyoqO1JFU1QgY2xpZW50OyA7IA..;Path=/]
Session Conn : true , StatusCode :200 : 200
AddVAPITestRun URL : http://hpqc-iis:8080/qcbin/rest/domains/DEFAULT/projects/Sample/customization/users
Session URL========http://hpqc-iis:8080/qcbin/rest/domains/DEFAULT/projects/Sample/customization/users
res.getStatusCode() : 200 : 200
RETURN DATA : <?xml version="1.0" encoding="UTF-8" standalone="yes"?><Users><User Name="alex_alm" FullName=""><userAvatarCache>-1</userAvatarCache><description></description><email></email><phone></phone><UserActive>true</UserActive></User></Users>
==== STOP ========
But I am trying to connect to HP Application Lifecycle Management 11.52 on IIS 7.0 Web server using java REST API its give an error below (Using URL:> http://HPQC-IIS/qcbin):
Authenticate Path : http://hpqc-iis/qcbin/authentication-point/authenticate
Session URL========http://hpqc-iis/qcbin/authentication-point/authenticate
AUTH HEADER : {null=[HTTP/1.1 200 OK], Date=[Mon, 29 Dec 2014 11:33:44 GMT], Content-Length=[0], Expires=[Thu, 01 Jan 1970 00:00:00 GMT], Set-Cookie=[LWSSO_COOKIE_KEY=XmipV1bP330abcfjiXwzmtf7CAp3C1Vxj_WSyefTTcMqOKEpUDE8VNAZt_5ZLlcehSXfxIYb23b6RpOz4xYCCQDIYG-fJKzu54Not4cMYhG9iFsEyDNQ6lmg_Bm4nyR65hLTFLCkXEA-snpSvOFRfSknWdtTV7kkLM5TrDX9p0H8pNCP6d6rHf4S_Fj8s9B123_HUFDWPdKJrU636I0wug..;Path=/], X-Powered-By=[ASP.NET, ARR/2.5], Server=[Microsoft-IIS/7.0], Pragma=[no-cache], Cache-Control=[no-cache, max-age=0]}
Authentication Conn : true , StatusCode :200 : 200
StartSession : http://hpqc-iis/qcbin/rest/site-session
Session URL========http://hpqc-iis/qcbin/rest/site-session
SESSION HEADER : {null=[HTTP/1.1 411 Length Required], Date=[Mon, 29 Dec 2014 11:33:44 GMT], Content-Length=[344], Connection=[close], Content-Type=[text/html; charset=us-ascii], Server=[Microsoft-HTTPAPI/2.0]}
java.io.IOException: Server returned HTTP response code: 411 for URL: http://hpqc-iis/qcbin/rest/site-session
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1674)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1672)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1670)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1243)
at com.ice.HPQualityCenter.ALMConnection.retrieveHtmlResponseUsingHTTP(ALMConnection.java:612)
at com.ice.HPQualityCenter.ALMConnection.getHTTPResponse(ALMConnection.java:571)
at com.ice.HPQualityCenter.ALMConnection.StartSession(ALMConnection.java:469)
at com.ice.HPQualityCenter.APIAlmRest.almStartSession(APIAlmRest.java:52)
at com.ice.HPQualityCenter.APIAlmRest.testAddVAPITestRun(APIAlmRest.java:73)
at com.ice.HPQualityCenter.Main.main(Main.java:32)
Caused by: java.io.IOException: Server returned HTTP response code: 411 for URL: http://hpqc-iis/qcbin/rest/site-session
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1625)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderFields(HttpURLConnection.java:2700)
at com.ice.HPQualityCenter.ALMConnection.StartSession(ALMConnection.java:463)
... 3 more
Session Cookie 1st :: null
Session Conn : false , StatusCode :411 : 200