From kehander at yahoo.com Wed Mar 4 22:37:51 2009 From: kehander at yahoo.com (kehander at yahoo.com) Date: Wed, 4 Mar 2009 14:37:51 -0800 (PST) Subject: [Fedora-suds-list] Suds and Sharepoint Message-ID: <67741.35535.qm@web110106.mail.gq1.yahoo.com> After much anguish, I finally hit upon the combination of Suds and python-ntlm that would let me access the WSDL on a SharePoint server.? This seems like my best bet for automating some SharePoint tasks. Alas, I'm a bit unclear as to where to go next.? So far I've been able to get meaningful information with the SiteData.GetList method, but something like, say, Lists.GetListItems remains elusive. The method is described at http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx and shows up in the suds client as GetListItems(xs:string listName, xs:string viewName, query query, viewFields viewFields, xs:string rowLimit, queryOptions queryOptions, xs:string webID, ) Running client.service.GetListItems('somelist') results in a lengthy backtrace that finishes with File "/usr/lib/python2.5/site-packages/suds/resolver.py", line 361, in findattr result, ancestry = self.getchild(name, parent) ValueError: need more than 0 values to unpack whereas client.service.GetListItems('somelist','whatever') ends with File "/usr/lib/python2.5/site-packages/suds/bindings/binding.py", line 178, in reply_composite raise Exception('tag (%s), not-found' % tag) Exception: tag (faultcode), not-found I've already been reading http://www.csharphelp.com/archives4/archive602.html and http://www.developer.com/tech/article.php/3104621 , but I can't quite understand how to apply it here. In particular, how do I supply what is referred to in the SDK as a "System.Xml.XmlNode" ? Is that something more than just a raw string containing XML code? Thanks, K. __________________________________________________________________ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now at http://ca.toolbar.yahoo.com. From kehander at yahoo.com Wed Mar 4 23:59:11 2009 From: kehander at yahoo.com (Kevin) Date: Wed, 4 Mar 2009 15:59:11 -0800 (PST) Subject: [Fedora-suds-list] Re: Suds and Sharepoint Message-ID: <467029.13610.qm@web110113.mail.gq1.yahoo.com> I think I got somewhere in regards to fixing this problem. (Sending messages to mailing lists tends to do that, no?) I replaced line 361 of Resolver.py with this: try: result, ancestry = self.getchild(name, parent) except ValueError: result = None The problematic methods then started returning recognizable objects that I could do something with. (I would file a bug if I had the slightest idea what was going on - it's not just a matter of poorly-chosen syntax, is it?) I'm still wondering about those "XmlNodes", though. -K --- On Wed, 3/4/09, kehander at yahoo.com wrote: > From: kehander at yahoo.com > Subject: Suds and Sharepoint > To: fedora-suds-list at redhat.com > Received: Wednesday, March 4, 2009, 3:37 PM > After much anguish, I finally hit > upon the combination of Suds and python-ntlm that would let > me access the WSDL on a SharePoint server.? This seems like > my best bet for automating some SharePoint tasks. > > Alas, I'm a bit unclear as to where to go next.? So far > I've been able to get meaningful information with the > SiteData.GetList method, but something like, say, > Lists.GetListItems remains elusive. > > The method is described at http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx > and shows up in the suds client as > > GetListItems(xs:string listName, xs:string viewName, query > query, viewFields viewFields, xs:string rowLimit, > queryOptions queryOptions, xs:string webID, ) > > Running client.service.GetListItems('somelist') results in > a lengthy backtrace that finishes with > > File "/usr/lib/python2.5/site-packages/suds/resolver.py", > line 361, in findattr > ? ? result, ancestry = self.getchild(name, > parent) > ValueError: need more than 0 values to unpack > > whereas client.service.GetListItems('somelist','whatever') > ends with? > > File > "/usr/lib/python2.5/site-packages/suds/bindings/binding.py", > line 178, in reply_composite > ? ? raise Exception('tag (%s), not-found' % tag) > Exception: tag (faultcode), not-found > > I've already been reading http://www.csharphelp.com/archives4/archive602.html and > http://www.developer.com/tech/article.php/3104621 , but > I can't quite understand how to apply it here.? In > particular, how do I supply what is referred to in the SDK > as a "System.Xml.XmlNode" ?? Is that something more > than just a raw string containing XML code? > > > Thanks, K. > > > ? ? ? > __________________________________________________________________ > Yahoo! Canada Toolbar: Search from anywhere on the web, and > bookmark your favourite sites. Download it now at > http://ca.toolbar.yahoo.com. > __________________________________________________________________ Get a sneak peak at messages with a handy reading pane with All new Yahoo! Mail: http://ca.promos.yahoo.com/newmail/overview2/ From jortel at redhat.com Thu Mar 5 13:54:04 2009 From: jortel at redhat.com (Jeff Ortel) Date: Thu, 05 Mar 2009 08:54:04 -0500 Subject: [Fedora-suds-list] Re: Suds and Sharepoint In-Reply-To: <467029.13610.qm@web110113.mail.gq1.yahoo.com> References: <467029.13610.qm@web110113.mail.gq1.yahoo.com> Message-ID: <49AFD97C.6090905@redhat.com> Hey Kevin, Thanks for you interest in suds. I've been pretty slammed this week but should be able to look in to this today. Any chance you can include the wsdl? Can I get access to this server? I can resolve questions much quicker if I can run through them on the workbench. -jeff Kevin wrote: > I think I got somewhere in regards to fixing this problem. (Sending messages to mailing lists tends to do that, no?) > > I replaced line 361 of Resolver.py with this: > > try: > result, ancestry = self.getchild(name, parent) > except ValueError: > result = None > > The problematic methods then started returning recognizable objects that I could do something with. (I would file a bug if I had the slightest idea what was going on - it's not just a matter of poorly-chosen syntax, is it?) > > I'm still wondering about those "XmlNodes", though. > > -K > > > > --- On Wed, 3/4/09, kehander at yahoo.com wrote: > >> From: kehander at yahoo.com >> Subject: Suds and Sharepoint >> To: fedora-suds-list at redhat.com >> Received: Wednesday, March 4, 2009, 3:37 PM >> After much anguish, I finally hit >> upon the combination of Suds and python-ntlm that would let >> me access the WSDL on a SharePoint server. This seems like >> my best bet for automating some SharePoint tasks. >> >> Alas, I'm a bit unclear as to where to go next. So far >> I've been able to get meaningful information with the >> SiteData.GetList method, but something like, say, >> Lists.GetListItems remains elusive. >> >> The method is described at http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx >> and shows up in the suds client as >> >> GetListItems(xs:string listName, xs:string viewName, query >> query, viewFields viewFields, xs:string rowLimit, >> queryOptions queryOptions, xs:string webID, ) >> >> Running client.service.GetListItems('somelist') results in >> a lengthy backtrace that finishes with >> >> File "/usr/lib/python2.5/site-packages/suds/resolver.py", >> line 361, in findattr >> result, ancestry = self.getchild(name, >> parent) >> ValueError: need more than 0 values to unpack >> >> whereas client.service.GetListItems('somelist','whatever') >> ends with >> >> File >> "/usr/lib/python2.5/site-packages/suds/bindings/binding.py", >> line 178, in reply_composite >> raise Exception('tag (%s), not-found' % tag) >> Exception: tag (faultcode), not-found >> >> I've already been reading http://www.csharphelp.com/archives4/archive602.html and >> http://www.developer.com/tech/article.php/3104621 , but >> I can't quite understand how to apply it here. In >> particular, how do I supply what is referred to in the SDK >> as a "System.Xml.XmlNode" ? Is that something more >> than just a raw string containing XML code? >> >> >> Thanks, K. >> >> >> >> __________________________________________________________________ >> Yahoo! Canada Toolbar: Search from anywhere on the web, and >> bookmark your favourite sites. Download it now at >> http://ca.toolbar.yahoo.com. >> > > > __________________________________________________________________ > Get a sneak peak at messages with a handy reading pane with All new Yahoo! Mail: http://ca.promos.yahoo.com/newmail/overview2/ > > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From kehander at yahoo.com Thu Mar 5 15:24:58 2009 From: kehander at yahoo.com (Kevin) Date: Thu, 5 Mar 2009 07:24:58 -0800 (PST) Subject: [Fedora-suds-list] Re: Suds and Sharepoint Message-ID: <743414.90952.qm@web110106.mail.gq1.yahoo.com> Thanks for replying. There seems to be a fair amount of interest out there in automating SharePoint tasks via Python - except that most people can't seem to get it to work. There's a list of public SharePoint examples at https://usmc-sharepoint.securespsites.com/Lists/Public%20SharePoint%20Examples/AllItems.aspx , including http://www.wssdemo.com/ . The WSDL files can be accessed as described in the developer.com article in my earlier message, e.g. http://www.wssdemo.com/_vti_bin/Lists.asmx?WSDL . -K --- On Thu, 3/5/09, Jeff Ortel wrote: > From: Jeff Ortel > Subject: Re: [Fedora-suds-list] Re: Suds and Sharepoint > To: "Kevin" > Cc: fedora-suds-list at redhat.com > Received: Thursday, March 5, 2009, 6:54 AM > Hey Kevin, > > Thanks for you interest in suds. > > I've been pretty slammed this week but should be able to > look in to this today. Any chance you can include the > wsdl? Can I get access to this server? I can > resolve questions much quicker if I can run through them on > the workbench. > > -jeff > > Kevin wrote: > > I think I got somewhere in regards to fixing this > problem. (Sending messages to mailing lists tends to > do that, no?) > > > > I replaced line 361 of Resolver.py with this: > > > > > try: > > > result, ancestry = self.getchild(name, > parent) > > > except ValueError: > > > result = None > > > > The problematic methods then started returning > recognizable objects that I could do something with. > (I would file a bug if I had the slightest idea what was > going on - it's not just a matter of poorly-chosen syntax, > is it?) > > > > I'm still wondering about those "XmlNodes", though. > > > > -K > > > > > > > > --- On Wed, 3/4/09, kehander at yahoo.com > > wrote: > > > >> From: kehander at yahoo.com > > >> Subject: Suds and Sharepoint > >> To: fedora-suds-list at redhat.com > >> Received: Wednesday, March 4, 2009, 3:37 PM > >> After much anguish, I finally hit > >> upon the combination of Suds and python-ntlm that > would let > >> me access the WSDL on a SharePoint server. > This seems like > >> my best bet for automating some SharePoint tasks. > >> > >> Alas, I'm a bit unclear as to where to go > next. So far > >> I've been able to get meaningful information with > the > >> SiteData.GetList method, but something like, say, > >> Lists.GetListItems remains elusive. > >> > >> The method is described at http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx > >> and shows up in the suds client as > >> GetListItems(xs:string listName, xs:string > viewName, query > >> query, viewFields viewFields, xs:string rowLimit, > >> queryOptions queryOptions, xs:string webID, ) > >> > >> Running client.service.GetListItems('somelist') > results in > >> a lengthy backtrace that finishes with > >> File > "/usr/lib/python2.5/site-packages/suds/resolver.py", > >> line 361, in findattr > >> result, ancestry = > self.getchild(name, > >> parent) > >> ValueError: need more than 0 values to unpack > >> > >> whereas > client.service.GetListItems('somelist','whatever') > >> ends with > >> File > >> > "/usr/lib/python2.5/site-packages/suds/bindings/binding.py", > >> line 178, in reply_composite > >> raise Exception('tag (%s), > not-found' % tag) > >> Exception: tag (faultcode), not-found > >> > >> I've already been reading http://www.csharphelp.com/archives4/archive602.html > and > >> http://www.developer.com/tech/article.php/3104621 , > but > >> I can't quite understand how to apply it > here. In > >> particular, how do I supply what is referred to in > the SDK > >> as a "System.Xml.XmlNode" ? Is that > something more > >> than just a raw string containing XML code? > >> > >> > >> Thanks, K. > >> > >> > >> > __________________________________________________________________ > >> Yahoo! Canada Toolbar: Search from anywhere on the > web, and > >> bookmark your favourite sites. Download it now at > >> http://ca.toolbar.yahoo.com. > >> > > > > > > > __________________________________________________________________ > > Get a sneak peak at messages with a handy reading pane > with All new Yahoo! Mail: http://ca.promos.yahoo.com/newmail/overview2/ > > > > > > _______________________________________________ > > fedora-suds-list mailing list > > fedora-suds-list at redhat.com > > https://www.redhat.com/mailman/listinfo/fedora-suds-list > __________________________________________________________________ Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/ From jortel at redhat.com Thu Mar 5 15:48:02 2009 From: jortel at redhat.com (Jeff Ortel) Date: Thu, 05 Mar 2009 10:48:02 -0500 Subject: [Fedora-suds-list] Re: Suds and Sharepoint In-Reply-To: <743414.90952.qm@web110106.mail.gq1.yahoo.com> References: <743414.90952.qm@web110106.mail.gq1.yahoo.com> Message-ID: <49AFF432.6030105@redhat.com> Thanks Kevin. I'm getting a (401) authorization error to start with. I quickly reviewed the links and didn't see any username/password credentials. Do you know of a username/password? As for the XmlNodes, I'll have to look through the wsdl to see whether it is XML or a string containing XML. Kevin wrote: > Thanks for replying. There seems to be a fair amount of interest out there in automating SharePoint tasks via Python - except that most people can't seem to get it to work. > > There's a list of public SharePoint examples at https://usmc-sharepoint.securespsites.com/Lists/Public%20SharePoint%20Examples/AllItems.aspx , including http://www.wssdemo.com/ . The WSDL files can be accessed as described in the developer.com article in my earlier message, e.g. http://www.wssdemo.com/_vti_bin/Lists.asmx?WSDL . > > -K > > --- On Thu, 3/5/09, Jeff Ortel wrote: > >> From: Jeff Ortel >> Subject: Re: [Fedora-suds-list] Re: Suds and Sharepoint >> To: "Kevin" >> Cc: fedora-suds-list at redhat.com >> Received: Thursday, March 5, 2009, 6:54 AM >> Hey Kevin, >> >> Thanks for you interest in suds. >> >> I've been pretty slammed this week but should be able to >> look in to this today. Any chance you can include the >> wsdl? Can I get access to this server? I can >> resolve questions much quicker if I can run through them on >> the workbench. >> >> -jeff >> >> Kevin wrote: >>> I think I got somewhere in regards to fixing this >> problem. (Sending messages to mailing lists tends to >> do that, no?) >>> I replaced line 361 of Resolver.py with this: >>> >>> >> try: >>> >> result, ancestry = self.getchild(name, >> parent) >>> >> except ValueError: >>> >> result = None >>> The problematic methods then started returning >> recognizable objects that I could do something with. >> (I would file a bug if I had the slightest idea what was >> going on - it's not just a matter of poorly-chosen syntax, >> is it?) >>> I'm still wondering about those "XmlNodes", though. >>> >>> -K >>> >>> >>> >>> --- On Wed, 3/4/09, kehander at yahoo.com >> >> wrote: >>>> From: kehander at yahoo.com >> >>>> Subject: Suds and Sharepoint >>>> To: fedora-suds-list at redhat.com >>>> Received: Wednesday, March 4, 2009, 3:37 PM >>>> After much anguish, I finally hit >>>> upon the combination of Suds and python-ntlm that >> would let >>>> me access the WSDL on a SharePoint server. >> This seems like >>>> my best bet for automating some SharePoint tasks. >>>> >>>> Alas, I'm a bit unclear as to where to go >> next. So far >>>> I've been able to get meaningful information with >> the >>>> SiteData.GetList method, but something like, say, >>>> Lists.GetListItems remains elusive. >>>> >>>> The method is described at http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx >>>> and shows up in the suds client as >>>> GetListItems(xs:string listName, xs:string >> viewName, query >>>> query, viewFields viewFields, xs:string rowLimit, >>>> queryOptions queryOptions, xs:string webID, ) >>>> >>>> Running client.service.GetListItems('somelist') >> results in >>>> a lengthy backtrace that finishes with >>>> File >> "/usr/lib/python2.5/site-packages/suds/resolver.py", >>>> line 361, in findattr >>>> result, ancestry = >> self.getchild(name, >>>> parent) >>>> ValueError: need more than 0 values to unpack >>>> >>>> whereas >> client.service.GetListItems('somelist','whatever') >>>> ends with >>>> File >>>> >> "/usr/lib/python2.5/site-packages/suds/bindings/binding.py", >>>> line 178, in reply_composite >>>> raise Exception('tag (%s), >> not-found' % tag) >>>> Exception: tag (faultcode), not-found >>>> >>>> I've already been reading http://www.csharphelp.com/archives4/archive602.html >> and >>>> http://www.developer.com/tech/article.php/3104621 , >> but >>>> I can't quite understand how to apply it >> here. In >>>> particular, how do I supply what is referred to in >> the SDK >>>> as a "System.Xml.XmlNode" ? Is that >> something more >>>> than just a raw string containing XML code? >>>> >>>> >>>> Thanks, K. >>>> >>>> >>>> >> __________________________________________________________________ >>>> Yahoo! Canada Toolbar: Search from anywhere on the >> web, and >>>> bookmark your favourite sites. Download it now at >>>> http://ca.toolbar.yahoo.com. >>>> >>> >>> >> __________________________________________________________________ >>> Get a sneak peak at messages with a handy reading pane >> with All new Yahoo! Mail: http://ca.promos.yahoo.com/newmail/overview2/ >>> >>> _______________________________________________ >>> fedora-suds-list mailing list >>> fedora-suds-list at redhat.com >>> https://www.redhat.com/mailman/listinfo/fedora-suds-list > > > __________________________________________________________________ > Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/ > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From kehander at yahoo.com Thu Mar 5 16:29:55 2009 From: kehander at yahoo.com (Kevin) Date: Thu, 5 Mar 2009 08:29:55 -0800 (PST) Subject: [Fedora-suds-list] Re: Suds and Sharepoint In-Reply-To: <49AFF432.6030105@redhat.com> Message-ID: <110224.91837.qm@web110103.mail.gq1.yahoo.com> Whoops, I didn't check if the services were actually accessible after I tried retrieving the WSDL. Alas, providing people with accounts on the official company Sharepoint site is beyond my capabilities. I would suggest the official MOSS trial edition, but it requires Windows Server 2003. Perhaps there's someone else on the mailing list who is better equipped to supply the necessary resources..? -K --- On Thu, 3/5/09, Jeff Ortel wrote: > From: Jeff Ortel > Subject: Re: [Fedora-suds-list] Re: Suds and Sharepoint > To: "Kevin" > Cc: fedora-suds-list at redhat.com > Received: Thursday, March 5, 2009, 8:48 AM > Thanks Kevin. > > I'm getting a (401) authorization error to start with. > I quickly reviewed the links and > didn't see any username/password credentials. Do you > know of a username/password? > > As for the XmlNodes, I'll have to look through the wsdl > to see whether it is XML or a > string containing XML. > > Kevin wrote: > > Thanks for replying. There seems to be a fair amount > of interest out there in automating SharePoint tasks via > Python - except that most people can't seem to get it to > work. > > > > There's a list of public SharePoint examples at > https://usmc-sharepoint.securespsites.com/Lists/Public%20SharePoint%20Examples/AllItems.aspx > , including http://www.wssdemo.com/ . The WSDL files can be > accessed as described in the developer.com article in my > earlier message, e.g. > http://www.wssdemo.com/_vti_bin/Lists.asmx?WSDL . > > > > -K > > > > --- On Thu, 3/5/09, Jeff Ortel > wrote: > > > >> From: Jeff Ortel > >> Subject: Re: [Fedora-suds-list] Re: Suds and > Sharepoint > >> To: "Kevin" > >> Cc: fedora-suds-list at redhat.com > >> Received: Thursday, March 5, 2009, 6:54 AM > >> Hey Kevin, > >> > >> Thanks for you interest in suds. > >> > >> I've been pretty slammed this week but should > be able to > >> look in to this today. Any chance you can include > the > >> wsdl? Can I get access to this server? I can > >> resolve questions much quicker if I can run > through them on > >> the workbench. > >> > >> -jeff > >> > >> Kevin wrote: > >>> I think I got somewhere in regards to fixing > this > >> problem. (Sending messages to mailing lists tends > to > >> do that, no?) > >>> I replaced line 361 of Resolver.py with this: > >>> > >>> > >> try: > >>> > >> result, ancestry = self.getchild(name, > >> parent) > >>> > >> except ValueError: > >>> > >> result = None > >>> The problematic methods then started returning > >> recognizable objects that I could do something > with. > >> (I would file a bug if I had the slightest idea > what was > >> going on - it's not just a matter of > poorly-chosen syntax, > >> is it?) > >>> I'm still wondering about those > "XmlNodes", though. > >>> > >>> -K > >>> > >>> > >>> > >>> --- On Wed, 3/4/09, kehander at yahoo.com > >> > >> wrote: > >>>> From: kehander at yahoo.com > >> > >>>> Subject: Suds and Sharepoint > >>>> To: fedora-suds-list at redhat.com > >>>> Received: Wednesday, March 4, 2009, 3:37 > PM > >>>> After much anguish, I finally hit > >>>> upon the combination of Suds and > python-ntlm that > >> would let > >>>> me access the WSDL on a SharePoint server. > > >> This seems like > >>>> my best bet for automating some SharePoint > tasks. > >>>> > >>>> Alas, I'm a bit unclear as to where to > go > >> next. So far > >>>> I've been able to get meaningful > information with > >> the > >>>> SiteData.GetList method, but something > like, say, > >>>> Lists.GetListItems remains elusive. > >>>> > >>>> The method is described at > http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx > >>>> and shows up in the suds client as > >>>> GetListItems(xs:string listName, xs:string > >> viewName, query > >>>> query, viewFields viewFields, xs:string > rowLimit, > >>>> queryOptions queryOptions, xs:string > webID, ) > >>>> > >>>> Running > client.service.GetListItems('somelist') > >> results in > >>>> a lengthy backtrace that finishes with > >>>> File > >> > "/usr/lib/python2.5/site-packages/suds/resolver.py", > >>>> line 361, in findattr > >>>> result, ancestry = > >> self.getchild(name, > >>>> parent) > >>>> ValueError: need more than 0 values to > unpack > >>>> > >>>> whereas > >> > client.service.GetListItems('somelist','whatever') > >>>> ends with > >>>> File > >>>> > >> > "/usr/lib/python2.5/site-packages/suds/bindings/binding.py", > >>>> line 178, in reply_composite > >>>> raise Exception('tag (%s), > >> not-found' % tag) > >>>> Exception: tag (faultcode), not-found > >>>> > >>>> I've already been reading > http://www.csharphelp.com/archives4/archive602.html > >> and > >>>> > http://www.developer.com/tech/article.php/3104621 , > >> but > >>>> I can't quite understand how to apply > it > >> here. In > >>>> particular, how do I supply what is > referred to in > >> the SDK > >>>> as a "System.Xml.XmlNode" ? Is > that > >> something more > >>>> than just a raw string containing XML > code? > >>>> > >>>> > >>>> Thanks, K. > >>>> > >>>> > >>>> > >> > __________________________________________________________________ > >>>> Yahoo! Canada Toolbar: Search from > anywhere on the > >> web, and > >>>> bookmark your favourite sites. Download it > now at > >>>> http://ca.toolbar.yahoo.com. > >>>> > >>> > >>> > >> > __________________________________________________________________ > >>> Get a sneak peak at messages with a handy > reading pane > >> with All new Yahoo! Mail: > http://ca.promos.yahoo.com/newmail/overview2/ > >>> > >>> > _______________________________________________ > >>> fedora-suds-list mailing list > >>> fedora-suds-list at redhat.com > >>> > https://www.redhat.com/mailman/listinfo/fedora-suds-list > > > > > > > __________________________________________________________________ > > Instant Messaging, free SMS, sharing photos and > more... Try the new Yahoo! Canada Messenger at > http://ca.beta.messenger.yahoo.com/ > > > > _______________________________________________ > > fedora-suds-list mailing list > > fedora-suds-list at redhat.com > > > https://www.redhat.com/mailman/listinfo/fedora-suds-list __________________________________________________________________ Reclaim your name @ymail.com or @rocketmail.com. Get your new email address now! Go to http://ca.promos.yahoo.com/jacko/ From zxvdr.au at gmail.com Fri Mar 6 06:16:28 2009 From: zxvdr.au at gmail.com (David Robinson) Date: Fri, 6 Mar 2009 06:16:28 +0000 Subject: [Fedora-suds-list] regression in suds 0.3.4 Message-ID: Hi all, I've hit what appears to be a bug in suds version 0.3.4. My app was working fine with version 0.3.3 but after upgrading to 0.3.4 it suddenly stopped working. I've attached a sample app that reproduces the problem (it has comments which hopefully explain what's happening). Below is a diff of the request that's created by suds version 0.3.3 and 0.3.4. The actual problem is that is incorrect, it should include the namespace as did version 0.3.3. --- suds-0.3.3 2009-03-06 06:11:41.000000000 +0000 +++ suds-0.3.4 2009-03-06 06:11:30.000000000 +0000 @@ -1,19 +1,18 @@ - -
+ +
0 blah
- 7 - + 7 +
--Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: injection.py Type: text/x-python Size: 2883 bytes Desc: not available URL: From jortel at redhat.com Fri Mar 6 15:24:40 2009 From: jortel at redhat.com (Jeff Ortel) Date: Fri, 06 Mar 2009 10:24:40 -0500 Subject: [Fedora-suds-list] regression in suds 0.3.4 In-Reply-To: References: Message-ID: <49B14038.3080900@redhat.com> Thanks for reporting this. I'm looking into it. David Robinson wrote: > Hi all, > > I've hit what appears to be a bug in suds version 0.3.4. My app was > working fine with version 0.3.3 but after upgrading to 0.3.4 it > suddenly stopped working. I've attached a sample app that reproduces > the problem (it has comments which hopefully explain what's > happening). > > Below is a diff of the request that's created by suds version 0.3.3 > and 0.3.4. The actual problem is that xsi:type="GetEventsReq"> is incorrect, it should include the namespace > as did version 0.3.3. > > --- suds-0.3.3 2009-03-06 06:11:41.000000000 +0000 > +++ suds-0.3.4 2009-03-06 06:11:30.000000000 +0000 > @@ -1,19 +1,18 @@ > xmlns:ns0="http://www.betfair.com/publicapi/v3/BFGlobalService/" > -xmlns:ns1="http://www.betfair.com/publicapi/types/global/v3/" > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> > > > > - > -
> + > +
> 0 > blah >
> - xmlns="http://www.betfair.com/publicapi/types/global/v3/">7 > - xmlns="http://www.betfair.com/publicapi/types/global/v3/" > xsi:nil="true"/> > + 7 > + >
> > > > --Dave > > > ------------------------------------------------------------------------ > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From jortel at redhat.com Fri Mar 6 16:25:36 2009 From: jortel at redhat.com (Jeff Ortel) Date: Fri, 06 Mar 2009 11:25:36 -0500 Subject: [Fedora-suds-list] regression in suds 0.3.4 In-Reply-To: References: Message-ID: <49B14E80.7040300@redhat.com> The rules around when the name referenced by xsi:type="" needs to be qualified by namespace are unclear. My jboss server will not accept xsi:type="" for eleemnts of types derived by extension in the document/literal message style when the element and the type referenced by xsi:type="" are in the same namespace. So, after much surfing of specifications, I'm concluding for now that for the /literal/ soap styles, the xsi:type="" contains a namespace qualified reference only when it is in a different namespace. The rpc/encoded remains the same (always qualified). I committed as r463. Can you try from svn? -jeff David Robinson wrote: > Hi all, > > I've hit what appears to be a bug in suds version 0.3.4. My app was > working fine with version 0.3.3 but after upgrading to 0.3.4 it > suddenly stopped working. I've attached a sample app that reproduces > the problem (it has comments which hopefully explain what's > happening). > > Below is a diff of the request that's created by suds version 0.3.3 > and 0.3.4. The actual problem is that xsi:type="GetEventsReq"> is incorrect, it should include the namespace > as did version 0.3.3. > > --- suds-0.3.3 2009-03-06 06:11:41.000000000 +0000 > +++ suds-0.3.4 2009-03-06 06:11:30.000000000 +0000 > @@ -1,19 +1,18 @@ > xmlns:ns0="http://www.betfair.com/publicapi/v3/BFGlobalService/" > -xmlns:ns1="http://www.betfair.com/publicapi/types/global/v3/" > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> > > > > - > -
> + > +
> 0 > blah >
> - xmlns="http://www.betfair.com/publicapi/types/global/v3/">7 > - xmlns="http://www.betfair.com/publicapi/types/global/v3/" > xsi:nil="true"/> > + 7 > + >
> > > > --Dave > > > ------------------------------------------------------------------------ > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From zxvdr.au at gmail.com Fri Mar 6 17:31:41 2009 From: zxvdr.au at gmail.com (David Robinson) Date: Fri, 6 Mar 2009 17:31:41 +0000 Subject: [Fedora-suds-list] regression in suds 0.3.4 In-Reply-To: <49B14E80.7040300@redhat.com> References: <49B14E80.7040300@redhat.com> Message-ID: On Fri, Mar 6, 2009 at 4:25 PM, Jeff Ortel wrote: > The rules around when the name referenced by xsi:type="" needs to be > qualified by namespace are unclear. ?My jboss server will not accept > xsi:type="" for eleemnts of types derived by extension in the > document/literal message style when the element and the type referenced by > xsi:type="" are in the same namespace. > > So, after much surfing of specifications, I'm concluding for now that for > the /literal/ soap styles, the xsi:type="" contains a namespace qualified > reference only when it is in a different namespace. ?The rpc/encoded remains > the same (always qualified). > > I committed as r463. ?Can you try from svn? Yep, that's fixed it. The request now looks like this:
0 blah
1
The wsdl is here, incase you still need it: https://api.betfair.com/global/v3/BFGlobalService.wsdl Thanks heaps! --Dave From lrhazi at gmail.com Sun Mar 8 15:01:23 2009 From: lrhazi at gmail.com (Mohamed Lrhazi) Date: Sun, 8 Mar 2009 10:01:23 -0500 Subject: [Fedora-suds-list] Pickling clients? Message-ID: Hello, Was wondering what it would take to make suds clients serializable with (c)Pickle... or does that not make sense? Thanks, Mohamed. From lrhazi at gmail.com Tue Mar 10 00:05:25 2009 From: lrhazi at gmail.com (Mohamed Lrhazi) Date: Mon, 9 Mar 2009 19:05:25 -0500 Subject: [Fedora-suds-list] Are multi dimensional arrays supported? Message-ID: Hi all, We have these WSDLs full of SequenceSequence types, that is an array of array of some complex type... I tried instantiating the type, say, mytype, then passing it to a method that expects such beast as [[mytype]], or [ [mytype,],] I always the excpetion that follows. Is this unsupported currently? /usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/client.py in invoke(self, args, kwargs) 469 binding = self.method.binding.input 470 binding.options = self.options --> 471 msg = binding.get_message(self.method, args, kwargs) 472 timer.stop() 473 metrics.log.debug( /usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/bindings/binding.py in get_message(self, method, args, kwargs) 96 content = self.headercontent(method) 97 header = self.header(content) ---> 98 content = self.bodycontent(method, args, kwargs) 99 body = self.body(content) 100 env = self.envelope(header, body) /usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/bindings/rpc.py in bodycontent(self, method, args, kwargs) 61 p = self.mkparam(method, pd, value) 62 if p is not None: ---> 63 root.append(p) 64 n += 1 65 return root /usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/sax/element.py in append(self, objects) 329 child.parent = self 330 continue --> 331 raise Exception('append %s not-valid' % child.__class__.__name__) 332 return self 333 : append list not-valid Thanks, Mohamed. From jortel at redhat.com Tue Mar 10 13:28:28 2009 From: jortel at redhat.com (Jeff Ortel) Date: Tue, 10 Mar 2009 09:28:28 -0400 Subject: [Fedora-suds-list] Are multi dimensional arrays supported? In-Reply-To: References: Message-ID: <49B66AFC.10005@redhat.com> Can you send me a link (or copy) for the wsdl involved? Mohamed Lrhazi wrote: > Hi all, > > We have these WSDLs full of SequenceSequence types, that is an array > of array of some complex type... > I tried instantiating the type, say, mytype, then passing it to a > method that expects such beast as [[mytype]], or [ [mytype,],] > I always the excpetion that follows. Is this unsupported currently? > > /usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/client.py > in invoke(self, args, kwargs) > 469 binding = self.method.binding.input > 470 binding.options = self.options > --> 471 msg = binding.get_message(self.method, args, kwargs) > 472 timer.stop() > 473 metrics.log.debug( > > /usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/bindings/binding.py > in get_message(self, method, args, kwargs) > 96 content = self.headercontent(method) > 97 header = self.header(content) > ---> 98 content = self.bodycontent(method, args, kwargs) > 99 body = self.body(content) > 100 env = self.envelope(header, body) > > /usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/bindings/rpc.py > in bodycontent(self, method, args, kwargs) > 61 p = self.mkparam(method, pd, value) > 62 if p is not None: > ---> 63 root.append(p) > 64 n += 1 > 65 return root > > /usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/sax/element.py > in append(self, objects) > 329 child.parent = self > 330 continue > --> 331 raise Exception('append %s not-valid' % > child.__class__.__name__) > 332 return self > 333 > > : append list not-valid > > > Thanks, > Mohamed. > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From mcauthorn at gmail.com Wed Mar 11 17:51:27 2009 From: mcauthorn at gmail.com (Matt C) Date: Wed, 11 Mar 2009 13:51:27 -0400 Subject: [Fedora-suds-list] Are multi dimensional arrays supported? In-Reply-To: <49B66AFC.10005@redhat.com> References: <49B66AFC.10005@redhat.com> Message-ID: <42ea979e0903111051r5798898eib8f3f80db3db8870@mail.gmail.com> Jeff: Here's a version of the WSDL - this is the same one that you helped me with before (with the import issue you identified). It's all part of the same project...note that you may need to make a string substitution or two, as this is this WSDL uses a dot separator for types, methods, etc. Any guidance would be very much appreciated; these types are a real challenge at the moment. -Matt On Tue, Mar 10, 2009 at 9:28 AM, Jeff Ortel wrote: > Can you send me a link (or copy) for the wsdl involved? > > > Mohamed Lrhazi wrote: > >> Hi all, >> >> We have these WSDLs full of SequenceSequence types, that is an array >> of array of some complex type... >> I tried instantiating the type, say, mytype, then passing it to a >> method that expects such beast as [[mytype]], or [ [mytype,],] >> I always the excpetion that follows. Is this unsupported currently? >> >> /usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/client.py >> in invoke(self, args, kwargs) >> 469 binding = self.method.binding.input >> 470 binding.options = self.options >> --> 471 msg = binding.get_message(self.method, args, kwargs) >> 472 timer.stop() >> 473 metrics.log.debug( >> >> >> /usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/bindings/binding.py >> in get_message(self, method, args, kwargs) >> 96 content = self.headercontent(method) >> 97 header = self.header(content) >> ---> 98 content = self.bodycontent(method, args, kwargs) >> 99 body = self.body(content) >> 100 env = self.envelope(header, body) >> >> /usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/bindings/rpc.py >> in bodycontent(self, method, args, kwargs) >> 61 p = self.mkparam(method, pd, value) >> 62 if p is not None: >> ---> 63 root.append(p) >> 64 n += 1 >> 65 return root >> >> /usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/sax/element.py >> in append(self, objects) >> 329 child.parent = self >> 330 continue >> --> 331 raise Exception('append %s not-valid' % >> child.__class__.__name__) >> 332 return self >> 333 >> >> : append list not-valid >> >> >> Thanks, >> Mohamed. >> >> _______________________________________________ >> fedora-suds-list mailing list >> fedora-suds-list at redhat.com >> https://www.redhat.com/mailman/listinfo/fedora-suds-list >> > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: LocalLB.Pool.wsdl2.xml Type: text/xml Size: 190516 bytes Desc: not available URL: From jortel at redhat.com Wed Mar 11 20:19:49 2009 From: jortel at redhat.com (Jeff Ortel) Date: Wed, 11 Mar 2009 16:19:49 -0400 Subject: [Fedora-suds-list] Are multi dimensional arrays supported? In-Reply-To: <42ea979e0903111051r5798898eib8f3f80db3db8870@mail.gmail.com> References: <49B66AFC.10005@redhat.com> <42ea979e0903111051r5798898eib8f3f80db3db8870@mail.gmail.com> Message-ID: <49B81CE5.1010200@redhat.com> Can I get a concrete code example of what types you're creating and methods invoked when you have a problem? Also, I can't remember if you requested this but FYI: https://fedorahosted.org/suds/wiki/TipsAndTricks#Types%20Names%20Containing%20(.) Matt C wrote: > Jeff: Here's a version of the WSDL - this is the same one that you > helped me with before (with the import issue you identified). It's all > part of the same project...note that you may need to make a string > substitution or two, as this is this WSDL uses a dot separator for > types, methods, etc. > > Any guidance would be very much appreciated; these types are a real > challenge at the moment. > > -Matt > > On Tue, Mar 10, 2009 at 9:28 AM, Jeff Ortel > wrote: > > Can you send me a link (or copy) for the wsdl involved? > > > Mohamed Lrhazi wrote: > > Hi all, > > We have these WSDLs full of SequenceSequence types, that is an array > of array of some complex type... > I tried instantiating the type, say, mytype, then passing it to a > method that expects such beast as [[mytype]], or [ [mytype,],] > I always the excpetion that follows. Is this unsupported currently? > > /usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/client.py > in invoke(self, args, kwargs) > 469 binding = self.method.binding.input > 470 binding.options = self.options > --> 471 msg = binding.get_message(self.method, args, kwargs) > 472 timer.stop() > 473 metrics.log.debug( > > /usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/bindings/binding.py > in get_message(self, method, args, kwargs) > 96 content = self.headercontent(method) > 97 header = self.header(content) > ---> 98 content = self.bodycontent(method, args, kwargs) > 99 body = self.body(content) > 100 env = self.envelope(header, body) > > /usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/bindings/rpc.py > in bodycontent(self, method, args, kwargs) > 61 p = self.mkparam(method, pd, value) > 62 if p is not None: > ---> 63 root.append(p) > 64 n += 1 > 65 return root > > /usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/sax/element.py > in append(self, objects) > 329 child.parent = self > 330 continue > --> 331 raise Exception('append %s not-valid' % > child.__class__.__name__) > 332 return self > 333 > > : append list not-valid > > > Thanks, > Mohamed. > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list > > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list > > From gfranxman at gmail.com Thu Mar 12 16:35:25 2009 From: gfranxman at gmail.com (Glenn Franxman) Date: Thu, 12 Mar 2009 12:35:25 -0400 Subject: [Fedora-suds-list] Suds support for WSSE ( with yahoo specific example ). Message-ID: <1d6a70330903120935n6602f265yab58989c6ff055bc@mail.gmail.com> It looks like the latest build has lost some of it's capabilities for handling namespaces. I'm working with some yahoo apis and am really keen on using python/suds for this. Here?s what Yahoo says I should be sending ( note the use of the wsse namespace ): --------------------------------- OBFUSCATED OBFUSCATED_PASS OBFUSCATED-LICENSE OBFUSCATED-ACCOUNT ... -------------------- Previous versions output ( note how ns1 should have been a wsse equivalent ): ------------------------------------ $ python sudsDemo.py Suds ( https://fedorahosted.org/suds/ ) version: 0.3.4 (beta) build: R440-20090211 Service ( LocationServiceService ) tns="http://amp.yahooapis.com/V1" Prefixes (2) ns0 = "http://amp.yahooapis.com/V1" ns1 = "http://schemas.xmlsoap.org/ws/2002/07/secext" Ports (1): (LocationService) Methods (1): getAccountLocation() Types (3): ApiFault ns1:Security ns1:UsernameToken ERROR:suds.sudsobject:['value'] must be superset of [], ordering ignored ERROR:suds.sudsobject:['value'] must be superset of [], ordering ignored ERROR:suds.client: OBFUSCATED OBFUSCATED OBFUSCATED OBFUSCATED Server raised fault: 'Login failed for OBFUSCATED.' (u"Server raised fault: 'Login failed for OBFUSCATED.'",) ------------------------------------ Then I updated to latest trunk ( note ns1 completely dropped ): -------------------------------------- $ python sudsDemo.py Suds ( https://fedorahosted.org/suds/ ) version: 0.3.5 (beta) build: R466-20090311 Service ( LocationServiceService ) tns="http://amp.yahooapis.com/V1" Prefixes (2) ns0 = "http://amp.yahooapis.com/V1" ns1 = "http://schemas.xmlsoap.org/ws/2002/07/secext" Ports (1): (LocationService) Methods (1): getAccountLocation() Types (3): ApiFault ns1:Security ns1:UsernameToken ERROR:suds.sudsobject:['value'] must be superset of [], ordering ignored ERROR:suds.sudsobject:['value'] must be superset of [], ordering ignored ERROR:suds.client: OBFUSCATED OBFUSCATED OBFUSCATED OBFUSCATED Server raised fault: 'Login failed for OBFUSCATED.' (u"Server raised fault: 'Login failed for OBFUSCATED.'",) -------------------------------- The ns1 namespace is no longer even applied to the Security clause. Also, it looks like the Security extension from r452 didn't make it. Are there plans? To my eyes, the 0.3.4 version I was using looked like it should have worked even though the wsse namespace was applied in a different manner than Yahoo's example shows. I'm wondering what tools they use. From rundeks at hotmail.com Thu Mar 12 18:42:40 2009 From: rundeks at hotmail.com (Kevin Runde) Date: Thu, 12 Mar 2009 13:42:40 -0500 Subject: [Fedora-suds-list] Attachments Message-ID: Hi All, Okay first I need to say AWESOME job on this package. I mean it! This was so easy to use and get started with I couldn't believe it. It is like some sort of sweet black voodoo magic. I should know I've been forced to do Java SOAP for years and have seen many horrors in my time. I didn't see a way to send an Attachment. Unfortunately this is a requirement for the project I am on. I don't suppose I missed something and there really is Attachment support? Since Suds is so easy and wonderful to work with I am hoping for a miracle and that Suds really does support Attachments and I just missed it. Thank You, Kevin Runde There are 10 kinds of people. Those who understand binary and those who don't. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jortel at redhat.com Thu Mar 12 20:47:59 2009 From: jortel at redhat.com (Jeff Ortel) Date: Thu, 12 Mar 2009 16:47:59 -0400 Subject: [Fedora-suds-list] Attachments In-Reply-To: References: Message-ID: <49B974FF.4040003@redhat.com> Kevin Runde wrote: > Hi All, > > Okay first I need to say AWESOME job on this package. I mean it! This > was so easy to use and get started with I couldn't believe it. It is > like some sort of sweet black voodoo magic. I should know I've been > forced to do Java SOAP for years and have seen many horrors in my time. Thanks :-) > > I didn't see a way to send an Attachment. Unfortunately this is a > requirement for the project I am on. I don't suppose I missed something > and there really is Attachment support? Since Suds is so easy and > wonderful to work with I am hoping for a miracle and that Suds really > does support Attachments and I just missed it. No, doesn't support attachments but depending on level of difficulty, I might be able to add it rather quickly. Let me look at the specs and get back with you. Any information on this that you can provide would be most helpful. > > Thank You, > Kevin Runde > > There are 10 kinds of people. Those who understand binary and those who > don't. > > > ------------------------------------------------------------------------ > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From david.e.bunch at gmail.com Fri Mar 13 08:45:48 2009 From: david.e.bunch at gmail.com (David Bunch) Date: Fri, 13 Mar 2009 01:45:48 -0700 Subject: [Fedora-suds-list] How to create arrayTypes in suds? Message-ID: <1467cd8e0903130145x7c1b2820kab497860aa733078@mail.gmail.com> Hi I have a question about ArrayTypes. I have a webservice function that takes an ArrayOfPoints, Which is an ArrayType that holds Point objects. Now, I can create the individual Point objects, but how do I create an ArrayOfPoints and add points to it? I tried this: ArrayOfPoints = myClient.factory.create('ArrayOfPoints') but then, how do I add points to it? List operations don't seem to work. And when I do this: ArrayOfPoints = [Point1, Point2, Point3] myClient.service.calculateCenter(ArrayOfPoints) I get a fault error saying that ArrayOfPoints could not be serialized. Any help/insight on this would be much appreciated. Sincerely, -David -------------- next part -------------- An HTML attachment was scrubbed... URL: From jortel at redhat.com Fri Mar 13 12:35:18 2009 From: jortel at redhat.com (Jeff Ortel) Date: Fri, 13 Mar 2009 08:35:18 -0400 Subject: [Fedora-suds-list] How to create arrayTypes in suds? In-Reply-To: <1467cd8e0903130145x7c1b2820kab497860aa733078@mail.gmail.com> References: <1467cd8e0903130145x7c1b2820kab497860aa733078@mail.gmail.com> Message-ID: <49BA5306.7090600@redhat.com> Hey David, The rpc/encoded (section 5 encoded) arrays are defined as sequence of uncounded . So, after you create the array, you need to add an attribute to the sudsobject (with is the any) with the value of []. Here's an example: http://svn.fedorahosted.org/svn/suds/trunk/tests/axis1.py See below: -jeff David Bunch wrote: > Hi I have a question about ArrayTypes. > I have a webservice function that takes an ArrayOfPoints, Which is an > ArrayType that holds Point objects. > Now, I can create the individual Point objects, but how do I create an > ArrayOfPoints and add points to it? I tried this: > > ArrayOfPoints = myClient.factory.create('ArrayOfPoints') > > but then, how do I add points to it? List operations don't seem to > work. And when I do this: > > ArrayOfPoints = [Point1, Point2, Point3] > myClient.service.calculateCenter(ArrayOfPoints) Try: > > ArrayOfPoints.items = [Point1, Point2, Point3] > The "items" is arbitrarily named as it represents the part of the array definition. > > I get a fault error saying that ArrayOfPoints could not be serialized. > > Any help/insight on this would be much appreciated. > > Sincerely, > -David > > > ------------------------------------------------------------------------ > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From david.e.bunch at gmail.com Fri Mar 13 21:38:32 2009 From: david.e.bunch at gmail.com (David Bunch) Date: Fri, 13 Mar 2009 14:38:32 -0700 Subject: [Fedora-suds-list] How to create arrayTypes in suds? In-Reply-To: <49BA5306.7090600@redhat.com> References: <1467cd8e0903130145x7c1b2820kab497860aa733078@mail.gmail.com> <49BA5306.7090600@redhat.com> Message-ID: <1467cd8e0903131438yc9243e1m49ad1cd45d077015@mail.gmail.com> I have tried what you suggested, but I still either get that Item does not exist, or when I pass it to the webservice function I get an error that it is the incorrect type. Here is the wsdl description of the function: Headers have been stripped off. string int int int int Using the wsdl definition I have tried the following to no avail: 1.) path = client.factory.create('ns0:SrPath') path.points = client.factory.create('ns0:ArrayOfPoint2D') path.points.Point2D = [] # append points to path.point.Point2D 2.) path = client.factory.create('path') path.points = client.factory.create('ns0:ArrayOfPoint2D') path.points.Item = [] # append points to path.point.Item 3.) path = client.factory.create('ns0:SrPath') path.points = [] # append points to path.points 4.) path = client.factory.create('ns0:SrPath') path.points.Points2D = [] # append points to path.points.Points2D Nothing seems to be working. What am I doing wrong? Am I not understanding the wsdl correctly? On Fri, Mar 13, 2009 at 5:35 AM, Jeff Ortel wrote: > Hey David, > > The rpc/encoded (section 5 encoded) arrays are defined as sequence of > uncounded . So, after you create the array, you need to add an > attribute to the sudsobject (with is the any) with the value of []. > > Here's an example: > http://svn.fedorahosted.org/svn/suds/trunk/tests/axis1.py > > See below: > > -jeff > > David Bunch wrote: > >> Hi I have a question about ArrayTypes. >> I have a webservice function that takes an ArrayOfPoints, Which is an >> ArrayType that holds Point objects. >> Now, I can create the individual Point objects, but how do I create an >> ArrayOfPoints and add points to it? I tried this: >> >> ArrayOfPoints = myClient.factory.create('ArrayOfPoints') >> >> but then, how do I add points to it? List operations don't seem to work. >> And when I do this: >> >> ArrayOfPoints = [Point1, Point2, Point3] >> myClient.service.calculateCenter(ArrayOfPoints) >> > > Try: > > > > > ArrayOfPoints.items = [Point1, Point2, Point3] > > > > The "items" is arbitrarily named as it represents the part of the > array definition. > > >> I get a fault error saying that ArrayOfPoints could not be serialized. >> >> Any help/insight on this would be much appreciated. >> >> Sincerely, >> -David >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> fedora-suds-list mailing list >> fedora-suds-list at redhat.com >> https://www.redhat.com/mailman/listinfo/fedora-suds-list >> > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.e.bunch at gmail.com Sat Mar 14 02:01:34 2009 From: david.e.bunch at gmail.com (David Bunch) Date: Fri, 13 Mar 2009 19:01:34 -0700 Subject: [Fedora-suds-list] setting cookies in soap headers Message-ID: <1467cd8e0903131901o409dc76cube30f6214c034327@mail.gmail.com> Hi, How do you add a cookie to suds soap request headers? I need to set a cookie called ASP.NET_SessionId. I read the section on soap headers, but I'm not sure if that applies to what im trying to do. Thanks, -David -------------- next part -------------- An HTML attachment was scrubbed... URL: From lrhazi at gmail.com Sat Mar 14 04:35:56 2009 From: lrhazi at gmail.com (Mohamed Lrhazi) Date: Fri, 13 Mar 2009 23:35:56 -0500 Subject: [Fedora-suds-list] Getting method return type Message-ID: hi there, How do I get a method's return type? Browsing through an instance of suds.client, specifically client.wsdl.messages, I see the data is there, but is there an API way for accessing it? Thanks a lot Mohamed. From lrhazi at gmail.com Sat Mar 14 04:38:04 2009 From: lrhazi at gmail.com (Mohamed Lrhazi) Date: Fri, 13 Mar 2009 23:38:04 -0500 Subject: [Fedora-suds-list] setting cookies in soap headers In-Reply-To: <1467cd8e0903131901o409dc76cube30f6214c034327@mail.gmail.com> References: <1467cd8e0903131901o409dc76cube30f6214c034327@mail.gmail.com> Message-ID: I think you need to use the headers option to the suds.client constructor: headers Provides for extra http headers. On Fri, Mar 13, 2009 at 9:01 PM, David Bunch wrote: > Hi, > > How do you add a cookie to suds soap request headers?? I need to set a > cookie called ASP.NET_SessionId. > I read the section on soap headers, but I'm not sure if that applies to what > im trying to do. > > Thanks, > -David > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list > -- " Logic merely sanctions the conquests of the intuition." Jacques Hadamard From david.e.bunch at gmail.com Sat Mar 14 21:34:53 2009 From: david.e.bunch at gmail.com (David Bunch) Date: Sat, 14 Mar 2009 14:34:53 -0700 Subject: [Fedora-suds-list] setting cookies in soap headers In-Reply-To: References: <1467cd8e0903131901o409dc76cube30f6214c034327@mail.gmail.com> Message-ID: <1467cd8e0903141434p313a769la5e62306b8e9113@mail.gmail.com> yeah I figured that much, but i've been reading the documentation and i dont know how I would set the cookie. I know when you initialize a client you would do myclient = suds.Client(url, options) and options is an argument dictionary, but what is the format of setting a cookie? how do I set it in options? On Fri, Mar 13, 2009 at 9:38 PM, Mohamed Lrhazi wrote: > I think you need to use the headers option to the suds.client constructor: > > headers > Provides for extra http headers. > > > > On Fri, Mar 13, 2009 at 9:01 PM, David Bunch > wrote: > > Hi, > > > > How do you add a cookie to suds soap request headers? I need to set a > > cookie called ASP.NET_SessionId. > > I read the section on soap headers, but I'm not sure if that applies to > what > > im trying to do. > > > > Thanks, > > -David > > > > _______________________________________________ > > fedora-suds-list mailing list > > fedora-suds-list at redhat.com > > https://www.redhat.com/mailman/listinfo/fedora-suds-list > > > > > > -- > " Logic merely sanctions the conquests of the intuition." > Jacques Hadamard > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lrhazi at gmail.com Sun Mar 15 00:55:02 2009 From: lrhazi at gmail.com (Mohamed Lrhazi) Date: Sat, 14 Mar 2009 19:55:02 -0500 Subject: [Fedora-suds-list] setting cookies in soap headers In-Reply-To: <1467cd8e0903141434p313a769la5e62306b8e9113@mail.gmail.com> References: <1467cd8e0903131901o409dc76cube30f6214c034327@mail.gmail.com> <1467cd8e0903141434p313a769la5e62306b8e9113@mail.gmail.com> Message-ID: I would try: myclient = suds.Client(url, headers= { Set-Cookie': 'ASP.NET_SessionId=value'}) HTH, Mohamed. On Sat, Mar 14, 2009 at 4:34 PM, David Bunch wrote: > yeah I figured that much, but i've been reading the documentation and i dont > know how I would set the cookie.? I know when you initialize a client you > would do myclient = suds.Client(url, options)? and options is an argument > dictionary, but what is the format of setting a cookie?? how do I set it in > options? > > On Fri, Mar 13, 2009 at 9:38 PM, Mohamed Lrhazi wrote: >> >> I think you need to use the headers option to the suds.client constructor: >> >> headers >> ? ?Provides for extra http headers. >> >> >> >> On Fri, Mar 13, 2009 at 9:01 PM, David Bunch >> wrote: >> > Hi, >> > >> > How do you add a cookie to suds soap request headers?? I need to set a >> > cookie called ASP.NET_SessionId. >> > I read the section on soap headers, but I'm not sure if that applies to >> > what >> > im trying to do. >> > >> > Thanks, >> > -David >> > >> > _______________________________________________ >> > fedora-suds-list mailing list >> > fedora-suds-list at redhat.com >> > https://www.redhat.com/mailman/listinfo/fedora-suds-list >> > >> >> >> >> -- >> " Logic merely sanctions the conquests of the intuition." >> Jacques Hadamard > > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list > -- " Logic merely sanctions the conquests of the intuition." Jacques Hadamard From lrhazi at gmail.com Sun Mar 15 00:57:39 2009 From: lrhazi at gmail.com (Mohamed Lrhazi) Date: Sat, 14 Mar 2009 19:57:39 -0500 Subject: [Fedora-suds-list] setting cookies in soap headers In-Reply-To: References: <1467cd8e0903131901o409dc76cube30f6214c034327@mail.gmail.com> <1467cd8e0903141434p313a769la5e62306b8e9113@mail.gmail.com> Message-ID: No, rather: myclient = suds.Client(url, headers= { 'Cookie': 'ASP.NET_SessionId=value'}) replace value with whatever you need, like: value=123456 myclient = suds.Client(url, headers= { 'Cookie': 'ASP.NET_SessionId=%s'%value}) On Sat, Mar 14, 2009 at 7:55 PM, Mohamed Lrhazi wrote: > I would try: > > myclient = suds.Client(url, headers= { Set-Cookie': 'ASP.NET_SessionId=value'}) > > HTH, > Mohamed. > > On Sat, Mar 14, 2009 at 4:34 PM, David Bunch wrote: >> yeah I figured that much, but i've been reading the documentation and i dont >> know how I would set the cookie.? I know when you initialize a client you >> would do myclient = suds.Client(url, options)? and options is an argument >> dictionary, but what is the format of setting a cookie?? how do I set it in >> options? >> >> On Fri, Mar 13, 2009 at 9:38 PM, Mohamed Lrhazi wrote: >>> >>> I think you need to use the headers option to the suds.client constructor: >>> >>> headers >>> ? ?Provides for extra http headers. >>> >>> >>> >>> On Fri, Mar 13, 2009 at 9:01 PM, David Bunch >>> wrote: >>> > Hi, >>> > >>> > How do you add a cookie to suds soap request headers?? I need to set a >>> > cookie called ASP.NET_SessionId. >>> > I read the section on soap headers, but I'm not sure if that applies to >>> > what >>> > im trying to do. >>> > >>> > Thanks, >>> > -David >>> > >>> > _______________________________________________ >>> > fedora-suds-list mailing list >>> > fedora-suds-list at redhat.com >>> > https://www.redhat.com/mailman/listinfo/fedora-suds-list >>> > >>> >>> >>> >>> -- >>> " Logic merely sanctions the conquests of the intuition." >>> Jacques Hadamard >> >> >> _______________________________________________ >> fedora-suds-list mailing list >> fedora-suds-list at redhat.com >> https://www.redhat.com/mailman/listinfo/fedora-suds-list >> > > > > -- > " Logic merely sanctions the conquests of the intuition." > Jacques Hadamard > -- " Logic merely sanctions the conquests of the intuition." Jacques Hadamard From davynorton at gmail.com Mon Mar 16 12:06:24 2009 From: davynorton at gmail.com (David Norton) Date: Mon, 16 Mar 2009 08:06:24 -0400 Subject: [Fedora-suds-list] HTTPS Client Authentication Message-ID: Hello all, I am somewhat new to Suds but I wanted to share with you a tip on how to get Suds working with client certificates over HTTPS. This was something we couldn't find in any Python SOAP library, but thanks to Suds' extendable nature we were able to pass in the appropriate connection objects. You can read about it here on our blog: http://www.threepillarsoftware.com/soap_client_auth Please let me know if you have any input or questions -- again, I am new to Suds, but I wanted to start contributing back. Thanks, David Norton Three Pillar Software, Inc. From david.e.bunch at gmail.com Mon Mar 16 22:39:25 2009 From: david.e.bunch at gmail.com (David Bunch) Date: Mon, 16 Mar 2009 15:39:25 -0700 Subject: [Fedora-suds-list] suds cant resolve legal xml response message Message-ID: <1467cd8e0903161539y51adfd71sf12629d3cb46291c@mail.gmail.com> When I called a remote soap function with with the suds library, I get an error message that parts of the soap response message can't be resolved. However looking at the returned soap messages it seems to be perfectly legal xml. Here is the response I received from the function along with the error message: isrstent ISR Stent wf 10 isrstent xompht5510flicnqsbbxn3ja ERROR:suds.bindings.multiref:multiRef: #id1, not-resolved WARNING:suds.bindings.unmarshaller:attribute (href) type, not-found Any one have any idea why I am getting this error? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jortel at redhat.com Tue Mar 17 17:11:05 2009 From: jortel at redhat.com (Jeff Ortel) Date: Tue, 17 Mar 2009 13:11:05 -0400 Subject: [Fedora-suds-list] suds cant resolve legal xml response message In-Reply-To: <1467cd8e0903161539y51adfd71sf12629d3cb46291c@mail.gmail.com> References: <1467cd8e0903161539y51adfd71sf12629d3cb46291c@mail.gmail.com> Message-ID: <49BFD9A9.4060106@redhat.com> David, I found the problem here. The suds multiref resolver was restricting the /referenced/ elements to those named "multiRef" which after reading the specification is incorrect. I've fixed this but need to do some testing before commit. Can you send me the wsdl for this? Regards, Jeff David Bunch wrote: > When I called a remote soap function with with the suds library, I get > an error message that parts of the soap response message can't be > resolved. However looking at the returned soap messages it seems to be > perfectly legal xml. Here is the response I received from the function > along with the error message: > > > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:tns="http://hurt.noocorp.com/WsObjects" > xmlns:types="http://hurt.noocorp.com/WsObjects/encodedTypes" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > > > > > > > isrstent > ISR Stent > wf > 10 > isrstent > xsi:type="xsd:string">xompht5510flicnqsbbxn3ja > > > > > ERROR:suds.bindings.multiref:multiRef: #id1, not-resolved > WARNING:suds.bindings.unmarshaller:attribute (href) type, not-found > > Any one have any idea why I am getting this error? > > > ------------------------------------------------------------------------ > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From jortel at redhat.com Tue Mar 17 17:53:14 2009 From: jortel at redhat.com (Jeff Ortel) Date: Tue, 17 Mar 2009 13:53:14 -0400 Subject: [Fedora-suds-list] suds cant resolve legal xml response message In-Reply-To: <49BFD9A9.4060106@redhat.com> References: <1467cd8e0903161539y51adfd71sf12629d3cb46291c@mail.gmail.com> <49BFD9A9.4060106@redhat.com> Message-ID: <49BFE38A.1060409@redhat.com> David, I committed the fix for this in r470. It works with my axis server which is set to emit multirefs. Your message looks correct but I can't verify without your wsdl/schema. So, please let me know if this works for you. -jeff Jeff Ortel wrote: > David, > > I found the problem here. > > The suds multiref resolver was restricting the /referenced/ elements to > those named "multiRef" which after reading the specification is > incorrect. I've fixed this but need to do some testing before commit. > > Can you send me the wsdl for this? > > Regards, > > Jeff > > David Bunch wrote: >> When I called a remote soap function with with the suds library, I get >> an error message that parts of the soap response message can't be >> resolved. However looking at the returned soap messages it seems to >> be perfectly legal xml. Here is the response I received from the >> function along with the error message: >> >> >> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" >> xmlns:tns="http://hurt.noocorp.com/WsObjects" >> xmlns:types="http://hurt.noocorp.com/WsObjects/encodedTypes" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xmlns:xsd="http://www.w3.org/2001/XMLSchema"> >> >> > soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> >> >> >> >> >> isrstent >> ISR Stent >> wf >> 10 >> isrstent >> > xsi:type="xsd:string">xompht5510flicnqsbbxn3ja >> >> >> >> >> ERROR:suds.bindings.multiref:multiRef: #id1, not-resolved >> WARNING:suds.bindings.unmarshaller:attribute (href) type, not-found >> >> Any one have any idea why I am getting this error? >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> fedora-suds-list mailing list >> fedora-suds-list at redhat.com >> https://www.redhat.com/mailman/listinfo/fedora-suds-list > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From david.e.bunch at gmail.com Wed Mar 18 00:56:51 2009 From: david.e.bunch at gmail.com (David Bunch) Date: Tue, 17 Mar 2009 17:56:51 -0700 Subject: [Fedora-suds-list] setting a cookie Message-ID: <1467cd8e0903171756h1f1014f4r7215018474c6157c@mail.gmail.com> Is this not the correct way set a cookie in suds? # Create session cookie. oizysSessionCookie = cookielib.Cookie(version=None, name="ASP.NET_SessionId", value=self.loginCredentials.session_id, port="8082", port_specified=False, domain="127.0.0.1", domain_specified=True, domain_initial_dot=False, path="ISTSessionId", path_specified=True, secure=False, expires=None, discard=True, comment=None, comment_url=None, rest=None) # Add cookie to clients commandClient = Client(commandUrl) commandClient.options.transport.cookiejar.set_cookie(oizysSessionCookie) monitorClient = Client(monitorUrl) monitorClient.options.transport.cookiejar.set_cookie(oizysSessionCookie) -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.e.bunch at gmail.com Wed Mar 18 01:35:42 2009 From: david.e.bunch at gmail.com (David Bunch) Date: Tue, 17 Mar 2009 18:35:42 -0700 Subject: [Fedora-suds-list] you must all hate me by now, but...how do you get http header logging info? Message-ID: <1467cd8e0903171835x634a23c2l32318a40d9888041@mail.gmail.com> Hey everyone, firstly, I want to thank you Jeff, for being so patient with me, and the quick turn around on that bug. You rock, and your client rocks! Secondly, does anyone know how you can log http headers that are sent and recieved? the documentation says that to log sent and received soap/http headers simply add these lines to the top of your code: import logging logging.basicConfig(level=logging.INFO) logging.getLogger('suds.client').setLevel(logging.DEBUG) However this only logs soap headers and soap messages not http headers. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lrhazi at gmail.com Wed Mar 18 01:43:59 2009 From: lrhazi at gmail.com (Mohamed Lrhazi) Date: Tue, 17 Mar 2009 20:43:59 -0500 Subject: [Fedora-suds-list] setting a cookie In-Reply-To: <1467cd8e0903171756h1f1014f4r7215018474c6157c@mail.gmail.com> References: <1467cd8e0903171756h1f1014f4r7215018474c6157c@mail.gmail.com> Message-ID: I am guessing here.... you are attempting to configure the http client to automatically manage cookies for you... if all you need is send a cookie and if you already know its value, whats wrong with just setting it like I suggested as a simple additional header? are you over complicating it, or am completely mis understanding the issue? Mohamed. 2009/3/17 David Bunch : > Is this not the correct way set a cookie in suds? > > ?????? # Create session cookie. > ??????? oizysSessionCookie = cookielib.Cookie(version=None, > ?????????????????????????????????????????????????? name="ASP.NET_SessionId", > > value=self.loginCredentials.session_id, > ?????????????????????????????????????????????????? port="8082", > ?????????????????????????????????????????????????? port_specified=False, > ?????????????????????????????????????????????????? domain="127.0.0.1", > ?????????????????????????????????????????????????? domain_specified=True, > ?????????????????????????????????????????????????? domain_initial_dot=False, > ?????????????????????????????????????????????????? path="ISTSessionId", > ?????????????????????????????????????????????????? path_specified=True, > ?????????????????????????????????????????????????? secure=False, > ?????????????????????????????????????????????????? expires=None, > ?????????????????????????????????????????????????? discard=True, > ?????????????????????????????????????????????????? comment=None, > ?????????????????????????????????????????????????? comment_url=None, > ?????????????????????????????????????????????????? rest=None) > ??????? # Add cookie to clients > ??????? commandClient = Client(commandUrl) > > commandClient.options.transport.cookiejar.set_cookie(oizysSessionCookie) > ??????? monitorClient = Client(monitorUrl) > > monitorClient.options.transport.cookiejar.set_cookie(oizysSessionCookie) > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list > -- " Logic merely sanctions the conquests of the intuition." Jacques Hadamard From lrhazi at gmail.com Wed Mar 18 01:45:59 2009 From: lrhazi at gmail.com (Mohamed Lrhazi) Date: Tue, 17 Mar 2009 20:45:59 -0500 Subject: [Fedora-suds-list] you must all hate me by now, but...how do you get http header logging info? In-Reply-To: <1467cd8e0903171835x634a23c2l32318a40d9888041@mail.gmail.com> References: <1467cd8e0903171835x634a23c2l32318a40d9888041@mail.gmail.com> Message-ID: I don't know... but if this is http and not https, It might be simple enough to just run a wireshark session:) HTH, Mohamed. 2009/3/17 David Bunch : > Hey everyone,? firstly, I want to thank you Jeff, for being so patient with > me, and the quick turn around on that bug.? You rock, and your client > rocks!? Secondly, > does anyone know how you can log http headers that are sent and recieved? > the documentation says that to log sent and received soap/http headers > simply add these? lines to the top of your code: > > import logging > logging.basicConfig(level=logging.INFO) > logging.getLogger('suds.client').setLevel(logging.DEBUG) > > However this only logs soap headers and soap messages not http headers. > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list > -- " Logic merely sanctions the conquests of the intuition." Jacques Hadamard From lrhazi at gmail.com Wed Mar 18 01:55:03 2009 From: lrhazi at gmail.com (Mohamed Lrhazi) Date: Tue, 17 Mar 2009 20:55:03 -0500 Subject: [Fedora-suds-list] setting a cookie In-Reply-To: References: <1467cd8e0903171756h1f1014f4r7215018474c6157c@mail.gmail.com> Message-ID: Ignore me. I think you are on the right path trying to install your own transport... On Tue, Mar 17, 2009 at 8:43 PM, Mohamed Lrhazi wrote: > I am guessing here.... > you are attempting to configure the http client to automatically > manage cookies for you... > if all you need is send a cookie and if you already know its value, > whats wrong with just setting it like I suggested as a simple > additional header? > are you over complicating it, or am completely mis understanding the issue? > > Mohamed. > > 2009/3/17 David Bunch : >> Is this not the correct way set a cookie in suds? >> >> ?????? # Create session cookie. >> ??????? oizysSessionCookie = cookielib.Cookie(version=None, >> ?????????????????????????????????????????????????? name="ASP.NET_SessionId", >> >> value=self.loginCredentials.session_id, >> ?????????????????????????????????????????????????? port="8082", >> ?????????????????????????????????????????????????? port_specified=False, >> ?????????????????????????????????????????????????? domain="127.0.0.1", >> ?????????????????????????????????????????????????? domain_specified=True, >> ?????????????????????????????????????????????????? domain_initial_dot=False, >> ?????????????????????????????????????????????????? path="ISTSessionId", >> ?????????????????????????????????????????????????? path_specified=True, >> ?????????????????????????????????????????????????? secure=False, >> ?????????????????????????????????????????????????? expires=None, >> ?????????????????????????????????????????????????? discard=True, >> ?????????????????????????????????????????????????? comment=None, >> ?????????????????????????????????????????????????? comment_url=None, >> ?????????????????????????????????????????????????? rest=None) >> ??????? # Add cookie to clients >> ??????? commandClient = Client(commandUrl) >> >> commandClient.options.transport.cookiejar.set_cookie(oizysSessionCookie) >> ??????? monitorClient = Client(monitorUrl) >> >> monitorClient.options.transport.cookiejar.set_cookie(oizysSessionCookie) >> >> _______________________________________________ >> fedora-suds-list mailing list >> fedora-suds-list at redhat.com >> https://www.redhat.com/mailman/listinfo/fedora-suds-list >> > > > > -- > " Logic merely sanctions the conquests of the intuition." > Jacques Hadamard > -- " Logic merely sanctions the conquests of the intuition." Jacques Hadamard From jortel at redhat.com Wed Mar 18 12:29:31 2009 From: jortel at redhat.com (Jeff Ortel) Date: Wed, 18 Mar 2009 08:29:31 -0400 Subject: [Fedora-suds-list] setting a cookie In-Reply-To: <1467cd8e0903171756h1f1014f4r7215018474c6157c@mail.gmail.com> References: <1467cd8e0903171756h1f1014f4r7215018474c6157c@mail.gmail.com> Message-ID: <49C0E92B.2060504@redhat.com> The transport already uses cookielib to round-trip cookies. But, it looks like in this case, you need to add a cookie using the value returned in a previous call, right? Seeing how there is a need ... I'd like to add a way to set and get cookies to the client api but don't want to tie it to a specific transport implementation (cookiejar and urllib2). How many of these cookie parameters are generic? Eg: > > import from suds.cookie import Cookie > > cookie = Cookie(port="8082", # I'd bet many of these could be defaulted. > port_specified=False, > domain="127.0.0.1", > domain_specified=True, > domain_initial_dot=False, > path="ISTSessionId", > path_specified=True, > secure=False, > expires=None, > discard=True, > comment=None, > comment_url=None, > rest=None) > > client.setcookie(cookie) > cookies = client.getcookies() > Would this be a good idea? Thoughts, suggestions? I'm not an expert on cookies :) David Bunch wrote: > Is this not the correct way set a cookie in suds? > > # Create session cookie. > oizysSessionCookie = cookielib.Cookie(version=None, > name="ASP.NET_SessionId", > > value=self.loginCredentials.session_id, > port="8082", > port_specified=False, > domain="127.0.0.1", > domain_specified=True, > domain_initial_dot=False, > path="ISTSessionId", > path_specified=True, > secure=False, > expires=None, > discard=True, > comment=None, > comment_url=None, > rest=None) > # Add cookie to clients > commandClient = Client(commandUrl) > > commandClient.options.transport.cookiejar.set_cookie(oizysSessionCookie) > monitorClient = Client(monitorUrl) > > monitorClient.options.transport.cookiejar.set_cookie(oizysSessionCookie) > > > ------------------------------------------------------------------------ > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From jortel at redhat.com Wed Mar 18 12:31:55 2009 From: jortel at redhat.com (Jeff Ortel) Date: Wed, 18 Mar 2009 08:31:55 -0400 Subject: [Fedora-suds-list] you must all hate me by now, but...how do you get http header logging info? In-Reply-To: <1467cd8e0903171835x634a23c2l32318a40d9888041@mail.gmail.com> References: <1467cd8e0903171835x634a23c2l32318a40d9888041@mail.gmail.com> Message-ID: <49C0E9BB.6010906@redhat.com> David Bunch wrote: > Hey everyone, firstly, I want to thank you Jeff, for being so patient > with me, and the quick turn around on that bug. You rock, and your > client rocks! Thanks! Glad you find it useful :-) Secondly, > does anyone know how you can log http headers that are sent and > recieved? the documentation says that to log sent and received > soap/http headers simply add these lines to the top of your code: > > import logging > logging.basicConfig(level=logging.INFO) > logging.getLogger('suds.client').setLevel(logging.DEBUG) This is the correct way to turn on logging for this. But, the http headers are not logged. I'll add it this morning. > > However this only logs soap headers and soap messages not http headers. > > > ------------------------------------------------------------------------ > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From Patrick.A.Walter at usa-spaceops.com Wed Mar 18 12:38:29 2009 From: Patrick.A.Walter at usa-spaceops.com (Walter, Patrick A) Date: Wed, 18 Mar 2009 07:38:29 -0500 Subject: [Fedora-suds-list] SUDS setup on Linux In-Reply-To: <49C0E9BB.6010906@redhat.com> References: <1467cd8e0903171835x634a23c2l32318a40d9888041@mail.gmail.com> <49C0E9BB.6010906@redhat.com> Message-ID: <97A0DC25CC967E41B59BB64DEAA717EC03D56F49@usatxcms07.tx.usa-spaceops.com> SUDS works great!! We've been able to demo it in our project for web services that are written in Java. I have used SUDS on the Windows platform using both NetBeans and Eclipse. To run it I put the SUDS distribution in the Python site-packages directory. That seemed to work. But, I need to move it to Linux. How is this to be setup. I don't have admin privileges. Do I need to build it? Thanks for your HELP!! Patrick From rjalves at igc.gulbenkian.pt Wed Mar 18 13:47:11 2009 From: rjalves at igc.gulbenkian.pt (Renato Alves) Date: Wed, 18 Mar 2009 13:47:11 +0000 Subject: [Fedora-suds-list] SUDS setup on Linux In-Reply-To: <97A0DC25CC967E41B59BB64DEAA717EC03D56F49@usatxcms07.tx.usa-spaceops.com> References: <1467cd8e0903171835x634a23c2l32318a40d9888041@mail.gmail.com> <49C0E9BB.6010906@redhat.com> <97A0DC25CC967E41B59BB64DEAA717EC03D56F49@usatxcms07.tx.usa-spaceops.com> Message-ID: <49C0FB5F.8070404@igc.gulbenkian.pt> You just need to place the suds folder somewhere and add that location to the PYTHONPATH. After that you should be able to import suds without problems. Quoting Walter, Patrick A on 03/18/2009 12:38 PM: > SUDS works great!! We've been able to demo it in our project for web services that are written in Java. > > I have used SUDS on the Windows platform using both NetBeans and Eclipse. To run it I put the SUDS distribution in the Python site-packages directory. That > seemed to work. > > But, I need to move it to Linux. How is this to be setup. I don't have admin privileges. Do I need to build it? > > Thanks for your HELP!! > Patrick > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From dalloliogm at gmail.com Wed Mar 18 13:55:36 2009 From: dalloliogm at gmail.com (Giovanni Marco Dall'Olio) Date: Wed, 18 Mar 2009 14:55:36 +0100 Subject: [Fedora-suds-list] SUDS setup on Linux In-Reply-To: <49C0FB5F.8070404@igc.gulbenkian.pt> References: <1467cd8e0903171835x634a23c2l32318a40d9888041@mail.gmail.com> <49C0E9BB.6010906@redhat.com> <97A0DC25CC967E41B59BB64DEAA717EC03D56F49@usatxcms07.tx.usa-spaceops.com> <49C0FB5F.8070404@igc.gulbenkian.pt> Message-ID: <5aa3b3570903180655g7fc19d29j9be3687325e4be7d@mail.gmail.com> On Wed, Mar 18, 2009 at 2:47 PM, Renato Alves wrote: > You just need to place the suds folder somewhere and add that location > to the PYTHONPATH. > > After that you should be able to import suds without problems. As an alternative, you can learn to use easy_install. Install it following the instructions here: - http://peak.telecommunity.com/DevCenter/EasyInstall#installing-easy-install - http://pypi.python.org/pypi/setuptools and then install suds with this command: easy_install suds --install-dir= You can install any other python module in the same way, in any os. > Quoting Walter, Patrick A on 03/18/2009 12:38 PM: >> SUDS works great!! We've been able to demo it in our project for web services that are written in Java. >> >> I have used SUDS on the Windows platform using both NetBeans and Eclipse. To run it I put the SUDS distribution in the Python site-packages directory. That >> seemed to work. >> >> But, I need to move it to Linux. How is this to be setup. I don't have admin privileges. Do I need to build it? >> >> Thanks for your HELP!! >> Patrick >> >> _______________________________________________ >> fedora-suds-list mailing list >> fedora-suds-list at redhat.com >> https://www.redhat.com/mailman/listinfo/fedora-suds-list > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list > -- My blog on bioinformatics (now in English): http://bioinfoblog.it From david.e.bunch at gmail.com Wed Mar 18 17:25:19 2009 From: david.e.bunch at gmail.com (David Bunch) Date: Wed, 18 Mar 2009 10:25:19 -0700 Subject: [Fedora-suds-list] setting a cookie In-Reply-To: <49C0E92B.2060504@redhat.com> References: <1467cd8e0903171756h1f1014f4r7215018474c6157c@mail.gmail.com> <49C0E92B.2060504@redhat.com> Message-ID: <1467cd8e0903181025h71e76cb0m1776c650fc4fd0ce@mail.gmail.com> Hi Jeff, Thanks for the reply. Yeah unfortunately im not an expert on cookies myself. In fact, as you probably guessed, I'm pretty new to web services and soap in general. I can't really say what would be good defaults on new cookies added through your client API, but, like you said, all I am trying to do is set a cookie to a specific value that was returned to me from a login call (strangely, it does not set the cookie for you, instead it just returns a session ID that it expects you to set it). But yes, I think having a way to set and get cookies via the client API would be a good idea. But thats just IMHO :-) -David On Wed, Mar 18, 2009 at 5:29 AM, Jeff Ortel wrote: > The transport already uses cookielib to round-trip cookies. But, it looks > like in this case, you need to add a cookie using the value returned in a > previous call, right? > > Seeing how there is a need ... I'd like to add a way to set and get cookies > to the client api but don't want to tie it to a specific transport > implementation (cookiejar and urllib2). > > How many of these cookie parameters are generic? > > Eg: > > > > > import from suds.cookie import Cookie > > > > cookie = Cookie(port="8082", # I'd bet many of these > could be defaulted. > > port_specified=False, > > domain="127.0.0.1", > > domain_specified=True, > > domain_initial_dot=False, > > path="ISTSessionId", > > path_specified=True, > > secure=False, > > expires=None, > > discard=True, > > comment=None, > > comment_url=None, > > rest=None) > > > > client.setcookie(cookie) > > cookies = client.getcookies() > > > > Would this be a good idea? > > Thoughts, suggestions? > > I'm not an expert on cookies :) > > David Bunch wrote: > >> Is this not the correct way set a cookie in suds? >> >> # Create session cookie. >> oizysSessionCookie = cookielib.Cookie(version=None, >> >> name="ASP.NET_SessionId", >> >> value=self.loginCredentials.session_id, >> port="8082", >> port_specified=False, >> domain="127.0.0.1", >> domain_specified=True, >> >> domain_initial_dot=False, >> path="ISTSessionId", >> path_specified=True, >> secure=False, >> expires=None, >> discard=True, >> comment=None, >> comment_url=None, >> rest=None) >> # Add cookie to clients >> commandClient = Client(commandUrl) >> >> commandClient.options.transport.cookiejar.set_cookie(oizysSessionCookie) >> monitorClient = Client(monitorUrl) >> >> monitorClient.options.transport.cookiejar.set_cookie(oizysSessionCookie) >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> fedora-suds-list mailing list >> fedora-suds-list at redhat.com >> https://www.redhat.com/mailman/listinfo/fedora-suds-list >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jortel at redhat.com Wed Mar 18 20:55:27 2009 From: jortel at redhat.com (Jeff Ortel) Date: Wed, 18 Mar 2009 16:55:27 -0400 Subject: [Fedora-suds-list] you must all hate me by now, but...how do you get http header logging info? In-Reply-To: <1467cd8e0903171835x634a23c2l32318a40d9888041@mail.gmail.com> References: <1467cd8e0903171835x634a23c2l32318a40d9888041@mail.gmail.com> Message-ID: <49C15FBF.7080600@redhat.com> David Bunch wrote: > Hey everyone, firstly, I want to thank you Jeff, for being so patient > with me, and the quick turn around on that bug. You rock, and your > client rocks! Secondly, > does anyone know how you can log http headers that are sent and > recieved? the documentation says that to log sent and received > soap/http headers simply add these lines to the top of your code: > > import logging > logging.basicConfig(level=logging.INFO) > logging.getLogger('suds.client').setLevel(logging.DEBUG) > > However this only logs soap headers and soap messages not http headers. Oops, my mistake. This (the client debug) already logs the messages and http headers. However, the headers listed are the custom headers added by the user plus the stock onces that suds adds but does *not* include the headers that might be generated by cookielib. So, I added some better logging in the transport today on trunk. To see this you should: > > logging.getLogger('suds.transport').setLevel(logging.DEBUG) > > > > ------------------------------------------------------------------------ > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From jortel at redhat.com Wed Mar 18 22:39:00 2009 From: jortel at redhat.com (Jeff Ortel) Date: Wed, 18 Mar 2009 18:39:00 -0400 Subject: [Fedora-suds-list] Suds caching Message-ID: <49C17804.2030908@redhat.com> All, PERFORMANCE: As of revision 473+ ,0.3.5 (beta), suds provides page caching. The caching only pertains http (GET) of URLs not associated with WS method invocation. Pages such as WSDLs and XSDs are cached. This really helps performance for those of you creating lots of clients. Also, it will really help with any service using rpc/encoded since rpc/encoded wsds commonly imports the encoding schema lots of times. Anyone using a custom transport will not get the caching since it is implemented in the default HttpTransport. More info here: https://fedorahosted.org/suds/wiki/TipsAndTricks#Performance TRANSPORT Also, this commit has some refactoring of transport.py. This module was refactored into a package. This should not affect anyone building custom transports since: > > from suds.transport import Transport, Request > works just the same as before. However, if you have subclassed either HttpTransport or HttpAuthenticated you will have to change your imports. Sorry. Another notable change is Transport.send() has been changed to return a Reply object instead of the page content. Also, the client.SoapClient was setting the transport.Request.message as a sax Element and getting away with it because the HttpTransport.send() was doing str(request.message). But no longer. So, your custom transports should expect transport.Request.message to be a string. Regards, Jeff From shunt at recordsreduction.com Mon Mar 23 14:59:37 2009 From: shunt at recordsreduction.com (Shane Hunt) Date: Mon, 23 Mar 2009 07:59:37 -0700 Subject: [Fedora-suds-list] Document Imaging/Scanning to eliminate paper problems Message-ID: <200903231514.n2NF8jBh023413@mx1.redhat.com> Records Reduction, Inc. has been providing document imaging/scanning services throughout the Southeast US since 1998. We provide following services: * File pickup * Prepping files - removing staples, unfolding paper, moving sticky notes, etc. * Scan files (saved to PDF or Tif) * Index documents for easy retrieval * OCRing available for full text searching * Images returned on disc or uploaded to web for retrieval * Shredding files And we provide these services for much less than the large, national companies! Benefits of Document Imaging/Scanning * Recover Valuable Office Space * Find any file within seconds * Eliminate Lost Files * Save money on costly file cabinets, paper, copying, filing time * Increase worker productivity Benefits of Outsourcing * You do not have to purchase and maintain expensive imaging equipment * You do not have to spend time prepping and scanning documents * Provide a backup CD for offsite storage * Proven quality process already in place * Experts in digital storage and retrieval * We'll do EVERYTHING for you - box the files, scan them, index them, etc. We make your life easier! * We have many real world examples proving we can scan cheaper than you can in house. It's basic Business 101. We buy the best software and scanners on the market. This gives us extreme efficiencies and speed - which means less money to you! * We require no commitment. If you don't like our services, quit using us. You lose nothing for trying! Please respond with your Name, Company Name & Address and we will send you a FREE Sample Imaging CD and Document Imaging Report. There are no strings attached to this offer. It's simply the most effective way to show you how you can save time, space & money using our document management services. Call or email to get more information, or to schedule an appointment. We will scan in a sample at no charge. Shane Hunt 704-724-3313 shunt at recordsreduction.com PO Box 3322, Matthews, NC 28106 http://app.streamsend.com/private/tF8d/2bm/qG6rTab/unsubscribe/3353212 -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.Stangeby at ventelo.no Thu Mar 26 14:40:50 2009 From: David.Stangeby at ventelo.no (Stangeby, David) Date: Thu, 26 Mar 2009 15:40:50 +0100 Subject: [Fedora-suds-list] Adding attribute to the SOAP-ENV:Envelope start tag Message-ID: <7B5EB51AF1B4E7468E944B7F4FC0BE1DDBD042@nokrs01exh01.no.ventelo.local> Hi, I need to add the attribute "SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'" to the start tag "SOAP-ENV:Envelope" in the xml that gets sent to the soap service. The service requires it. But I can't seem to figure out how to do it without hacking the libraries. It works correctly when I manually enter the xml that gets sent using the __inject option when calling the method. Is there some function and adds this to the request xml before sending it? Med vennlig hilsen/Kind regards David Stangeby Avaya R&D Lab Ventelo From straycat000 at yahoo.com Fri Mar 27 06:56:50 2009 From: straycat000 at yahoo.com (Matthew) Date: Thu, 26 Mar 2009 23:56:50 -0700 (PDT) Subject: [Fedora-suds-list] how to set a hyphenated field in client request? Message-ID: <744273.22591.qm@web30206.mail.mud.yahoo.com> Hi, The quick summary is there is a field in a SOAP request named, "event-id", and I'm having trouble setting this field because the name contains a hyphen. How do I get around this? For example: >>> result = client.factory.create('ns0:UserVerifiedEvent') >>> print result (UserVerifiedEvent){ event-id = None user-verified-content[] = domain-specific-attributes = (MediaAttributes){ domain-attribute[] = } } Here's more background. I'm trying to develop an MLB.tv client for Linux and they've changed their web service to a SOAP architecture. A little snooping and I was able to find that the first request sends an event-id and the response has a listing of all media content matching that event-id. The request looks like this: 164-251340-2009-03-12 LIVE_EVENT_COVERAGE Here's the wsdl: >>> import suds >>> from suds.client import Client >>> url = 'http://www.mlb.com/flash/mediaplayer/v4/wsdl/MediaService.wsdl' >>> client = Client(url) >>> print client Suds ( https://fedorahosted.org/suds/ ) version: 0.3.5 (beta) build: R483-20090324 Service ( MediaService2_0 ) tns="http://services.bamnetworks.com/media/2.0" Prefixes (1) ns0 = "http://services.bamnetworks.com/media/types/2.0" Ports (1): (MediaService2_0SOAP11port_http) Methods (1): find(xs:string event-id, xs:long content-id, xs:string playback-scenario, xs:string subject, xs:string ip-address, ns0:CreditCard credit-card, ns0:IdentityPoint fingerprint-identity-point, xs:string session-key, ) Types (28): ns0:Address ns0:AudioTrack ns0:AuthStatus ns0:BlackedOutStatus ns0:BlackoutKeywords ns0:BlackoutStatus ns0:CreditCard ns0:Entitlements ns0:IdentityPoint ns0:LocationCannotBeDeterminedStatus ns0:LoginRequired ns0:MediaAttribute ns0:MediaAttributes ns0:MediaItem ns0:MediaUserLocation ns0:NotAuthorizedStatus ns0:PreviewStatus ns0:ResponseStatusCode ns0:SessionKey ns0:SignOnRestrictionStatus ns0:SuccessStatus ns0:SwarmcastKeyGenResponse ns0:SwarmcastKeyStatusCode ns0:UserVerifiedContent ns0:UserVerifiedEvent ns0:UserVerifiedMediaItem ns0:UserVerifiedMediaRequest ns0:UserVerifiedMediaResponse Now, I'm still trying to learn SOAP, WSDL, and suds, but somehow I need to set the event-id. I thought maybe I needed to create a UserVerifiedEvent so I tried that but I'm stumped at how to set a value to event-id because of the hyphen. >>> result = client.factory.create('ns0:UserVerifiedEvent') >>> print result (UserVerifiedEvent){ event-id = None user-verified-content[] = domain-specific-attributes = (MediaAttributes){ domain-attribute[] = } } >>> result.event-id = '164-251340-2009-03-12' SyntaxError: can't assign to operator Any ideas? Thanks, Matthew Levine https://sourceforge.net/projects/mlbviewer/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From fishhead1026 at gmail.com Fri Mar 27 07:57:37 2009 From: fishhead1026 at gmail.com (David Yu) Date: Fri, 27 Mar 2009 15:57:37 +0800 Subject: [Fedora-suds-list] Parsing SOAP headers in reply message Message-ID: <355e950c0903270057l1423a015r2a6a5624f3615dc8@mail.gmail.com> Hi, First, thanks Jeff providing so fancy utility for accessing SOAP web service. :) Currently I am interested in reply SOAP header, and also want to know will it be provided in 0.3.5? So that the functionality will be more complete. Thanks! David -------------- next part -------------- An HTML attachment was scrubbed... URL: From jortel at redhat.com Fri Mar 27 14:21:48 2009 From: jortel at redhat.com (Jeff Ortel) Date: Fri, 27 Mar 2009 10:21:48 -0400 Subject: [Fedora-suds-list] how to set a hyphenated field in client request? In-Reply-To: <744273.22591.qm@web30206.mail.mud.yahoo.com> References: <744273.22591.qm@web30206.mail.mud.yahoo.com> Message-ID: <49CCE0FC.5020003@redhat.com> Hey Matthew, The suds.sudsobject implements __getitem__() and __setitem__() just for this reason. Try: > > result['user-verified-content'].append(a) > result['user-verified-content'].append(b) > result['user-verified-content'].append(c) > or > > result['user-verified-content'] = [a,b,c] > Regards, Jeff Matthew wrote: > Hi, > > The quick summary is there is a field in a SOAP request named, > "event-id", and I'm having trouble setting this field because the name > contains a hyphen. How do I get around this? For example: > > >>> result = client.factory.create('ns0:UserVerifiedEvent') > >>> print result > (UserVerifiedEvent){ > event-id = None > user-verified-content[] = > domain-specific-attributes = > (MediaAttributes){ > domain-attribute[] = > } > } > > > Here's more background. > > I'm trying to develop an MLB.tv client for Linux and they've changed > their web service to a SOAP architecture. > > A little snooping and I was able to find that the first request sends an > event-id and the response has a listing of all media content matching > that event-id. > > The request looks like this: > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > xmlns:scma="http://services.bamnetworks.com/media/types/2.0"> > 164-251340-2009-03-12 > LIVE_EVENT_COVERAGE > > > > > > Here's the wsdl: > > >>> import suds > >>> from suds.client import Client > >>> url = 'http://www.mlb.com/flash/mediaplayer/v4/wsdl/MediaService.wsdl' > >>> client = Client(url) > >>> print client > > Suds ( https://fedorahosted.org/suds/ ) version: 0.3.5 (beta) build: > R483-20090324 > > Service ( MediaService2_0 ) tns="http://services.bamnetworks.com/media/2.0" > Prefixes (1) > ns0 = "http://services.bamnetworks.com/media/types/2.0" > Ports (1): > (MediaService2_0SOAP11port_http) > Methods (1): > find(xs:string event-id, xs:long content-id, xs:string > playback-scenario, xs:string subject, xs:string ip-address, > ns0:CreditCard credit-card, ns0:IdentityPoint > fingerprint-identity-point, xs:string session-key, ) > Types (28): > ns0:Address > ns0:AudioTrack > ns0:AuthStatus > ns0:BlackedOutStatus > ns0:BlackoutKeywords > ns0:BlackoutStatus > ns0:CreditCard > ns0:Entitlements > ns0:IdentityPoint > ns0:LocationCannotBeDeterminedStatus > ns0:LoginRequired > ns0:MediaAttribute > ns0:MediaAttributes > ns0:MediaItem > ns0:MediaUserLocation > ns0:NotAuthorizedStatus > ns0:PreviewStatus > ns0:ResponseStatusCode > ns0:SessionKey > ns0:SignOnRestrictionStatus > ns0:SuccessStatus > ns0:SwarmcastKeyGenResponse > ns0:SwarmcastKeyStatusCode > ns0:UserVerifiedContent > ns0:UserVerifiedEvent > ns0:UserVerifiedMediaItem > ns0:UserVerifiedMediaRequest > ns0:UserVerifiedMediaResponse > > Now, I'm still trying to learn SOAP, WSDL, and suds, but somehow I need > to set the event-id. I thought maybe I needed to create a > UserVerifiedEvent so I tried that but I'm stumped at how to set a value > to event-id because of the hyphen. > > >>> result = client.factory.create('ns0:UserVerifiedEvent') > >>> print result > (UserVerifiedEvent){ > event-id = None > user-verified-content[] = > domain-specific-attributes = > (MediaAttributes){ > domain-attribute[] = > } > } > >>> result.event-id = '164-251340-2009-03-12' > SyntaxError: can't assign to operator > > > Any ideas? > > Thanks, > Matthew Levine > https://sourceforge.net/projects/mlbviewer/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From straycat000 at yahoo.com Fri Mar 27 18:18:48 2009 From: straycat000 at yahoo.com (Matthew) Date: Fri, 27 Mar 2009 11:18:48 -0700 (PDT) Subject: [Fedora-suds-list] namespaces and schemas Message-ID: <590574.49879.qm@web30206.mail.mud.yahoo.com> Thanks Jeff for your quick response. I'm still trying to figure out SOAP and suds. My request is supposed to look like this: 164-251340-2009-03-12 LIVE_EVENT_COVERAGE But instead, it comes out looking like this: 164-251340-2009-03-12 LIVE_EVENT_COVERAGE I have two questions. 1. I have included: > client.add_prefix('scma','http://services.bamnetworks.com/media/types/2.0') > request = client.factory.create('scma:UserVerifiedMediaRequest') and yet the request still goes out as ns0: rather than scma: 2. How come event-id and subject are wrapped within another event-id? Should I just try going with literal xml? Thanks, Matthew Here's my source code so far: import logging logging.basicConfig(level=logging.INFO) from suds.client import Client logging.getLogger('suds.client').setLevel(logging.DEBUG) url = 'http://www.mlb.com/flash/mediaplayer/v4/wsdl/MediaService.wsdl' client = Client(url) print client client.add_prefix('scma','http://services.bamnetworks.com/media/types/2.0') request = client.factory.create('scma:UserVerifiedMediaRequest') print request request.__setitem__('event-id','164-251340-2009-03-12') request.__setitem__('subject','LIVE_EVENT_COVERAGE') result = client.service.find(request) print result -------------- next part -------------- An HTML attachment was scrubbed... URL: From straycat000 at yahoo.com Tue Mar 31 22:40:43 2009 From: straycat000 at yahoo.com (Matthew) Date: Tue, 31 Mar 2009 15:40:43 -0700 (PDT) Subject: [Fedora-suds-list] suds.WebFault: Server raised fault: 'Error in JiBX marshalling' ?? Message-ID: <458201.31332.qm@web30203.mail.mud.yahoo.com> Can you tell me what this error might mean? I realize this isn't the suds code generating this error but perhaps you might be more informative than my google search. At the very least, I'd like to generate an error message to the user that's a bit more helpful than this. Thanks, Matthew -------------- next part -------------- An HTML attachment was scrubbed... URL: