我正在尝试向我的 Microsoft Dynamics crm 发送一个 XML SOAP 请求(如下所示)。但是它给我带来了错误。我意识到如果我避免它就会通过
<b:KeyValuePairOfstringanyType>
<c:key>new_grantprojecttotalcost</c:key>
<c:value i:type='a:Money'><b:Value>1234.00</b:Value></c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>new_grantprojectfundingrequired</c:key>
<c:value i:type='a:Money'><b:Value>123.00</b:Value></c:value>
</b:KeyValuePairOfstringanyType>
这是数据类型Money。
完整的请求如下所示
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"
xmlns:a="http://www.w3.org/2005/08/addressing"
xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<a:Action s:mustUnderstand="1">
http://schemas.microsoft.com/xrm/2011/Contracts/Services/IOrganizationService/Create</a:Action>
<a:MessageID>
urn:uuid:6511f419-3d6d-446f-852e-ffd1169d1d14</a:MessageID>
<a:ReplyTo>
<a:Address>
http://www.w3.org/2005/08/addressing/anonymous</a:Address>
</a:ReplyTo>
<VsDebuggerCausalityData xmlns="http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink">
uIDPozJEz+P/wJdOhoN2XNauvYcAAAAAK0Y6fOjvMEqbgs9ivCmFPaZlxcAnCJ1GiX+Rpi09nSYACQAA</VsDebuggerCausalityData>
<a:To s:mustUnderstand="1">
https://scy.crm4.dynamics.com/XRMServices/2011/Organization.svc</a:To>
<o:Security s:mustUnderstand="1"
xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2013-09-19T05:27:01.35Z</u:Created>
<u:Expires>2013-09-19T05:32:01.35Z</u:Expires>
</u:Timestamp>
<EncryptedData Id="Assertion0"
Type="http://www.w3.org/2001/04/xmlenc#Element"
xmlns="http://www.w3.org/2001/04/xmlenc#">
<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc">
</EncryptionMethod>
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<EncryptedKey>
<EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
</EncryptionMethod>
<ds:KeyInfo Id="keyinfo">
<wsse:SecurityTokenReference xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:KeyIdentifier EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier">
</wsse:KeyIdentifier>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
<CipherData>
<CipherValue>
</CipherValue>
</CipherData>
</EncryptedKey>
</ds:KeyInfo>
<CipherData>
<CipherValue>
</CipherValue>
</CipherData>
</EncryptedData>
</o:Security>
</s:Header>
<s:Body>
<Create xmlns='http://schemas.microsoft.com/xrm/2011/Contracts/Services'>
<entity xmlns:b='http://schemas.microsoft.com/xrm/2011/Contracts' xmlns:i='http://www.w3.org/2001/XMLSchema-instance'>
<b:Attributes xmlns:c='http://schemas.datacontract.org/2004/07/System.Collections.Generic'><b:KeyValuePairOfstringanyType>
<c:key>scy_name</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>Business Grant Programme Application</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>new_fullname</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>Aboo Tafadar4</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>new_jobtitle</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>Iquara</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>scy_accountname</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>Iquara</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>scy_emailaddress</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>soyeed2004@gmail.com</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>scy_contactphone</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>913642225808</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>scy_addressline1</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>Bivar Road</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>scy_addressline2</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>aaaa</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>scy_addressline3</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>Iquara Ltd, Catalyst</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>scy_city</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>York</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>scy_postcode</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>yo103jy</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>new_registeredaddress1</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>Iquara Ltd, Catalyst</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>new_registeredaddress2</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>University of York</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>new_registeredaddress3</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>Iquara Ltd, Catalyst</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>new_registeredcity</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>York</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>new_registeredpostcode</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>yo103jy</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>scy_websiteurl</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>iquara</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>scy_companynumber</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>1787686</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>new_yearstartedtrading</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>1980</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>scy_description</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>hghghjg</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>new_grantprojectdescription</c:key>
<c:value i:type='d:string' xmlns:d='http://www.w3.org/2001/XMLSchema'>khkkjh</c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>new_grantprojecttotalcost</c:key>
<c:value i:type='a:Money'><b:Value>1234.00</b:Value></c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>new_grantprojectfundingrequired</c:key>
<c:value i:type='a:Money'><b:Value>123.00</b:Value></c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>scy_leadsource</c:key>
<c:value i:type='b:OptionSetValue'><b:Value>798110007</b:Value></c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>new_sendmarketinginfo</c:key>
<c:value i:type='b:OptionSetValue'><b:Value>100000001</b:Value></c:value>
</b:KeyValuePairOfstringanyType><b:KeyValuePairOfstringanyType>
<c:key>new_grantprojecteligibility</c:key>
<c:value i:type='b:OptionSetValue'><b:Value>100000000</b:Value></c:value>
</b:KeyValuePairOfstringanyType></b:Attributes>
<b:EntityState i:nil='true'/>
<b:FormattedValues xmlns:c='http://schemas.datacontract.org/2004/07/System.Collections.Generic'/>
<b:Id>00000000-0000-0000-0000-000000000000</b:Id>
<b:LogicalName>scy_webformrecord</b:LogicalName>
<b:RelatedEntities xmlns:c='http://schemas.datacontract.org/2004/07/System.Collections.Generic'/>
</entity>
</Create>
</s:Body>
</s:Envelope>