Lists.asmx, GetList na "Thamani hawezi kuwa null”

Niligundua kwamba leo GetList() method in lists.asmx web service has to be called very carefully or it’s prone to throw a mysterious “Value cannot be null” exception (na hiyo ni kuchukua unaweza kupata nyuma ujumbe mbaya zaidi generic kosa, “Exception of type ‘Microsoft.SharePoint.SoapServer.SoapServerException’ akatupwa. ")  Hasa, I found that you can’t provide any kind of prefix on the GetList method.  The following jQuery snippet illustrates the point:

image

If you do that, the web service responds with “Value cannot be null” as per this fiddler-provided HTTP transcript:

<?xml version="1.0" encoding="utf-8"?>
  <soap:Bahasha
     xmlns:soap="
http://schemas.xmlsoap.org / sabuni / bahasha /"    
     xmlns:xsi=”
http://www.w3.org/2001/XMLSchema-instance"
     xmlns:xsd="
http://www.w3.org/2001/XMLSchema">

  <soap:Mwili>
    <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>
        Exception of type ‘Microsoft.SharePoint.SoapServer.SoapServerException’ was thrown.
      </faultstring>
      <detail>
        <errorstring xmlns="
http://schemas.microsoft.com / SharePoint / sabuni /">
Value cannot be null.
        </errorstring>
      </detail>
    </soap:Fault>
  </soap:Mwili>
</soap:Bahasha>

Bila shaka, you probably wouldn’t add that “s0” prefix on your own, but some tools are prone to do it (like Eclipse).

This is all the more confusing / frustrating because other methods tolerate prefixes.  Kwa mfano, the GetListCollection Njia haina akili kama imekuwa ni prefixed, hata na viambishi awali nonsense kama "xyzzy":

image

Hii "thamani hawezi kuwa null" inaonekana haki ya kawaida na lists.asmx hivyo hopefully hii itasaidia mtu nje katika siku zijazo.

</mwisho>

Kujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Wazo moja juu ya "Lists.asmx, GetList na "Thamani hawezi kuwa null”

Kuondoka Reply

Anwani yako si kuchapishwa. Mashamba required ni alama *