Tuesday, April 5, 2011

Get Full WSDL Schema For Organization Service in Microsoft Dynamics CRM 2011

When I first downloaded CRM 2011 I remember thinking it would be a lot of fun to take a crack at the new 2011 CRM web schemato see what all was in there and what the new schema looked like.  Much to my dissapointment there was very little in there.  Where were the entities?  Where were the new messages?  This frustration has repeated itself several times now in the forums as well.

It turns out that there is a quick 2 step process you can do to get exactly what you are looking for. 

Here is how it works:

1. First, download the WSDL for the Organization Service from Settings - Customizations - Developer Resources



Now, once you have saved the WSDL to a location open it in any XML editor or viewer.

 Examine the wsdl to find the <wsdl:import> tag and the url you want browse to obtain the entire WSDL will be in the "location=" attribute of the tag.

It appears to take this form:
http://<<servername>>/<<orgname>>/XRMServices/2011/Organization.svc?wsdl=wsdl0

Here is an example of finding it in my WSDL:




Now just browse to the location highlighted above and you will have the complete WSDL for the Organization Service.

I hope this helps!

8 comments:

  1. Hi,

    May I know where can a dynamics CRM developer use this WSDL? In which conditions we need to access it? Could you please give an example?

    ReplyDelete
  2. Most things you pont at the CRM service will pick up on the fact that the WSDL:Import tag is there and handle this automatically. There were people in the forums though that explicitly wanted to be able to see the schema.

    I worked with two questions just yesterday regarding this.

    The reason you use WSDL is to code against web-services. You can import it in Visual Studio as a web reference and use it to create proxy classes and such.

    Web services are the main way you interact with CRM programmatically if you want your implementation to be supported by Microsoft.

    Here is a link to the 2011 SDK for your review. It has a lot more code samples and such.

    http://www.microsoft.com/downloads/en/details.aspx?FamilyID=420f0f05-c226-4194-b7e1-f23ceaa83b69

    ReplyDelete
  3. Hi, As you told I got the complete wsdl for the discovery service. And when I convert this wsdl to java using the build.bat file I did not get the complete java classes. Some main classes are missing.I think I have to merge these two wsdls and then convert to yield the complete java classes. Is int it?? If it is correct how to merge these two wsdls??pls rply......

    ReplyDelete
  4. I don't know a whole lot about what is supposed to be in the discovery service, the main CRM messages I usually deal with are in the organization service. The most common construct to get your entity classes available in code using .NET is through the crmsvcutil.exe

    ReplyDelete
  5. we hav downloaded the organization.wsdl from ms CRM 2011.While trying to convert this wsdl to java using Axis the following error appear on command prompt

    Parsing XML file: Organization.wsdl
    Retrieving document at 'http:////XRMServices/2011/Organization.svc
    ?wsdl=wsdl0', relative to 'file:/E:/mscrm2011/Organization/Organization1/Organiz
    ation.wsdl'.
    java.io.IOException: ERROR: Missing element inFault "OrganizationSe
    rviceFaultFault" in operation "OrganizationServiceFaultFault", in binding Create



    Inside the Organization.wsdl there is one import Tag



    that is why the Retrieving document at 'http://............

    ReplyDelete
  6. I don't know much about working with the CRM service in Java, but I am wondering if what you are trying to do might not be better served by using the CrmSvcUtil.exe tool

    ReplyDelete
  7. Good post..Jamie is there any tool for retrieving the schema of all the entities in the MSCRM 2011 Online...

    ReplyDelete
  8. You can use crmvcutil.exe that comes with the CRM SDK and it will even generate .NET classes for you. Do a Google search for Microsoft Dynamics CRM 2011 SDK to find the download.

    ReplyDelete