0

I am writing a c# agent to pull data out of Excel workbooks stored in Livelink but I am unable to download the files.

webClient = new WebClient();
webClient.Credentials = CredentialCache.DefaultCredentials;
webClient.DownloadFile(strFileLocation, TEMP_FILE_LOC);

This is the code I am using to save the file. strFileLocation is a link generated using the make link utility in Livelink and it is a http link

Here is the code

(http://LivelinkServer.com/Livelink/livelink.exe?func=ll.GetTZ&NextURL=%2FLivelink%2Flivelink%2Eexe%3Ffunc%3Dll%26objId%3D128027626%26objAction%3Ddownload%26viewType%3D1)

I get an excel document that has a progress bar that says "Please wait a moment while Livelink is loading..." this looks, to me, like the page that redirects the request in order to get the actual file.

I appears to use a double hop in order to direct you to the file on the Livelink server via the URL it gives you, but I do not know what webservice it calls, examining the response headers gives no clues.

Does anyone know how to correctly access a file on a Livelink sever?

Any help would be greatly appreciated, thank you.

tarzanbappa
  • 4,930
  • 22
  • 75
  • 117
Melbz
  • 512
  • 4
  • 14
  • Do you use SOAP or do you try to access a file directly? – Steffen Roller Jan 25 '14 at 04:06
  • 1
    First of all, I strongly recommend you to use livelink web services for any type of operation like download a document, search a keyword, etc. I know there is a method in web services to download a file. Of course, you should login with an appropriate login crediential to livelink before calling the download method. :D – mgokhanbakal Jan 28 '14 at 03:12
  • I have google trying to find the name of an appropriate web service but I can't find anything :/ would you beable to point me in the right direction – Melbz Jan 28 '14 at 10:05
  • @SteffenRoller I have not tried SOAP I'll give that a go thanks for the suggestion – Melbz Jan 28 '14 at 10:13

2 Answers2

0

You have to call the Web Service function (SOAP)

GetVersionContents(ID, versionNum)

to get the actual data from which you can create a local file.

Steffen Roller
  • 3,464
  • 25
  • 43
0

Thankyou for your answers but after contacting my companies livelink department, I found that I need to access this service on a seprate port to allow the correct type of authentication

Melbz
  • 512
  • 4
  • 14