문제

I am trying to develop a mobile application which can interact with a MOSS Site via web services. i expect it to be be able to;

1) retrieve documents (pdf, doc, docx, excel) 2) retrieve reporting services reports in a PDF or excel form.

i will be using either phonegap or rhomobile to develop this app and i know that i can consume web services using jquery.

My question revolves around MOSS Web Services Security. How will i handle authentication?

Thanks

도움이 되었습니까?

해결책

How does the authentication work on your MOSS site collection? Is it windows authentication? If it is, then you can use impersonation when you create the Soap Client to access the web service :

EndpointAddress endpointAddress = new EndpointAddress("http://site/_vti_bin/Lists.asmx");

//Just create a basicHttpBinding with standard web services settings
SoapClient soapClient = new SoapClient(basicHttpBinding, endpointAddress);

soapClient.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;

Just make sure that impersonation is allowed in your web.config. Look for the node

<identity impersonate="true" />

다른 팁

Hugo's answer may work if your users are logged into their AD accounts on the mobile devices.

If this is not the case your mobile apps can call your web services. Your web services run in an application pool that is running under the identity of a user that is allowed to call the sharepoint services.

You then make a call to the sharepoint web services using impersonate=false.

There are a couple of things that could give you problems:

  • You must authenticate your users somehow or else you will be opening up your sharepoint site.
  • There is also a problem sending binary data over JSON

JSON does not have a <[CDATA[]]> feature, so it is not well suited to act as a carrier of sounds or images or other large binary payloads. JSON is optimized for data. Besides, delivering executable programs in a data-interchange system could introduce dangerous security problems.

http://www.json.org/xml.html

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top