如何通过JavaScript for SharePoint 2013应用程序连接到EWS(Exchange Web服务)? [英] How do I connect to EWS (Exchange Web Services) via JavaScript for SharePoint 2013 app?

查看:78
本文介绍了如何通过JavaScript for SharePoint 2013应用程序连接到EWS(Exchange Web服务)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我想知道是否可以通过SharePoint 2013(SharePoint托管)应用与Exchange Web服务进行通信,如果有,是否有任何基本知识(JavaScript)关于如何通过SP 2013应用程序完成此操作的代码示例?

I was wondering if it were possible to talk to Exchange Web Services via a SharePoint 2013 (SharePoint-Hosted) app and if so, are there any basic (JavaScript) code examples on how this would be done from a SP 2013 app?

我不清楚的问题是:


  • 您将如何利用基于SharePoint应用程序当前用户的自动发现服务?
  • 或者您是否会使用包含EWS URL的配置列表?
  • 你能用JSON格式工作还是只用XML?
  • 如果是XML,你会如何生成和使用请求/回复?
  • 是GET还是POST请求?

比方说,您有一个页面,您可以在其中输入一个字符串,然后单击一个按钮,它会根据该字符串在您的收件箱中创建一个文件夹。 如何实现?  JavaScript for SharePoint操作似乎有示例,但
我无法在Exchange端找到等价物。

Let's say for example, you have a page where you enter a string and then click a button and it creates a folder in your inbox based on that string.  How would this be achieved?  The JavaScript for SharePoint operations seem to have examples but I haven't been able to find the equivalent on the Exchange side.

基本上我正在寻找一个工作示例如何通过JavaScript实现从SharePoint 2013应用程序访问EWS。

Basically I'm looking for a working example of how accessing EWS from a SharePoint 2013 app is achieved via JavaScript.

我已经做了很多搜索,但只能找到C#示例。 或者我应该用C#而不是JavaScript来做这件事? 如果是这样,是否会产生任何影响,例如客户端或服务器上需要额外的文件或任何交叉的
网站脚本问题?

I've done a lot of searching but have only been able to find C# examples.  Or should I be doing this in C# rather than JavaScript?  If so does this have any implications such as additional files being required on the client or server or any cross site scripting issues?

我对应用程序开发方面相当新如果以上任何一个错误的话,那么事情就这么道歉!

I'm fairly new to the app dev side of things so apologies if any of the above is on the wrong track!

最好的问候,

迈克尔。

推荐答案

嗨迈克尔,

你走在正确的轨道上!但不幸的是
EWS今天不支持JS,并且没有简单的方法来授权Exchange,缺少你的应用程序要求用户的凭据。

You are on the right track! But unfortunately EWS doesn't support JS today and there's no easy way to auth to Exchange, short of your app asking for the user's credentials.

您的方案是否涉及尝试根据SharePoint中的用户提供的字符串创建收件箱文件夹?您是否可以分享有关您要执行的操作的更多详细信息?

Does your scenario involve trying to create an inbox folder based on a string provided by a user in SharePoint? Can you share more details about what you are trying to do?

此外,您是否有理由选择构建SharePoint托管应用程序而不是提供商托管或自动托管?

Also, is there a reason why you chose to build a SharePoint hosted app and not Provider hosted or autohosted?

谢谢,

Hila


这篇关于如何通过JavaScript for SharePoint 2013应用程序连接到EWS(Exchange Web服务)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆