Nerfed Tech

April 9, 2008

SoapException and GetListItems and WebID

Filed under: Annoying, SharePoint 2007 — Folly @ 11:10 am

Having trouble using the MSDN documentation or the SDK documentation for making GetListItems work correctly?

It seems that the optional last parameter is not really optional, you have to include it. If you include it as a blank “” string or a null/nothing value, it still throws execptions….

1. If you are catching Exceptions on SOAP calls, stop. Start catching System.Web.Services.Protocols.SoapException .  There’s a member called “Details” which will give you the actual error, and not the generic soap exceptions.

2. The documentation says that the WebID field, if not given, will use the URL property of the Lists web service reference object. Well that should work right ? Well no… i guess they changed the way this property works. It appears to not be set. It appears that in an app.config file there is a config parameter that corresponds to this URL parameter. Im guessing that when the empty URL parameter is found, it goes to the app.config to find it, but it’s already passed the test for WebID, and so now it’s required.

This seems to be a change from the way  WSS 2.0 worked. An uneeded change. A stupid change.

Powered by WordPress