શ્રેણી આર્કાઇવ્ઝ: lists.asmx

ઝડપી અને સરળ: "અમાન્ય URL પરિમાણ ઉકેલો” lists.asmx માં UpdateListItems સાથે સમસ્યા

When working with UpdateListItems via lists.asmx, it’s easy to generate the error:

Invalid URL Parameter.

The URL provided contains an invalid Command or Value. Please check the URL again.

You can get this error when you forget to include ID in the the list of fields to update.  આ, like a lot of these SP web services, is a bit counterintuitive since you need to include the ID in the ID attribute of the <Method> element.  And you’re not updated ID and probably never want to in the first place.

This SOAP envelope works:

<soapenv:એન્વેલપ xmlns:soapenv ='http://schemas.xmlsoap.org/soap/envelope/'>
  <soapenv:સંસ્થા>                      
    <UpdateListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>                     
      <ખરાઉ>{C712E2EA-54E1-47AD-9D99-1848C7773E2F}</ખરાઉ>                     
        <updates>                     
         <Batch OnError="Continue">
          <Method ID="1" Cmd="Update">
            <Field Name="CooperativeLock">locked!</ક્ષેત્ર>
            <Field Name="ID">1</ક્ષેત્ર>
          </Method>
        </Batch>                     
        </updates>                
      </UpdateListItems>             
  </soapenv:સંસ્થા>         
</soapenv:પરબીડિયું>

If you strip out the ID field reference then you’ll get the annoying “Invalid URL parameter” message.

</અંત>

undefinedમારા બ્લોગ પર સબ્સ્ક્રાઇબ કરો.

Twitter પર મને ખાતે અનુસરો http://www.twitter.com/pagalvin