无论我如何尝试,我都会不断收到 MSCRM 4.0 抛出的以下异常
请求 SetStateITG_glcode 的输入 XML 格式无效:缺少必需字段“EntityId”
此处是从 WireShark 捕获的 SoapEnvelope,转到 MSCRM,您可以在其中看到实际上有一个 EntityId 元素。
<s:Body><ns0:Execute xmlns:ns0="http://schemas.microsoft.com/crm/2007/WebServices" xmlns:ns3="http://microsoft.com/wsdl/types/" xmlns:ns4="http://schemas.microsoft.com/crm/2006/WebServices" xmlns:ns6="http://schemas.microsoft.com/crm/2006/Scheduling" xmlns:ns2="http://schemas.microsoft.com/crm/2006/CoreTypes" xmlns:ns5="http://schemas.microsoft.com/crm/2006/Query" xmlns:ns1="http://schemas.microsoft.com/crm/2007/CoreTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ns0:Request xsi:type="ns0:SetStateITG_glcodeRequest"><ns0:OptionalParameters/><ns0:EntityId>f0754ebf-50d2-de11-93aa-000c29af16b6</ns0:EntityId><ns0:ITG_glcodeState>Active</ns0:ITG_glcodeState><ns0:ITG_glcodeStatus>1</ns0:ITG_glcodeStatus></ns0:Request></ns0:Execute></s:Body></s:Envelope>
这是 Wireshark 再次捕获的提交给 MSCRM 的 SOAP 主体;此消息来自我编写的一个快速控制台应用程序,该应用程序是为了通过上面的 Web 服务客户端尝试进行更新。
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Execute xmlns="http://schemas.microsoft.com/crm/2007/WebServices"><Request xsi:type="SetStateITG_glcodeRequest"><OptionalParameters/><EntityId>c2fcef74-19cf-de11-9376-000c29af16b6</EntityId><ITG_glcodeState>Inactive</ITG_glcodeState><ITG_glcodeStatus>-1</ITG_glcodeStatus></Request></Execute></s:Body>
第二条消息工作; MSCRM 做了它应该做的事情。
第一个,除了命名空间前缀之外,是相同的结构......据我所知。
我错过了一些明显的东西吗?
MSCRM 抱怨什么?
谢谢
No matter what i attempt i keep getting the following exception being thrown by MSCRM 4.0
Invalid format of input XML for request SetStateITG_glcode: required field 'EntityId' is missing
here is the captured SoapEnvelope from WireShark going to MSCRM where you can see that there is in fact a EntityId element.
<s:Body><ns0:Execute xmlns:ns0="http://schemas.microsoft.com/crm/2007/WebServices" xmlns:ns3="http://microsoft.com/wsdl/types/" xmlns:ns4="http://schemas.microsoft.com/crm/2006/WebServices" xmlns:ns6="http://schemas.microsoft.com/crm/2006/Scheduling" xmlns:ns2="http://schemas.microsoft.com/crm/2006/CoreTypes" xmlns:ns5="http://schemas.microsoft.com/crm/2006/Query" xmlns:ns1="http://schemas.microsoft.com/crm/2007/CoreTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ns0:Request xsi:type="ns0:SetStateITG_glcodeRequest"><ns0:OptionalParameters/><ns0:EntityId>f0754ebf-50d2-de11-93aa-000c29af16b6</ns0:EntityId><ns0:ITG_glcodeState>Active</ns0:ITG_glcodeState><ns0:ITG_glcodeStatus>1</ns0:ITG_glcodeStatus></ns0:Request></ns0:Execute></s:Body></s:Envelope>
here is SOAP body submitted to MSCRM captured again by Wireshark; this message came from a quick console application i wrote to do the update i am trying through my web service client above.
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Execute xmlns="http://schemas.microsoft.com/crm/2007/WebServices"><Request xsi:type="SetStateITG_glcodeRequest"><OptionalParameters/><EntityId>c2fcef74-19cf-de11-9376-000c29af16b6</EntityId><ITG_glcodeState>Inactive</ITG_glcodeState><ITG_glcodeStatus>-1</ITG_glcodeStatus></Request></Execute></s:Body>
the second message work; and MSCRM does what it is meant to do.
the first one, which other than the namespace prefixes, is the same structure ... as far as i can see.
am i missing something obvious?
what is MSCRM moaning about?
Thanks
发布评论
评论(1)
所以这个问题已经解决了...
结果 MSCRM 不喜欢 ns0 的命名空间前缀
MSCRM 是否使用基于自定义字符串解析的 Xml vlaidator 还是其他可笑的东西?
so this problem is fixed...
turns out MSCRM didn't like the namespace prefix of ns0
is MSCRM using a custom string parsing based Xml vlaidator or something ridiculous?