SOAP调用CRM 2016中的XML前缀属性
我正在通过SOAPUI向CRM 2016组织进行SOAP呼叫。以下是工作电话:SOAP调用CRM 2016中的XML前缀属性,xml,soap,dynamics-crm,Xml,Soap,Dynamics Crm,我正在通过SOAPUI向CRM 2016组织进行SOAP呼叫。以下是工作电话: <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <Execute xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:i="http://www.w3.org/2001/XMLSchema-insta
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<Execute xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<request i:type="a:CreateRequest" 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>Target</b:key>
<b:value i:type="a:Entity">
<a:Attributes>
<a:KeyValuePairOfstringanyType>
<b:key>subject</b:key>
<b:value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">SOAP UI Task</b:value>
</a:KeyValuePairOfstringanyType>
<a:KeyValuePairOfstringanyType>
<b:key>description</b:key>
<b:value i:type="c:string" xmlns:c="http://www.w3.org/2001/XMLSchema">This is a test task created by SOAP UI.</b:value>
</a:KeyValuePairOfstringanyType>
<a:KeyValuePairOfstringanyType>
<b:key>regardingobjectid</b:key>
<b:value i:type="a:EntityReference">
<a:Id>10A25151-5331-E711-80D0-000C2995F954</a:Id>
<a:LogicalName>test_salesorder</a:LogicalName>
<a:Name i:nil="true" />
</b:value>
</a:KeyValuePairOfstringanyType>
<a:KeyValuePairOfstringanyType>
<b:key>test_tasktype</b:key>
<b:value i:type="a:OptionSetValue">
<a:Value>970390000</a:Value>
</b:value>
</a:KeyValuePairOfstringanyType>
</a:Attributes>
<a:EntityState i:nil="true" />
<a:FormattedValues />
<a:Id>00000000-0000-0000-0000-000000000000</a:Id>
<a:LogicalName>test_ordertask</a:LogicalName>
<a:RelatedEntities />
</b:value>
</a:KeyValuePairOfstringanyType>
</a:Parameters>
<a:RequestId i:nil="true" />
<a:RequestName>Create</a:RequestName>
</request>
</Execute>
在这种情况下,它是强制性的。属性,就像元素可以有名称空间一样。必须为nillable元素设置的默认属性有一个名称空间,因此需要设置它。如果不符合,则不符合XML模式定义,也不会进行验证
nil属性在XML架构实例命名空间中定义,
(通常与
前缀xsi),并且仅适用于XML实例文档,而不适用于XML
模式文档。XML中xsi:nil属性的值为true
元素显式指定该元素没有内容,无论
子元素或正文文本
<a:EntityState i:nil="true" />
to
<a:EntityState nil="true" />