Quantcast
Channel: SharePoint 2013 - Setup, Upgrade, Administration and Operations forum
Viewing all articles
Browse latest Browse all 21070

Sharepoint 2010: How to return xml as response

$
0
0

I want to get from a http request to a Sharepoint Website an XML-File as response.

The concept:

I have a Sharepoint Server/Website and an other Java-Based Web-Application, running on different Servers communicating through internet.

The idea is to create something like an SSO connection between them, in order Sharepoint users to be able to fetch information (html pages, pdf files etc.) from the Java Web Site.

A use case would be that there is a file 1.txt hosted in the Java Site and it could be accessed through:

http://www.javasite.com/files/1.txt

Normally this would redirect you to the login page, but the javasite is already configured to allow "SSO-like" connections (and it is already functional with other non sharepoint Web Applications) and it will expect to get a request like:

http://www.javasite.com/files/1.txt?sharepointid=5&uniquesessionid=12345

The url of the Sharepoint web server is "hardcoded" in the javasite configuration, and this request will trigger a request to the sharepoint:

http://www.sharepointsite.com/ThisPartIsMissing?giveMeStatusForID=12345

As a response I am expecting to get an XML-File which will have the status (username, valid, roles, groups) of the user in this request. The javasite "BLINDLY trusts" the sharepoint site, and depending on the returned status, if it matches the requirements it will return the 1.txt or an access denial message. This will NOT happen the other way around (javasite and its users will never request anything than the session status).

As a totally new sharepoint user/developer i am really fighting to understand the structure and the functionality of it.

Till now i developed a simple web part (not visual) which retrieves the status of the current user, and then i am able to display it through asp in a sharepoint (that means i could request this web part and get its html response).

I know the existence of http://www.sharepointsite.com/_vti_bin/owssvr.dll?Cmd=Display&List={list_guid}&XMLDATA=TRUE but i am not sure it will be really useful.

I have two open problems:

  1. How to return xml (including how to generate the link, an read the parameters)

  2. How to login in sharepoint with a http request (the javasite will request the session status). This is not really important, as there are libraries in java that could login using windows authentication. The sharepoint server will use AD authentication, and a user for the external java server could be created.

I am expecting answers or even articles that could help me on this two problems (i already read a lot, also on sharepoint sso but i didnt manage to find what i am searching for)

Thank you in advance.


Viewing all articles
Browse latest Browse all 21070

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>