[英]Windows Gadget for Sharepoint 2007 List using SOAP, Javascript, C#, Webservices, jQuery
I am trying to develop a Gadget for Sharepoint 2007, which will authenticate a user and then fetch him a sharepoint list from a specific URL, 我正在尝试为Sharepoint 2007开发一个Gadget,它将对用户进行身份验证,然后从特定的URL中获取一个sharepoint列表,
For the last 4 days I have been working on it and came across different ways of making it, but because solutions are either half done, dont work or too confusing to get help from or convert into what I want. 在过去的4天里,我一直在研究它,并遇到了不同的制作方法,但是因为解决方案要么完成了一半,要么无法工作,要么太混乱,无法获得帮助或转换成我想要的东西。
Because Windows Gadget uses Scripting + HTML so I have following options to carry on work with to make this gadget, 因为Windows Gadget使用Scripting + HTML所以我有以下选项可以继续使用来制作这个小工具,
Gmail Gadget Using JavaScript to Read Visual studio Dll Gmail小工具使用JavaScript阅读Visual Studio Dll
This Link is Using Webservices in a Dot Net Project to Update a List Item, but In comments it also tells how to get List data, but then how I gonna authenticate my users 此链接在Dot Net项目中使用Webservices来更新列表项,但是在注释中它还说明了如何获取List数据,但是我将如何验证我的用户
Using jQuery to fetch List Data 使用jQuery获取列表数据
My Favorite solution is to Use SOAP or REST along with webservices, I want to use SOAP to get Sharepoint List data and authenticate my users at the same time, I find hundreds of tutorials on this, but non of them actually doing authenticating or telling how this can work in a Gadget, using JavaScript/HTML, 我最喜欢的解决方案是使用SOAP或REST以及webservices,我想使用SOAP来获取Sharepoint List数据并同时验证我的用户,我发现了数百个关于此的教程,但是他们实际上并没有进行身份验证或告诉如何这可以使用JavaScript / HTML在小工具中工作,
There is few Gadget I found Online that are somehow related to what I need, they either dont work, or can't be changed to what I want. 很少有我发现在线的小工具与我需要的东西有某种关系,他们要么不工作,要么不能改变我想要的东西。
Datapolis Sharepoint List Gadget, simply doesn't work on my PC, altho its exactly what I am looking for, possible reason is, it doesn't work for SSL/https Datapolis Sharepoint List Gadget,根本无法在我的PC上运行,尽管它正是我正在寻找的,可能的原因是,它不适用于SSL / https
A gadget that is getting News Feed from a website, its sending an HTTPxml request but then asking for a RSS feed, whereas i dont have Rss feedback in sharepoint site I am working on 从网站获取新闻Feed的小工具,它发送HTTPxml请求但随后要求提供RSS提要,而我在sharepoint网站上没有Rss反馈我正在努力
Cheers for reading this I hope you either gonna increase your knowledge or gonna share it :) 欢呼阅读这个我希望你要么增加你的知识或要分享它:)
EDIT * I meant using Sharepoint MOSS "SPLIST" or "SPWEB" as Client Object Model, AS I am using Moss I can't use Client Object Model Authentication :(. really sorry for wrong Information * 编辑 * 我的意思是使用Sharepoint MOSS“SPLIST”或“SPWEB”作为客户端对象模型,因为我使用Moss我不能使用客户端对象模型身份验证:(。真的很抱歉错误的信息 *
If you can afford deplying a COM component with your Gadget the first approach would work. 如果你能负担得起使用你的小工具的COM组件,第一种方法是可行的。 You wrap your logic in a facade of a CCW .NET class (using the .NET SP Client OM) and register it for COM by regasm.
您将逻辑包装在CCW .NET类的外观中(使用.NET SP Client OM)并通过regasm将其注册到COM。 All pure .NET, your class would be declared (and written) COM-compatible.
所有纯.NET,您的类将被声明(和写入)COM兼容。
You may find the second approach too limiting later; 您可能会发现第二种方法在以后受到限制; SP ClOM supports more functionality that SP WSs.
SP ClOM支持SP WSs的更多功能。 Throwing the jQuery in doesn't change it much.
抛出jQuery不会改变它。 (Unfortunately, SP JS ClOM can be used only on SP pages; not in a Gadget.)
(不幸的是,SP JS ClOM只能在SP页面上使用;不能在小工具中使用。)
If you go the way of pain (JS ;-) IWA should give you the (Windows) SSO authentication. 如果你采取痛苦的方式(JS ;-) IWA应该给你(Windows)SSO身份验证。 If you call the SP ClOM from the DLL you can either reuse the Windows session token of the current user (SSO) or authenticate explicitly by a form of yours if the user wished it.
如果从DLL调用SP ClOM,则可以重用当前用户(SSO)的Windows会话令牌,或者如果用户希望的话,可以通过您的表单明确进行身份验证。 (You can login to SP UI as a different user than you are in Windows too.) Both is supported .
(您也可以以不同于Windows的用户身份登录SP UI。) 两者都受支持 。
I'd first try the DLL approach. 我首先尝试DLL方法。
Update: Oops, you're on SP 2007, not on 2010 - no SP ClOM. 更新:哎呀,你在SP 2007上,而不是在2010年 - 没有SP ClOM。 I should've noticed earlier, sorry... Still, you could create a .NET DLL that would talk to SP via a WS.
我应该早些时候注意到,抱歉......你仍然可以创建一个可以通过WS与SP对话的.NET DLL。 You can still set
DefaultNetworkCredentials
to HttpWebRequest.Credentials
(REST) or to .Credentials
of your WS client class (SOAP) to get SSO authentication. 您仍然可以将
DefaultNetworkCredentials
设置为HttpWebRequest.Credentials
(REST)或WS客户端类(SOAP)的.Credentials
以获取SSO身份验证。 Or create your own NetworkCredential
with name and password. 或者使用名称和密码创建自己的
NetworkCredential
。
--- Ferda ---费达
You're installing this on a users PC so you can't use the standard SharePoint API (Microsoft.SharePoint.dll) 您正在用户PC上安装它,因此您无法使用标准SharePoint API(Microsoft.SharePoint.dll)
You're using 2007 so you can't use the "Client Object Model" (managed/silverlight or EMCA Script) 您正在使用2007,因此您无法使用“客户端对象模型”(托管/ silverlight或EMCA脚本)
That leaves 离开了
a) The SharePoint Web Services (either JavaScript or JQuery which IS still JavaScript). a)SharePoint Web服务(JavaScript或JQuery仍然是JavaScript)。
This means that your gadget will be authenticating to SharePoint via the same mechanism that someone browsing to your site would - normally Integrated Windows auth. 这意味着您的小工具将通过与浏览您网站的人相同的机制向SharePoint进行身份验证 - 通常是集成Windows身份验证。
The first place to start this is the excellent http://spservices.codeplex.com/ library which allows you to easily call the web services from JQuery). 首先要做的是优秀的http://spservices.codeplex.com/库,它允许您从JQuery轻松调用Web服务。 See the documentation for tips on how to use it.
有关如何使用它的提示,请参阅文档。
For a half done project how about http://sharepointsidebar.codeplex.com/ 对于半完成的项目,请访问http://sharepointsidebar.codeplex.com/
b) Create your own custom web services by deploying a dll on the SharePoint server then call those via JavaScript (perhaps usign JSON or similar rather b)通过在SharePoint服务器上部署dll然后通过JavaScript调用它们来创建自己的自定义Web服务(也许是使用JSON或类似的
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.