简体   繁体   English

Dynamics CRM Online + Node.js(请求永远运行/挂起)

[英]Dynamics CRM Online + Node.js (request runns forever /hangs)

I tried to develop a node.js module that allows the use of the SOAP web service of CRM Online: XrmNodeKit 我尝试开发一个node.js模块,允许使用CRM Online的SOAP Web服务: XrmNodeKit

The code based on the JavaScript code provided by Jason Lattimer 该代码基于Jason Lattimer提供的JavaScript代码

So far I was able the retrieve the auth-token but when I execute the WhoAmI requst the web-service call just runs forever (see test " should fetch the name of the current user ", no error is thrown.... 到目前为止,我能够检索auth-token,但是当我执行WhoAmI请求时,Web服务调用只是永远运行(请参阅test“ 应该获取当前用户的名称 ”,不会抛出任何错误....

You can find the source-code on github 你可以在github上找到源代码

Has anyone tried to consume the SOAP web-services via Node.js? 有没有人试图通过Node.js使用SOAP Web服务?

Have you found this post? 你找到这个帖子了吗? http://www.alexanderdevelopment.net/post/2015/01/24/authenticating-from-a-node-js-client-to-dynamics-crm-via-ad-fs-and-oauth2/ I understand this is the correct approach. http://www.alexanderdevelopment.net/post/2015/01/24/authenticating-from-a-node-js-client-to-dynamics-crm-via-ad-fs-and-oauth2/我明白这是正确的方法。 You need to use OAuth. 您需要使用OAuth。

But it is not correct in one regard (I'm quoting an expert from the CRM product team) He says " You cannot move the node.js code to client, since in this case you need to use the Implicit flow rather than the Authorization code flow , Finally after getting the OAuth token, you still cannot send it to our Web services from the client since [CRM Online] does not support CORS in 2013/2015 " 但在一方面它是不正确的(我引用了CRM产品团队的专家)他说“ 你不能将node.js代码移动到客户端,因为在这种情况下你需要使用隐式流而不是授权代码流,最后在获取OAuth令牌后,您仍然无法从客户端将其发送到我们的Web服务,因为[CRM Online]在2013/2015不支持CORS

While this is a .NET sample it covers the principles, just have to make it work with Node.js: https://bitbucket.org/Georged/caseowary/overview (credits to George Doubinski) 虽然这是一个.NET示例,但它涵盖了原则,只需要使它与Node.js一起使用: https ://bitbucket.org/Georged/caseowary/overview(对George Doubinski的信用)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM