1

I'm trying to use a java servlet in a 3rd party tool's web interface (CA service desk) to invoke it's download file functionality using a webclient in vb.net. The trouble is the text stream from response is markup and not the acutual text file stream.

It's like the page is redirecting to another page which actually presents the file for downloading. I have no idea what the redirected page URL is.

Is there a way I can process this redirected page in order to get at the download using a system.net.webclient?

Thanks!

Tom Pickles
  • 890
  • 10
  • 26
  • Have you tried listening with an HTTP debugging proxy when using the servlet in a normal situation, to identify exactly what parameters are being passed? It's possible that the servlet page expects certain parameters (such as the HTTP REFERER), and displays a piece of HTML if they were not provided. – Victor Nicollet Jan 11 '11 at 13:28
  • so correct me, but it *sounds* like you're not following a prescribed/supported API route, then...? – Marc Gravell Jan 11 '11 at 13:28
  • 1
    There is a web service API, but it has no functionality to retrive a file from a record. It only has the ability to add or remove an attachment. – Tom Pickles Jan 11 '11 at 13:48

1 Answers1

0

Turn on logging for System.Net. You'll be able to see the full HTTP headers that are being sent and received. I'd recommend doing this from a desktop application and once you figure out the magic sequence then porting it to a web application.

Chris Haas
  • 53,986
  • 12
  • 141
  • 274