locked
An unexpected error occurred. when postong XML to the SOAP. RRS feed

  • Question

  • Hello All.

    I am building an application to connect from PHP to the MSCRM.

    I have created this XML and trying to send it to the SOAP server at "
    http://mscrmone:5555/MSCrmServices/2007/CrmService.asmx" (its a local installation with Active directory authentication).

    I am able to get CrmTicket and Organization from the discovery service without problem.

    I am sending this XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"  
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
    <SOAP-ENV:Header>
    <CrmAuthenticationToken xmlns="http://schemas.microsoft.com/crm/2007/WebServices">
    <AuthenticationType xmlns="http://schemas.microsoft.com/crm/2007/CoreTypes">0</AuthenticationType>
    <CrmTicket xmlns="http://schemas.microsoft.com/crm/2007/CoreTypes">PAA/AHgAbQBsACAAdgBlAHIAcwBpAG8AbgA9ACIAMQAuADAAIgA/AD4ADQAKADwAVABpAGMAawBlAHQAIAB4AG0AbABuAHMAOgB4AHMAaQA9ACIAaAB0AHQAcAA6AC8A
    LwB3AHcAdwAuAHcAMwAuAG8AcgBnAC8AMgAwADAAMQAvAFgATQBMAFMAYwBoAGUAbQBhAC0AaQBuA
    HMAdABhAG4AYwBlACIAIAB4AG0AbABuAHMAOgB4AHMAZAA9ACIAaAB0AHQAcAA6AC8ALwB3AHcAdw
    AuAHcAMwAuAG8AcgBnAC8AMgAwADAAMQAvAFgATQBMAFMAYwBoAGUAbQBhACIAIAB4AHMAaQA6AG4
    AaQBsAD0AIgB0AHIAdQBlACIAIAAvAD4A</CrmTicket>
    <OrganizationName xmlns="http://schemas.microsoft.com/crm/2007/CoreTypes">ReutOneCRM</OrganizationName>
    <CallerId xmlns="http://schemas.microsoft.com/crm/2007/CoreTypes">655075e3-81fa-440e-a5e5-aa9925fe11ee</CallerId>
    </CrmAuthenticationToken>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
    <RetrieveMultiple xmlns="http://schemas.microsoft.com/crm/2007/WebServices">
    <query xsi:type="QueryExpression">
    <EntityName xmlns="http://schemas.microsoft.com/crm/2006/Query">contact</EntityName>
    <ColumnSet xmlns="http://schemas.microsoft.com/crm/2006/Query" xsi:type="ColumnSet">
    <Attributes>
    <Attribute>fullname</Attribute>
    </Attributes>
    </ColumnSet>
    <Distinct xmlns="http://schemas.microsoft.com/crm/2006/Query">false</Distinct>
    <Criteria xmlns="http://schemas.microsoft.com/crm/2006/Query">
    <FilterOperator xmlns="http://schemas.microsoft.com/crm/2006/Query">And</FilterOperator>
    <Conditions xmlns="http://schemas.microsoft.com/crm/2006/Query">
    <Condition xmlns="http://schemas.microsoft.com/crm/2006/Query">
    <AttributeName xmlns="http://schemas.microsoft.com/crm/2006/Query">address1_city</AttributeName>
    <Operator xmlns="http://schemas.microsoft.com/crm/2006/Query">Like</Operator>
    <Values xmlns="http://schemas.microsoft.com/crm/2006/Query">
    <Value xmlns="http://schemas.microsoft.com/crm/2006/Query">Haifa</Value>
    </Values>
    </Condition>
    </Conditions>
    </Criteria>
    </query>
    </RetrieveMultiple>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>



    and I am getting:

    Code Snippet

    <?xml version="1.0" encoding="utf-8"?>>

    <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:Client</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






    UPD: I am talking about MSCRM 4.0.
    Tuesday, September 16, 2008 2:28 PM

Answers

  • A Crm Ticket is not required for an on premise setup with AD authentication. It is required only for IFD, and Online.

    Try removing it from your SOAP request.

     

    Tuesday, September 16, 2008 3:38 PM
  • The error you are receiving is a generic Soap error.  I would recommend turning on CRM Tracing to get a more detailed error.  You can turn it on through registry keys or using a tool available here
    Wednesday, September 17, 2008 6:37 PM
    Moderator

All replies

  • A Crm Ticket is not required for an on premise setup with AD authentication. It is required only for IFD, and Online.

    Try removing it from your SOAP request.

     

    Tuesday, September 16, 2008 3:38 PM
  •  

    I have tried without the CrmTicket, and With it... same error.

     

    Any other Ideas?

    Wednesday, September 17, 2008 5:38 PM
  • The error you are receiving is a generic Soap error.  I would recommend turning on CRM Tracing to get a more detailed error.  You can turn it on through registry keys or using a tool available here
    Wednesday, September 17, 2008 6:37 PM
    Moderator
  • Try using a different message, for example fetch, or create and see if it works. This way we can reduce the surface area of the problem.

    Thursday, September 18, 2008 3:56 PM