Tidak dapat memasukkan data Dynamics CRM melalui permintaan SOAP untuk tipe data Uang

Saya mencoba mengirim permintaan XML SOAP (diberikan di bawah) ke Microsoft Dynamics crm saya. Namun itu membuat saya salah. Saya menyadari bahwa itu akan terjadi jika saya menghindarinya

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

yang bertipe data Uang.
Permintaan lengkapnya terlihat seperti ini

            <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'>[email protected]</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>

person Soyeed    schedule 19.09.2013    source sumber
comment
Apakah Anda dapat menambahkan kesalahan pada masalah ini?? Sudahkah Anda menggunakan logger SOAP Dynamics CRM? Sekilas panggilan SOAP Anda terlihat benar.   -  person Campey    schedule 19.09.2013
comment
Bagaimana cara menggunakan logger SOAP dinamika   -  person Soyeed    schedule 19.09.2013
comment
Unduh Dynamics CRM SDK dan di folder samplecode\cs\client\soaplogger\soaplogger Anda akan menemukan aplikasi SOAP Logger. Anda kemudian dapat membuat ulang masalah di atas menggunakan kode C# dan Anda akan bisa mendapatkan panggilan SOAP yang berfungsi di file output.txt.   -  person Campey    schedule 19.09.2013


Jawaban (1)


Melihat kueri Anda sepertinya namespace Anda salah.

Coba ubah menjadi "b:Money" bukan "a:Money"

       <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>
person Campey    schedule 19.09.2013
comment
Terima kasih banyak.. berhasil :) - person Soyeed; 19.09.2013
comment
Bagaimana jika hal yang sama berlaku untuk nomor? - person Soyeed; 19.02.2014
comment
ini bit integer saya (bilangan bulat) ` ‹b:KeyValuePairOfstringanyType› ‹c:key›scy_numberofemployees‹/c:key› ‹c:value i:type='b:Integer'›‹b:Value›23‹/b :Nilai›‹/c:nilai› ‹/b:KeyValuePairOfstringanyType› ` - person Soyeed; 19.02.2014
comment
Untuk bilangan bulat harusnya int dan bukan bilangan bulat. Misalnya: ‹a:keyvaluepairofstringanytype› ‹b:key›‹!-- NAMA SKEMA KOLOM CRM DI SINI!! --›‹/b:key› ‹b:value i:type=c:int xmlns:c=w3.org/2001/XMLSchema›‹!-- NILAI ATRIBUT DI SINI!! --›‹/b:value› ‹/a:keyvaluepairofstringanytype› - person Campey; 20.02.2014