Last post Aug 03, 2014 04:52 PM by Jay.NET
Jul 29, 2014 12:52 AM|Jay.NET|LINK
Requirement: To surface documents from internal sharepoint library to outside world.
What I am thinking so far is....
Webservice hosted on our external web server.
That webservice calls the sharepoint lists.asmx webservice which, via caml, returns the file at the given location.
I have done a similar project before where I populated web pages on the external server with the contents of SP lists.
I've never worked with files or with this double hop webservice (previous project was a website not service)
So, client webpage has a link to my webservice and the link includes a docid, my webservice calls list.asmx and passes the doc ID.
The doc ID is used in a CAML query and the FILE is then served back to the client.
The fact that my webservice lives between the client and sharepoint means it would probably be a 2 staged thing, pass the file back to the external webserver from sharepoint (via lists.asmx) redirect the client to the file which now has a temp home on the webserver.
I hope some of that makes sense!
Above ideas open to suggestion but given the short timespan I plan to use classic webservices rather than start to learn MVC, REST etc
Jul 29, 2014 06:55 AM|Dr. Acula|LINK
basically you would send the file as a byte array. there is an example here
Aug 03, 2014 04:52 PM|Jay.NET|LINK
I used the webclient class under a local security context, saved the file locally to the webservers folder and then redirected the client to the file.