English 中文(简体)
"required field EntityId is missing" error
原标题:

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

最佳回答

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?

问题回答

暂无回答




相关问题
The given key was not present in the dictionary

I am trying to make a simple plugin for MS Dynamics CRM 4.0 where send data of a salesorder in a SOAP message on the update of the order. The strange thing is that I get this error every other time i ...

Creating a PDF of a Dynamics CRM 4.0 report programmatically

We are currently in the midst of upgrading our CRM 3.0 installation to CRM 4.0. One of the things we were doing from our external web site is pulling a PDF of a report using the ReportViewer control ...

"required field EntityId is missing" error

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 ...

热门标签