26.04.2011, 20:11 | #1 |
Участник
|
Microsoft Dynamics CRM Team Blog: SilverCrmSoap: A CRM Soap Library for CRM 2011
Источник: http://blogs.msdn.com/b/crm/archive/...-crm-2011.aspx
============== SilverCrmSoap is a library built using the methods in Walkthrough: Use the SOAP Endpoint for Web Resources with Silverlight. The SilverCrmSoap library simplifies SOAP Silverlight development for CRM 2011 by providing a class that does a lot of the heavy lifting right out of the box. Why use SilverCrmSoap? If you are using the SOAP End Point, then the library will help simplify your project by removing the complexities of connecting to the SOAP End Point in Silverlight while providing additional tools to assist with your Silverlight project. In the end, it really boils down to where do you use SOAP instead of REST? You use SOAP when:
Using SilverCrmSoap The SilverCrmSoap library is built to be added as a compiled DLL reference in a Silverlight projects. It facilitates making calls to CRM when used in a Silverlight Web-Resource. Inside your Silverlight application solution in Visual Studio, add a reference to the compiled SilverCrmSoap.dll Once referenced, there are three namespaces that assist with Silverlight development for CRM:
Built following the steps in Walkthrough: Use the SOAP Endpoint for Web Resources with Silverlight, this namespace provides access to the SOAP Endpoint. The SilverCrmSoap.CrmSdk also contains some examples for extending the base Entity class. In the SilverCrmSoap project a UserOwnedEntitiy class has been added that extends the Entity class and raises the appropriate event when a field is changed. By default the SOAP Entity object only raises a property changed event if the Attributes object itself is changed. In addition to the UserOwnedEntity class which specifies the default fields for user owned entities, an Annotation class has been added that inherits from the UserOwnedEntity, adding the specific fields for notes. This type of extension becomes important when you are attempting to facilitate data-binding. SilverCrmSoap.FetchXml The FetchXml namespace provides a set of classes built according to the FetchXml schema to allow deserialization of FetchXml to support the modifying parameters through code, i.e. objectifying FetchXml. You will want to do this because a query expression does not return column values from another entity, and yet the reason why QueryExpressions are used so widely is because of their ability to easily be modified through code. By de-serializing the FetchXml query string, you will be able to edit it’s values using objects, then serialize it to use in your queries SilverCrmSoap.Helpers The SilverCrmSoap Library contains 3 helpers, the Xrmhelper, the FormHelper, and the SoapHelper. XrmHelper The XrmHelper provides on-demand access to the JScript objects that are commonly used such as the Xrm.Page, context, etc. It is also able to determine if the control was loaded as a web-resource on a form or if it was loaded outside a form. When using this helper, it is important to either put the web-resource on the form or put it on an html page that provides access to the GlobalContext. FormHelper FormHelper takes the XrmHelper and provides a couple of additional quick access methods that utilize the JScript objects XrmHelper provides:
The SoapHelper was built to leverage the walkthrough for interfacing the SOAP End Point and provide a set of methods to launch the proper asynchronous call, simplifying access. One of the great things about these helpers is that you don’t need to specify the URL to use them. They leverage the context to correctly set the service URL. The SoapHelper provides a way to quickly connect to the SOAP End Point and a set of methods to jumpstart the begin statements of asynchronous SOAP calls:
Carlton Colter Источник: http://blogs.msdn.com/b/crm/archive/...-crm-2011.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|