CRM 2011: Wsdl web service doesn't contain my entities

别来无恙 提交于 2019-12-11 00:49:10

问题


We will soon upgrade to CRM 2011 so I'm doing some tests. The problem is that when I change my web service reference to the 2011 one, my application stops compiling. It just won't find any entity (example of line that stops working: Account acc = new Account() -> It says that I must miss a reference).

When I compare the web services of the CRM 4 to the one of the CRM 2011, I see that it's true. The CrmService of CRM 4 contains the definition of every entity of the CRM, but they do not appear in the CRM 2011!

Why is that? Am I missing something? Do I need to activate something?

Just to make sure, here are the URLs I'm using:

http://myserver/mscrmservices/2006/CrmServiceWsdl.aspx -> Works perfectly

http://myserver/mscrmservices/2007/CrmService.asmx?WSDL -> Does not contain entity definition

http://myserver/mscrmservices/2007/CrmService.asmx?WSDL&uniquename=MyOrg -> Does not contain entity definition

http://myserver/mscrmservices/2007/crmservicewsdl.aspx -> Does not contain entity definition


回答1:


You are using the wrong endpoints.

Dynamics CRM 2011 introduces a complete new WCF based web service.

It's endpoint is http://ServerName/OrganizationName/XRMServices/2011/Organization.svc See the endpoint overview

So you should either add a Service Reference (See Use the WSDL Endpoint) or use early/late bound access (See Write Code for Microsoft Dynamics CRM (Web Services)

The endpoints you mention in your post are for legacy purposes. See the article Use the Microsoft Dynamics CRM 4.0 (2007) Endpoint




回答2:


I recently came across a similiar situation. We are actually using CRM 4.0 (not 2011), and I was experiencing the same issues you are having. I came across this article:

http://www.stunnware.com/crm2/topic.aspx?id=HelpCustomizations

Basically, a reboot and refresh of the Web Service in VS fixed the issue. It looks like CRM doesn't constantly build these Web Services (which makes sense).



来源:https://stackoverflow.com/questions/5251530/crm-2011-wsdl-web-service-doesnt-contain-my-entities

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!