Freigeben über


Generating a web service proxy manually

When you use the VS 2005 callout template that I posted earlier you can take advantage of most of the new VS 2005 IDE features such as auto complete, IntelliSense, code snippets, etc to build your callout. However, if you need to generate a proxy to call any web service, you need to ensure that the generated proxy class can be compiled with .NET 1.1. The VS 2005 "Add Web reference" generates proxies that use the new .NET 2.0 concepts (e.g. partial classes) so to call web services (including CRM web services) you need to generate your proxy using WSDL.exe instead (BTW there might be other workarounds, let me know if you found other ones). Here is how:

1) Run this from command line:

C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin>wsdl /out:myCRMProxyClass.cs https://[YOUR_SERVER_ NAME_HERE]/mscrmservices/2006/crmservice.asmx?wsdl

This will generate a myCRMProxyClass.cs.

2) Add the generated .cs file to the project that was created by Callout template targetign .NET 1.1, compile and call web services.

Comments

  • Anonymous
    September 06, 2006
    The comment has been removed

  • Anonymous
    September 06, 2006
    Sorry, I think I've fixed it, at least for the time being. I simply browsed to the .net v1.1 folder and added a reference to system.web.services dll.
    The project has now built.

  • Anonymous
    November 02, 2006
    If you have an installation of VS2003, you will find the directory above, if not, just copy the SDK to a safe place and you can always copy it to the computer you are using. Also, you can generate a common file based an a standard CRM and then set the service url runtime. This way you can resuse the same file over and over again! Great posting by the way! (this was not a question) Regards, Gustaf Westerlund

  • Anonymous
    May 17, 2007
    Hi,I did all this things and Visual Studio build the solution perfectly. The problem is that the crm 3.0 don't do the callout action.Please help me...Thank you

  • Anonymous
    July 30, 2008
    The comment has been removed

  • Anonymous
    January 20, 2009
    PingBack from http://www.hilpers-esp.com/566410-callout-con-servicios-sin-visual