locked
CRM 2011 RC - Is Support for SOAP for Silverlight discontinued with RC? RRS feed

  • Question

  • Hi,

    CRM 2011 RTM SDK had sample code for SOAP for Silverlight and it was working pefectly. I do not see sample code for silverlight with SOAP.

     


    makeer
    Tuesday, March 29, 2011 7:14 PM

Answers

  • After you updated the service reference, the first thing you need to do is to edit Reference.svcmap\Reference.cs file. Change each instance of “System.Collections.Generic.KeyValuePair<” to “KeyValuePair<”. This will change the reference from System.Collections.Generic.KeyValuePair to the class defined in the SilverlightExtensionMethods.cs file.

    This has been documented  here

    Hope this is the problem that you are having. 


    Daniel Cai | http://danielcai.blogspot.com
    Tuesday, March 29, 2011 8:44 PM

All replies

  • Hey Mak!

    I have it under sdk\samplecode\cs\silverlight\soapforsilverlight

     

    Tuesday, March 29, 2011 7:17 PM
  • Sorry about false alarm.

    I downloaded latest version 5.0.2 and sample code is there.

    I downloaded sample code and it worked fine "as is", but when I Updated Service References which is basically pointed to https://engineering.api.crm.dynamics.com/XRMServices/2011/Organization.svc, it started giving compilation errors.

    Like: Error 6 Cannot apply indexing with [] to an expression of type 'SoapForSilverlightSample.CrmSdk.OrganizationResponse' D:\Work\CRM\CRM 2011\CRM2011 RTM SDK\sdk\samplecode\cs\silverlight\soapforsilverlight\SoapForSilverlightSample\MainPage.xaml.cs 99 62 SoapForSilverlightSample

    Same error occurs even when I point Service References to on-premise CRM

    Thanks

     

     


    makeer
    Tuesday, March 29, 2011 8:33 PM
  • After you updated the service reference, the first thing you need to do is to edit Reference.svcmap\Reference.cs file. Change each instance of “System.Collections.Generic.KeyValuePair<” to “KeyValuePair<”. This will change the reference from System.Collections.Generic.KeyValuePair to the class defined in the SilverlightExtensionMethods.cs file.

    This has been documented  here

    Hope this is the problem that you are having. 


    Daniel Cai | http://danielcai.blogspot.com
    Tuesday, March 29, 2011 8:44 PM
  • I have  a question,when i do this as sdk ,but when I insert CRM2011,and click 'listentity' button,this is a quto:

    Request error. This may be due to trying to cross-domain access to services but not have the correct cross-domain policy, or policy does not apply to SOAP services. You may need to contact the owner of the service, to publish a cross-domain policy file and make sure the file is allowed to send SOAP-related HTTP headers. This error may also be due to the use of the Web service proxy in the internal properties of the type without using InternalsVisibleToAttribute

    why?

    Wednesday, September 7, 2011 6:00 AM
  • How are you accessing your CRM application? Are you using ServerName or IP Address? Check what is returned by GetSoapService() method and it should contain same server name as you are accessing CRM instance with.

    hth


    makeer | myencounterwithcrm.wordpress.com
    Wednesday, September 7, 2011 6:22 AM
  • the uri get with SilverlightUtility.cs and the uri  is "http://win-n15tfp19gbd.jjsuo.com:5555/CRM2011/XRMServices/2011/Organization.svc/web" .I print "http://win-n15tfp19gbd.jjsuo.com:5555/CRM2011/XRMServices/2011/Organization.svc" in ie can be connect.but i  add "/web" this is error.

    Wednesday, September 7, 2011 6:37 AM
  • do you know this reason?
    Wednesday, September 7, 2011 9:05 AM
  • Thank you, Daniel Cai, for that piece of information.

    I was trying to simulate a sample from the crm sdk and simply couldn't figure out why that code wouldn't compile.

    As soon as I made that replacement everything worked as expected.

    Florin

    Wednesday, June 13, 2012 8:10 AM