Send Cookie in HTTP Header Request
-
Hi all, At work we are using a third party web service. The web service works in two tiers. First you request general information. The XML returned contains various IDs. It also contains a JSESSIONID field. In the second phase, another method in the web service requests one of the IDs returned. Now, here's the problem. If we just give the web service the ID requested in the parameter, it asks for the JSESSIONID value. We dug some more and found out we need to pass this JSESSIONID value as a Cookie in the Header section. The actual instruction was:
Also the 'jsessionid' given in the preliminary response has to be handed over in the HTTP-Header 'cookie'. Multiple requests can be performed in one session.
So I created a CookieContainer and appended it to the HTTPWebRequest object I'm passing to the webservice (thanks google) but to no avail! What can there be wrong? We're at a total loss here...In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)
-
Hi all, At work we are using a third party web service. The web service works in two tiers. First you request general information. The XML returned contains various IDs. It also contains a JSESSIONID field. In the second phase, another method in the web service requests one of the IDs returned. Now, here's the problem. If we just give the web service the ID requested in the parameter, it asks for the JSESSIONID value. We dug some more and found out we need to pass this JSESSIONID value as a Cookie in the Header section. The actual instruction was:
Also the 'jsessionid' given in the preliminary response has to be handed over in the HTTP-Header 'cookie'. Multiple requests can be performed in one session.
So I created a CookieContainer and appended it to the HTTPWebRequest object I'm passing to the webservice (thanks google) but to no avail! What can there be wrong? We're at a total loss here...In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)
SOLVED. If anyone else has this problem just visit this link.
In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)