locked
Error calling Dynamics CRM webservice with SOAPUI RRS feed

  • Question

  • I'm trying to call webservice of Dynamics CRM 2013 with SOAP UI. Here is my request:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:web="http://schemas.microsoft.com/crm/2007/WebServices"
    xmlns:cor="http://schemas.microsoft.com/crm/2007/CoreTypes">
    
       <soapenv:Header>
          <web:CorrelationToken>
             <cor:CorrelationId>00000000-0000-0000-0000-000000000001</cor:CorrelationId>
            <cor:Depth>1</cor:Depth>
          </web:CorrelationToken>
          <web:CallerOriginToken>
         </web:CallerOriginToken>
          <web:CrmAuthenticationToken>
             <cor:AuthenticationType>0</cor:AuthenticationType>
            <!--Optional:-->
             <cor:OrganizationName>myorgname</cor:OrganizationName>
             <cor:CallerId>347E3DFD-0914-E411-93F2-00155D027C07</cor:CallerId>
          </web:CrmAuthenticationToken>
       </soapenv:Header>
       <soapenv:Body>
          <web:Retrieve>
             <!--Optional:-->
             <web:entityName>contact</web:entityName>
             <web:id>75B27E0B-C923-E411-93F2-00155D027C07</web:id>
         </web:Retrieve>
       </soapenv:Body>
    </soapenv:Envelope>

    But I got following response:

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault>
    
    <faultcode>soap:Server</faultcode><faultstring>Server was unable to process request
    </faultstring><detail><error>
      <code>0x80040216</code>
      <description>An unexpected error occurred.</description>
      <type>Platform</type>
    </error></detail></soap:Fault></soap:Body></soap:Envelope>

    So I turned on trace, but it is the only what I have in trace file:

    Process: w3wp |Organization:35da4c60-80ee-419c-ba3f-273ef6a661a9 |Thread:   24 |Category: Platform.Sdk |User: 347e3dfd-0914-e411-93f2-00155d027c07 |Level: Error |ReqId: e9102fb9-9e4f-4859-9b1c-bc7e9cf79e36 | CompositeSoapExtensionExceptionHandler.Handle  ilOffset = 0xF
    >CrmSoapExtension detected non-CrmException - report will be sent to Watson:
       at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
       at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()

    I read SO and MSDN but can't figure out what's going wrong. Any ideas how to fix it?

    If somebody successfully calling MS CRM webservice with SOAPUI, I will be very pleased if you will provide me sample request

    Thursday, August 21, 2014 10:15 AM

All replies

  • I doubt you can do this via SoapUI because you need to hand craft a valid Authentication token. SDK has some details on how to invoke the API from non .NET clients such as Java & how to create the SOAP request.
    • Proposed as answer by Caratacus Thursday, August 21, 2014 11:05 AM
    Thursday, August 21, 2014 11:04 AM