[Fedora-suds-list] Suds and Sharepoint, Again

Kevin kehander at yahoo.com
Thu Jul 9 21:08:52 UTC 2009


Hello,

I recently started poking at Sharepoint with Suds again, and encountered a new problem.  I'm not sure if its particular to Suds, but maybe someone can help point me in the right direction.

I'm trying to use the WebPartPages service, which I can retrieve from the WSDL without any problems.  It's referred to as c_parts in the code below.

import logging
logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.bindings.unmarshaller').setLevel(logging.DEBUG)
stor = c_parts.factory.create('Storage')
SomeWebPartProperties = c_parts.service.GetWebPartProperties('http://somewhere/something.aspx',stor.Shared)

At this point I get:

DEBUG:suds.bindings.unmarshaller:reset
WARNING:suds.bindings.unmarshaller:attribute (ID) type, not-found
WARNING:suds.bindings.unmarshaller:attribute (ID) type, not-found
WARNING:suds.bindings.unmarshaller:attribute (ID) type, not-found

Nonetheless, SomeWebPartProperties contains useful, useable data.  In particular, what I assume is the complete content of a particular Web Part is found at SomeWebPartProperties.WebParts.WebPart[0].

The problem comes when I use:

SomeWebPart = SomeWebPartProperties.WebParts.WebPart[0]
c_parts.service.AddWebPart('http://somewhere/else.aspx',SomeWebPart,stor.Shared)

This results in a very long error message that ends in

File "C:\Python25\lib\site-packages\suds\bindings\marshaller.py", line 545, in start
TypeNotFound: Type not found: '_ID'

This is rather confusing, as line 545 of marshaller.py doesn't seem to be in Literal.start.  The documentation at http://msdn.microsoft.com/en-us/library/ms774670.aspx suggests that the XML object doesn't even need to have ID or _ID properties, but deleteing them (i.e. "del(SomeWebPart.ID)" ) and attempting to use AddWebPart again results in errors like

File "C:\Python25\lib\site-packages\suds\sudsobject.py", line 78, in footprint
AttributeError: WebPart instance has no attribute 'ID'

Any ideas what the problem is here?  I was thinking that perhaps the GUID type is defined in a different namespace, but I'm not sure which one or even what to do with that namespace if I find it.

-Kevin


      __________________________________________________________________
Connect with friends from any web browser - no download required. Try the new Yahoo! Canada Messenger for the Web BETA at http://ca.messenger.yahoo.com/webmessengerpromo.php




More information about the fedora-suds-list mailing list