簡體   English   中英

如何通過SOAPui從Microsoft Dynamics CRM 2015獲取數據或檢索數據

[英]How to get data or retrieve data from Microsoft Dynamics CRM 2015 through SOAPui

我知道這可能是重復的問題,但是在2015年版本中,我在獲取數據時遇到了一些問題。

我已經閱讀了與此主題相關的所有博客,但未能成功。

我已按照以下步驟獲取數據。

  1. 從http:// {server} / {OrgName} /XRMServices/2011/Organization.svc在SOAPui中加載的項目
  2. 編輯端點,在Organisation.svc之后添加/ web
  3. 添加了身份驗證。 (用戶名,密碼,域)
  4. 添加了內容類型,SOAPAction,接受

我仍然收到錯誤請求錯誤。

請幫忙。 如有可能,請提供一些樣品。

謝謝。

設置請求的方法如下,請確保設置正確:

  1. 創建一個指向http://<organization url>/XrmServices/2011/Organization.svc?wsdl的SOAP項目(您必須進行身份驗證)

  2. 為需要創建的w / e創建新請求

  3. 在請求中,將“ Authentication設置為NTLM (提供憑據)

  4. 在請求中,您將需要三個這樣的Headers (如果已在其中,請仔細檢查它們):

    4.1。 SOAPAction從請求接口屬性復制/粘貼它

    4.2 Accept application/xml, text/xml, */*

    4.3 Content-Type text/xml; charset=utf-8 text/xml; charset=utf-8

  5. 提供格式正確的請求並繼續

例如,這是RetrieveEntityRequest樣子(特別是它將返回account實體的元數據):

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header><a:SdkClientVersion xmlns:a="http://schemas.microsoft.com/xrm/2011/Contracts">6.0</a:SdkClientVersion></soapenv:Header>
<soapenv:Body>
 <Execute xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <request i:type="a:RetrieveEntityRequest" xmlns:a="http://schemas.microsoft.com/xrm/2011/Contracts">
   <a:Parameters xmlns:b="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
    <a:KeyValuePairOfstringanyType>
     <b:key>EntityFilters</b:key>
     <b:value i:type="c:EntityFilters" xmlns:c="http://schemas.microsoft.com/xrm/2011/Metadata">Attributes</b:value>
    </a:KeyValuePairOfstringanyType>
    <a:KeyValuePairOfstringanyType>
     <b:key>MetadataId</b:key>
     <b:value i:type="ser:guid"  xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/">00000000-0000-0000-0000-000000000000</b:value>
    </a:KeyValuePairOfstringanyType>
    <a:KeyValuePairOfstringanyType>
     <b:key>RetrieveAsIfPublished</b:key>
     <b:value i:type="c:boolean" xmlns:c="http://www.w3.org/2001/XMLSchema">true</b:value>
    </a:KeyValuePairOfstringanyType>
    <a:KeyValuePairOfstringanyType>
     <b:key>LogicalName</b:key>
       <b:value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">account</b:value>
    </a:KeyValuePairOfstringanyType>
   </a:Parameters>
   <a:RequestId i:nil="true" />
   <a:RequestName>RetrieveEntity</a:RequestName>
  </request>
 </Execute>
</soapenv:Body>
</soapenv:Envelope>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM