tags:

views:

93

answers:

1

Hi

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"&gt;&lt;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"&gt;&lt;Execute xmlns="http://schemas.microsoft.com/crm/2007/WebServices"&gt;&lt;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

A: 

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?

ryancrawcour