繁体   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