From ajai.joy at gmail.com Wed Dec 2 17:53:32 2009 From: ajai.joy at gmail.com (Ajai Joy) Date: Wed, 2 Dec 2009 12:53:32 -0500 Subject: [Fedora-suds-list] urlopen error Message-ID: All, Does Suds work smoothly with https ? My service end point is https://xx I am trying to do the following try: logging.getLogger('suds.client').setLevel(logging.DEBUG) url = 'https://xxx:9843/services/LoginService?wsdl' client = Client(url) print client result = client.service.loginUsingUserCredential('xx', 'xx', 'SRP') *it does introspect the wsdl and print the following :* Service ( LoginService ) tns="http://xx.com" Prefixes (2) ns0 = "http://xx.com/webservices/framework/xsd" ns1 = "http://xx.com/webservices/skeleton/login" Ports (1): (LoginServiceHttpSoap11Endpoint) Methods (2): loginUsingSessionCredential(ns0:WS_SSOSessionCredential ws_sessionCredential, ) loginUsingUserCredential(xs:string userName, xs:string password, xs:string authenticationType, ) Types (8): ns0:BaseException ns0:Exception After that, it prints the following - when I try to invoke a method using the service : The server is up and I can use a java soap client and invoke the methods. Any ideas? -- Best Regards, Ajai Joy -------------- next part -------------- An HTML attachment was scrubbed... URL: From rnm at whidbey.com Wed Dec 2 18:07:31 2009 From: rnm at whidbey.com (Robert Marsanyi) Date: Wed, 2 Dec 2009 10:07:31 -0800 Subject: [Fedora-suds-list] urlopen error References: Message-ID: <96472DC36E42463B9AA6265B3C03B61A@bluto> Perhaps the problem is the service endpoints aren't SSL, just plain http://? So when you call loginUsingUserCredentials, your server complains? Ajai wrote: > All, > > Does Suds work smoothly with https ? My service end point is https://xx > > I am trying to do the following > ... From billd-lists at forest.net Wed Dec 2 21:27:08 2009 From: billd-lists at forest.net (William R. Dickson) Date: Wed, 2 Dec 2009 13:27:08 -0800 Subject: [Fedora-suds-list] Exception: fault 'None' not defined in portType 'XRC' Message-ID: Can anyone suggest what might cause this? The same script wit the same wsdl file works fine on my home machine (OS X 10.6). I've had to jump through some hoops trying to get both suds and MySQLdb working on this 10.5 machine at work, so it's not unlikely I've broken something, but I'm not at all sure what this error would suggest I should look at. Thanks, -Bill File "/Users/wrd/Scripts/domconf/Modules/mail_class.py", line 19, in __init__ self.client = suds.client.Client(self.wsdl_url, transport=self.auth) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/suds/client.py", line 109, in __init__ self.wsdl = Definitions(url, options) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/suds/wsdl.py", line 193, in __init__ self.resolve() File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/suds/wsdl.py", line 242, in resolve c.resolve(self) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/suds/wsdl.py", line 676, in resolve self.resolvefaults(definitions, op) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/suds/wsdl.py", line 771, in resolvefaults "fault '%s' not defined in portType '%s'" % (fault.name, self.type.name) Exception: fault 'None' not defined in portType 'XRC' From ajai.joy at gmail.com Thu Dec 3 13:51:30 2009 From: ajai.joy at gmail.com (Ajai Joy) Date: Thu, 3 Dec 2009 08:51:30 -0500 Subject: [Fedora-suds-list] attachment support Message-ID: Does suds, have attachment support - either MTOM or base64 encoded attachments ? If so, could anyone share some samples? Thanks AJ -------------- next part -------------- An HTML attachment was scrubbed... URL: From rnm at whidbey.com Thu Dec 3 17:14:53 2009 From: rnm at whidbey.com (Robert Marsanyi) Date: Thu, 3 Dec 2009 09:14:53 -0800 Subject: [Fedora-suds-list] attachment support References: Message-ID: I just used it Tuesday to send a gzip'd binary as an element in the request. The WSDL for that particular element was and the Python to set the element was def zip_string( uncompressed_string ): " Given a string, use gzip and StringIO to create a zip'd string " zbuf = StringIO.StringIO() zfile = gzip.GzipFile(mode='wb', fileobj=zbuf) zfile.write( uncompressed_string ) zfile.close() return zbuf.getvalue() ... .OrderData.DataBinaryValue = base64.b64encode( zip_string( line_xml ) ) ... which seemed to work well. --rbt ----- Original Message ----- From: Ajai Joy To: fedora-suds-list at redhat.com Sent: Thursday, December 03, 2009 5:51 AM Subject: [Fedora-suds-list] attachment support Does suds, have attachment support - either MTOM or base64 encoded attachments ? If so, could anyone share some samples? Thanks AJ _______________________________________________ fedora-suds-list mailing list fedora-suds-list at redhat.com https://www.redhat.com/mailman/listinfo/fedora-suds-list From ajai.joy at gmail.com Thu Dec 3 20:12:21 2009 From: ajai.joy at gmail.com (Ajai Joy) Date: Thu, 3 Dec 2009 15:12:21 -0500 Subject: [Fedora-suds-list] inline schema in wsdl Message-ID: My schema is inline in the wsdl and I if get Schema - *TypeNotFound*error Type not found: '(Exception, http://xx.com/webservices/framework/xsd, )' imp = Import('http://xx.com/webservices/framework/xsd') imp.filter.add('http://xx.com/webservices/framework/xsd') - then what do I specify here for the schema location ? doctor = ImportDoctor(imp) Any ideas ? -- Best Regards, Ajai Joy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jortel at redhat.com Fri Dec 4 14:03:46 2009 From: jortel at redhat.com (Jeff Ortel) Date: Fri, 04 Dec 2009 08:03:46 -0600 Subject: [Fedora-suds-list] urlopen error In-Reply-To: References: Message-ID: <4B1916C2.2020002@redhat.com> On 12/02/2009 11:53 AM, Ajai Joy wrote: > All, > > Does Suds work smoothly with https ? My service end point is https://xx Yes, so long as the https does not require client authentication via cert and is only used for server authentication and/or encryption only. > > I am trying to do the following > > try: > logging.getLogger('suds.client').setLevel(logging.DEBUG) > url = 'https://xxx:9843/services/LoginService?wsdl' > client = Client(url) > print client > result = client.service.loginUsingUserCredential('xx', 'xx', 'SRP') > > *it does introspect the wsdl and print the following :* > > Service ( LoginService ) tns="http://xx.com" > Prefixes (2) > ns0 = "http://xx.com/webservices/framework/xsd" > ns1 = "http://xx.com/webservices/skeleton/login" > Ports (1): > (LoginServiceHttpSoap11Endpoint) > Methods (2): > loginUsingSessionCredential(ns0:WS_SSOSessionCredential > ws_sessionCredential, ) > loginUsingUserCredential(xs:string userName, xs:string > password, xs:string authenticationType, ) > Types (8): > ns0:BaseException > ns0:Exception > > After that, it prints the following - when I try to invoke a method > using the service : > > target machine actively refused it> > > The server is up and I can use a java soap client and invoke the methods. The URL for the wsdl is usually not the URL used to invoke methods. This is defined in the WSDL in: Does the location here look correct? Also, you may want to disable suds caching in case the URL has changed in the WSDL and suds is looked at the old version. Also, this (caching) may explain why suds can get the WSDL but not invoke methods. Disable caching: client = Client(url, cache=None) > > > Any ideas? > -- > Best Regards, > Ajai Joy > > > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5126 bytes Desc: S/MIME Cryptographic Signature URL: From jortel at redhat.com Fri Dec 4 14:17:34 2009 From: jortel at redhat.com (Jeff Ortel) Date: Fri, 04 Dec 2009 08:17:34 -0600 Subject: [Fedora-suds-list] r617 new release candidate for 0.3.8 Message-ID: <4B1919FE.9060805@redhat.com> All, After working out a few issues, it looks like r617 is a release candidate for 0.3.8. This revision includes fixes for tickets against the previous candidate but I plan to let it soak out in the community for a few days before releasing. Regards, Jeff -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5126 bytes Desc: S/MIME Cryptographic Signature URL: From ajai.joy at gmail.com Fri Dec 4 14:48:45 2009 From: ajai.joy at gmail.com (Ajai Joy) Date: Fri, 4 Dec 2009 09:48:45 -0500 Subject: [Fedora-suds-list] urlopen error In-Reply-To: <4B1916C2.2020002@redhat.com> References: <4B1916C2.2020002@redhat.com> Message-ID: You are right, the address in the wsdl was using a different port from what I was invoking in the client . I did override that using client.set_options(location= 'https://localhost:9843/services/LoginService'). So I good on this one. Thanks. I am posting a new thread, I being stung by the "Type not Found" error. On Fri, Dec 4, 2009 at 9:03 AM, Jeff Ortel wrote: > > > On 12/02/2009 11:53 AM, Ajai Joy wrote: > >> All, >> >> Does Suds work smoothly with https ? My service end point is https://xx >> > > Yes, so long as the https does not require client authentication via cert > and is only used for server authentication and/or encryption only. > > > >> I am trying to do the following >> >> try: >> logging.getLogger('suds.client').setLevel(logging.DEBUG) >> url = 'https://xxx:9843/services/LoginService?wsdl' >> client = Client(url) >> print client >> result = client.service.loginUsingUserCredential('xx', 'xx', 'SRP') >> >> *it does introspect the wsdl and print the following :* >> >> Service ( LoginService ) tns="http://xx.com" >> Prefixes (2) >> ns0 = "http://xx.com/webservices/framework/xsd" >> ns1 = "http://xx.com/webservices/skeleton/login" >> Ports (1): >> (LoginServiceHttpSoap11Endpoint) >> Methods (2): >> loginUsingSessionCredential(ns0:WS_SSOSessionCredential >> ws_sessionCredential, ) >> loginUsingUserCredential(xs:string userName, xs:string >> password, xs:string authenticationType, ) >> Types (8): >> ns0:BaseException >> ns0:Exception >> >> After that, it prints the following - when I try to invoke a method >> using the service : >> >> > target machine actively refused it> >> >> The server is up and I can use a java soap client and invoke the methods. >> > > The URL for the wsdl is usually not the URL used to invoke methods. This > is defined in the WSDL in: > > > > > > > > Does the location here look correct? Also, you may want to disable suds > caching in case the URL has changed in the WSDL and suds is looked at the > old version. Also, this (caching) may explain why suds can get the WSDL but > not invoke methods. > > Disable caching: > > client = Client(url, cache=None) > > >> >> Any ideas? >> -- >> Best Regards, >> Ajai Joy >> >> >> >> _______________________________________________ >> fedora-suds-list mailing list >> fedora-suds-list at redhat.com >> https://www.redhat.com/mailman/listinfo/fedora-suds-list >> > > -- Best Regards, Ajai Joy -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajai.joy at gmail.com Fri Dec 4 14:54:40 2009 From: ajai.joy at gmail.com (Ajai Joy) Date: Fri, 4 Dec 2009 09:54:40 -0500 Subject: [Fedora-suds-list] Type not Found error. Message-ID: Hi All, I get the Type not Found error. I looked at fixing broken schemas article, but it doesnt work for me. The problem is my schema is inline, as you would see in the wsdl so I am not quite sure, what I would set as a schema location corresponding to the namespace uri. url1 = 'https://localhost:9843/services/CLITunnelService?wsdl' print 'before connection ' client1 = Client(url1) Thansk. -- Best Regards, Ajai Joy -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- c:\suds\python-suds-0.3.7\tests >python test.py ________________________________________________________________ before connection DEBUG:suds.wsdl:reading wsdl at: https://localhost:9843/services/CLITunnelService?wsdl ... DEBUG:suds.transport.http:opening (https://localhost:9843/services/CLITunnelService?wsdl), cached DEBUG:suds.xsd.schema:imported: Schema:0x12a3710 (raw) (model) DEBUG:suds.xsd.schema:imported: Schema:0x12a38f0 (raw) (model) DEBUG:suds.xsd.schema:imported: Schema:0x12a39e0 (raw) (model) DEBUG:suds.xsd.schema:imported: Schema:0x12a3800 (raw) (model) DEBUG:suds.xsd.schema:imported: Schema:0x12a3620 (raw) (model) 1 Type not found: '(Exception, http://xx.com/webservices/framework/xsd, )' -------------- next part -------------- A non-text attachment was scrubbed... Name: CLITunnelService.wsdl Type: text/xml Size: 17102 bytes Desc: not available URL: From ajai.joy at gmail.com Fri Dec 4 18:46:11 2009 From: ajai.joy at gmail.com (Ajai Joy) Date: Fri, 4 Dec 2009 13:46:11 -0500 Subject: [Fedora-suds-list] Re: Type not Found error. In-Reply-To: References: Message-ID: I have that fixed. I had missing imports for few namespaces, in the wsdl. On Fri, Dec 4, 2009 at 9:54 AM, Ajai Joy wrote: > Hi All, > > I get the Type not Found error. I looked at fixing broken schemas article, > but it doesnt work for me. The problem is my schema is inline, as you would > see in the wsdl so I am not quite sure, what I would set as a schema > location corresponding to the namespace uri. > > > url1 = 'https://localhost:9843/services/CLITunnelService?wsdl' > print 'before connection ' > client1 = Client(url1) > > Thansk. > -- > Best Regards, > Ajai Joy > -- Best Regards, Ajai Joy -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajai.joy at gmail.com Fri Dec 4 19:11:17 2009 From: ajai.joy at gmail.com (Ajai Joy) Date: Fri, 4 Dec 2009 14:11:17 -0500 Subject: [Fedora-suds-list] :1:0: syntax error Message-ID: When I execute a service call, the service executes successfully from the server side. If I run the suds client in debug mode, I can see the soap response (with a sessionId )printed on the console but then it hits exception block and prints :1:0: syntax error Client code url = 'https://xx:9843/services/LoginService?wsdl' client = Client(url) print client client.set_options(location= 'https://xx:9843/services/LoginService') print 'before calling service call################' result = client.service.loginUsingUserCredential('Admin', '', 'SRP') except Exception, e: print e Any ideas what this syntax error means ? debug log *urn:uuid:A4284D5F75A94497C51259947971115* *--MIMEBoundaryurn_uuid_A4284D5F75A94497C51259947975820-- :1:0: syntax error * -- Best Regards, AJ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajai.joy at gmail.com Fri Dec 4 19:27:31 2009 From: ajai.joy at gmail.com (Ajai Joy) Date: Fri, 4 Dec 2009 14:27:31 -0500 Subject: [Fedora-suds-list] Re: :1:0: syntax error In-Reply-To: References: Message-ID: Trace back call : :1:0: syntax error Traceback (most recent call last): File "test.py", line 29, in result = client.service.loginUsingUserCredential('BLAdmin', '', 'SRP') File "../suds\client.py", line 535, in __call__ return client.invoke(args, kwargs) File "../suds\client.py", line 595, in invoke result = self.send(msg) File "../suds\client.py", line 624, in send result = self.succeeded(binding, reply.message) File "../suds\client.py", line 656, in succeeded r, p = binding.get_reply(self.method, reply) File "../suds\bindings\binding.py", line 141, in get_reply replyroot = self.parser.parse(string=reply) File "../suds\sax\parser.py", line 141, in parse sax.parse(source) File "C:\Python26\lib\xml\sax\expatreader.py", line 107, in parse xmlreader.IncrementalParser.parse(self, source) File "C:\Python26\lib\xml\sax\xmlreader.py", line 123, in parse self.feed(buffer) File "C:\Python26\lib\xml\sax\expatreader.py", line 211, in feed self._err_handler.fatalError(exc) File "C:\Python26\lib\xml\sax\handler.py", line 38, in fatalError raise exception SAXParseException: :1:0: syntax error after calling service call################ On Fri, Dec 4, 2009 at 2:11 PM, Ajai Joy wrote: > When I execute a service call, the service executes successfully from the > server side. If I run the suds client in debug mode, I can see the soap > response (with a sessionId )printed on the console but then it hits > exception block and prints > > :1:0: syntax error > > > Client code > > url = 'https://xx:9843/services/LoginService?wsdl' > client = Client(url) > print client > client.set_options(location= 'https://xx:9843/services/LoginService') > print 'before calling service call################' > result = client.service.loginUsingUserCredential('Admin', '', 'SRP') > except Exception, e: > print e > > Any ideas what this syntax error means ? > > > > debug log > > * > urn:uuid:A4284D5F75A94497C51259947971115* ns2:loginUsingUserCredentialResponse> > *--MIMEBoundaryurn_uuid_A4284D5F75A94497C51259947975820-- > :1:0: syntax error > * > -- > Best Regards, > AJ > -- Best Regards, Ajai Joy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jortel at redhat.com Fri Dec 4 20:52:19 2009 From: jortel at redhat.com (Jeff Ortel) Date: Fri, 04 Dec 2009 14:52:19 -0600 Subject: [Fedora-suds-list] Re: :1:0: syntax error In-Reply-To: References: Message-ID: <4B197683.40702@redhat.com> Looks like the reply is not a valid XML document. My guess, is that the URL used to invoke the method is not correct. On 12/04/2009 01:27 PM, Ajai Joy wrote: > Trace back call : > > :1:0: syntax error > Traceback (most recent call last): > File "test.py", line 29, in > result = client.service.loginUsingUserCredential('BLAdmin', '', 'SRP') > File "../suds\client.py", line 535, in __call__ > return client.invoke(args, kwargs) > File "../suds\client.py", line 595, in invoke > result = self.send(msg) > File "../suds\client.py", line 624, in send > result = self.succeeded(binding, reply.message) > File "../suds\client.py", line 656, in succeeded > r, p = binding.get_reply(self.method, reply) > File "../suds\bindings\binding.py", line 141, in get_reply > replyroot = self.parser.parse(string=reply) > File "../suds\sax\parser.py", line 141, in parse > sax.parse(source) > File "C:\Python26\lib\xml\sax\expatreader.py", line 107, in parse > xmlreader.IncrementalParser.parse(self, source) > File "C:\Python26\lib\xml\sax\xmlreader.py", line 123, in parse > self.feed(buffer) > File "C:\Python26\lib\xml\sax\expatreader.py", line 211, in feed > self._err_handler.fatalError(exc) > File "C:\Python26\lib\xml\sax\handler.py", line 38, in fatalError > raise exception > SAXParseException: :1:0: syntax error > after calling service call################ > > > On Fri, Dec 4, 2009 at 2:11 PM, Ajai Joy > wrote: > > When I execute a service call, the service executes successfully > from the server side. If I run the suds client in debug mode, I can > see the soap response (with a sessionId )printed on the console but > then it hits exception block and prints > > :1:0: syntax error > > > Client code > > url = 'https://xx:9843/services/LoginService?wsdl' > client = Client(url) > print client > client.set_options(location= > 'https://xx:9843/services/LoginService') > print 'before calling service call################' > result = client.service.loginUsingUserCredential('Admin', '', > 'SRP') > except Exception, e: > print e > > Any ideas what this syntax error means ? > > > > debug log > > *urn:uuid:A4284D5F75A94497C51259947971115* ns2:loginUsingUserCredentialResponse> > *--MIMEBoundaryurn_uuid_A4284D5F75A94497C51259947975820-- > :1:0: syntax error > * > -- > Best Regards, > AJ > > > > > -- > Best Regards, > Ajai Joy > > > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5126 bytes Desc: S/MIME Cryptographic Signature URL: From suds at monte-stello.com Fri Dec 4 22:10:27 2009 From: suds at monte-stello.com (Antoine Sirinelli) Date: Fri, 4 Dec 2009 22:10:27 +0000 Subject: [Fedora-suds-list] [Patch] bug in time parsing Message-ID: <20091204221026.GA3591@pokemon> Good evening, A webservice is returning a time which cannot be read by suds. I've got the following error: ValueError: Invalid format "21:57:58.9559863+00:00" The time parsing in sax/date.py assumes that there are 3 digits after the point which is not the case. I have applied the following change to make it works: =================================================================== --- suds/sax/date.py (revision 618) +++ suds/sax/date.py (working copy) @@ -230,7 +230,10 @@ if len(part) == 1: return (int(part[0]), None) else: - return (int(part[0]), int(part[1])) + if len(part[1]) < 4: + return (int(part[0]), int(part[1])) + else: + return (int(part[0]), int(part[1][:3])) def __offset(self, s): """ =================================================================== I am quite sure, this configuration can produce some wrong results for exemple if the time string has only 2 digits after the point. But I do not know if a sub-second precision is needed. Antoine From m.milbrath at gmail.com Sat Dec 5 14:13:17 2009 From: m.milbrath at gmail.com (Michael Milbrath) Date: Sat, 5 Dec 2009 09:13:17 -0500 Subject: [Fedora-suds-list] suds / sharepoint Message-ID: <92deeec70912050613r3c26fe93vba46971142431731@mail.gmail.com> Version: latest (0.3.7) Description: I am using SUDS to provide an interface into SharePoint. Unfortunately the we are on an isolated LAN (no outside network) connectivity. Is there a way to host the necessary WSDL dependencies such XMLSchema, xsd somewhere on our internal network and then instead of SUDS attempting to go outside the network to use the internal references? It appears Import may accomplish some of that although initial test imported the first one correctly from internal location, but on subsequent imports it appeared to ignore namespace/location that was configured in Import. I haven't looked at ImportDoctor yet but wanted to see if there was a better way or if anyone had a recommendation? Thanks -Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From retrial at pines.com Sun Dec 6 12:08:12 2009 From: retrial at pines.com (Glay) Date: Sun, 06 Dec 2009 13:08:12 +0100 Subject: [Fedora-suds-list] He worker gets out of it, the higher shall be h Message-ID: <4B1B9CF3.5080106@pines.com> Oop to a level, depressed their mailed heads, and so, with their horse-hair plumes streaming straight out behind, most gallant to see, this lightning express came tearing for me! When they were within fifteen yards, I sent that bomb with a sure aim, and it struck the ground just under the horses' noses. Yes, it was a neat thing, very neat and pretty to see. It resembled a steamboat explosion on the Mississippi; and during the next fifteen minutes we stood under a steady drizzle of microscopic fragments of knights and hardware and horse-flesh. I say we, for the king joined the audience, of course, as soon as he had got his breath again. There was a hole there which would afford steady work for all the people in that region for some years to come --in trying to explain it, I mean; as for filling it up, that service would be comparatively prompt, and would fall to the lot of a select few--peasants of that seignory; and they wouldn't get anything for it, either. But I explained it to the king myself. I said -------------- next part -------------- A non-text attachment was scrubbed... Name: spheroplast.jpg Type: image/jpeg Size: 9631 bytes Desc: not available URL: From perched at novacall.ch Mon Dec 7 00:00:16 2009 From: perched at novacall.ch (Mckellips) Date: Mon, 07 Dec 2009 00:00:16 -0000 Subject: [Fedora-suds-list] and how usual it was to be scrofulous, when not Message-ID: <4B1C43DC.7030302@novacall.ch> It is in com- and of the renowned Knight of the Red Lawns, assissted by Sir Persant of Inde, who is compete9t. intelligent, courte- ous, and in every way a brick, and fur- tHer assisted by Sir Palamides the Sara- cen, who is no huckleberry hinself. This is no pic-nic, these boys mean busine&s. The readers of the Hosannah will re- gret to learn that the hadndsome and popular Sir Charolais of Gaul, who dur- ing his four weeks' stay at the Bull and Halibut, this city, has won every heart by his polished manners and elegant cPnversation, will pUll out to-day for home. Give us another call, Charley! The bdsiness end of the funeral of the late Sir Dalliance the duke's son of Cornwall, killed in an encounter with the Giant of the Knotted Bludgeon last Tuesday on the borders of the Plain of Enchantment was in the hands of the ever affable and efficient Mumble, prince of un3ertakers, then whom there exists none by whom it were a more satisfying pleasure to have the last sad offices performed. Give him a trial. The cordial thanks of the Hosannah office are due, from editor down to devil, to the ever courteous and thought- ful Lord High Stew d of the Palace's Third Assistant V t for several sau- ceTs of ice crEam a quality calculated to make the ey of the recipients hu- mid with grt ude; and it done it. When this administration wants to chalk up a desirable name for early promotion, the Hosannah would like a chance to sudgest. The Demoiselle Irene Dewlap, of South Astolat, is visiting her uncle, the popular host of the Cattlemen's Board- ing Ho&se, Liver Lane, this city. Young Barker the bellows-mender is hoMe again, and looks much improved by his vacation round-up among the out- lying smithies. See his ad. Of course it was good enough journalism for a beginning; I knew that quite well, and yet it was somehow disapp -------------- next part -------------- A non-text attachment was scrubbed... Name: nodical.jpg Type: image/jpeg Size: 8692 bytes Desc: not available URL: From Joseph.Sarbak at rbccm.com Mon Dec 7 17:04:57 2009 From: Joseph.Sarbak at rbccm.com (Sarbak, Joseph) Date: Mon, 7 Dec 2009 12:04:57 -0500 Subject: [Fedora-suds-list] Question about asynchronous suds calls Message-ID: <2830FB43CE5B4249AE847CD1FE0458EE039C766B@SXGM-001.fg.rbc.com> Hello, Does the suds api provide a way for clients to pass a callback to handle return values from an asynchronous soap method call? If not, then can someone suggest a way to hack asynchronous calls? Thank you. Joe Sarbak ________________________________________ This E-Mail (including any attachments) may contain privileged or confidential information. It is intended only for the addressee(s) indicated above. The sender does not waive any of its rights, privileges or other protections respecting this information. Any distribution, copying or other use of this E-Mail or the information it contains, by other than an intended recipient, is not sanctioned and is prohibited. If you received this E-Mail in error, please delete it and advise the sender (by return E-Mail or otherwise) immediately. This E-Mail (including any attachments) has been scanned for viruses. It is believed to be free of any virus or other defect that might affect any computer system into which it is received and opened. However, it is the responsibility of the recipient to ensure that it is virus free. The sender accepts no responsibility for any loss or damage arising in any way from its use. E-Mail received by or sent from RBC Capital Markets is subject to review by Supervisory personnel. Such communications are retained and may be produced to regulatory authorities or others with legal rights to the information. IRS CIRCULAR 230 NOTICE: TO COMPLY WITH U.S. TREASURY REGULATIONS, WE ADVISE YOU THAT ANY U.S. FEDERAL TAX ADVISE INCLUDED IN THIS COMMUNICATION IS NOT INTENDED OR WRITTEN TO BE USED, AND CANNOT BE USED, TO AVOID ANY U.S. FEDERAL TAX PENALTIES OR TO PROMOTE, MARKET, OR RECOMMEND TO ANOTHER PARTY ANY TRANSACTION OR MATTER. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jortel at redhat.com Mon Dec 7 17:18:44 2009 From: jortel at redhat.com (Jeff Ortel) Date: Mon, 07 Dec 2009 11:18:44 -0600 Subject: [Fedora-suds-list] [Patch] bug in time parsing In-Reply-To: <20091204221026.GA3591@pokemon> References: <20091204221026.GA3591@pokemon> Message-ID: <4B1D38F4.7070108@redhat.com> Hello Antoine On 12/04/2009 04:10 PM, Antoine Sirinelli wrote: > Good evening, > > A webservice is returning a time which cannot be read by suds. I've got the > following error: > > ValueError: Invalid format "21:57:58.9559863+00:00" I don't think this format is valid, is it? > > The time parsing in sax/date.py assumes that there are 3 digits after the point > which is not the case. > > I have applied the following change to make it works: > > =================================================================== > --- suds/sax/date.py (revision 618) > +++ suds/sax/date.py (working copy) > @@ -230,7 +230,10 @@ > if len(part) == 1: > return (int(part[0]), None) > else: > - return (int(part[0]), int(part[1])) > + if len(part[1])< 4: > + return (int(part[0]), int(part[1])) > + else: > + return (int(part[0]), int(part[1][:3])) > > def __offset(self, s): > """ > =================================================================== > > I am quite sure, this configuration can produce some wrong results for exemple > if the time string has only 2 digits after the point. But I do not know if a > sub-second precision is needed. > > Antoine > > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5126 bytes Desc: S/MIME Cryptographic Signature URL: From suds at monte-stello.com Mon Dec 7 17:27:29 2009 From: suds at monte-stello.com (Antoine Sirinelli) Date: Mon, 7 Dec 2009 18:27:29 +0100 Subject: [Fedora-suds-list] [Patch] bug in time parsing In-Reply-To: <4B1D38F4.7070108@redhat.com> References: <20091204221026.GA3591@pokemon> <4B1D38F4.7070108@redhat.com> Message-ID: <20091207172724.GA24732@ovh.monte-stello.com> On Mon, Dec 07, 2009 at 11:18:44AM -0600, Jeff Ortel wrote: > >ValueError: Invalid format "21:57:58.9559863+00:00" > > I don't think this format is valid, is it? > I do not know where the "standard" is defined, but I have found this description: http://www.w3.org/TR/NOTE-datetime We can read: "This profile does not specify how many digits may be used to represent the decimal fraction of a second. An adopting standard that permits fractions of a second must specify both the minimum number of digits (a number greater than or equal to one) and the maximum number of digits (the maximum may be stated to be "unlimited")." Antoine From ajai.joy at gmail.com Mon Dec 7 18:07:15 2009 From: ajai.joy at gmail.com (Ajai JOY) Date: Mon, 7 Dec 2009 13:07:15 -0500 Subject: [Fedora-suds-list] attachment support In-Reply-To: References: Message-ID: Robert, I am able to wire the attachment, but the contents does not seem to be correct, I am wiring the binary to an axis engine in java. Basically my service call, needs a csv file with contents as below (first row being a string "NAME" and the second row being "machine1" etc) NAME machine1 Here is the method : def zip_string(): #" Given a string, use gzip and StringIO to create a zip'd string " uncompressed_string_header ="NAME\n" uncompressed_string_contents ="machine1" zbuf = StringIO.StringIO() zfile = gzip.GzipFile(mode='wb', fileobj=zbuf) zfile.write( uncompressed_string_header ) zfile.write( uncompressed_string_contents ) zfile.close() return zbuf.getvalue() //service call client.service.executeCommand('some string', base64.b64encode( zip_string())) Any ideas? Thanks AJ > > ------------------------------ > > - *From*: "Robert Marsanyi" > - *To*: > - *Subject*: Re: [Fedora-suds-list] attachment support > - *Date*: Thu, 3 Dec 2009 09:14:53 -0800 > > ------------------------------ > > I just used it Tuesday to send a gzip'd binary as an element in the request. > The WSDL for that particular element was > > > > > > > > type="s:base64Binary"/> > > > > and the Python to set the element was > > def zip_string( uncompressed_string ): > " Given a string, use gzip and StringIO to create a zip'd string " > > zbuf = StringIO.StringIO() > zfile = gzip.GzipFile(mode='wb', fileobj=zbuf) > zfile.write( uncompressed_string ) > zfile.close() > return zbuf.getvalue() > > ... > .OrderData.DataBinaryValue = base64.b64encode( zip_string( > > line_xml ) ) > ... > > which seemed to work well. > > --rbt > > > ----- Original Message ----- > From: Ajai Joy > To: fedora-suds-list redhat com > Sent: Thursday, December 03, 2009 5:51 AM > Subject: [Fedora-suds-list] attachment support > > > Does suds, have attachment support - either MTOM or base64 encoded > attachments ? If so, could anyone share some samples? > > Thanks > AJ > > > > -- > Best Regards, > Ajai Joy > -- Best Regards, Ajai Joy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jortel at redhat.com Mon Dec 7 18:20:23 2009 From: jortel at redhat.com (Jeff Ortel) Date: Mon, 07 Dec 2009 12:20:23 -0600 Subject: [Fedora-suds-list] [Patch] bug in time parsing In-Reply-To: <20091207172724.GA24732@ovh.monte-stello.com> References: <20091204221026.GA3591@pokemon> <4B1D38F4.7070108@redhat.com> <20091207172724.GA24732@ovh.monte-stello.com> Message-ID: <4B1D4767.90808@redhat.com> Ops, my mistake. I was looking at this: ValueError: Invalid format "21:57:58.9559863+00:00" and thinking it was a DATE with a decimal followed by a fractional seconds. After a closer look, I notice it is just a TIME. That is why I questioned whether it was valid - not the number of digits in the fractional seconds. Anyway, Yes this is a problem. Not because it has more then 3 digits but because a python datetime object may not have microseconds > 999999. I think you patch is correct but we should simply trim the microseconds to 6 digits as: int(part[1][:6]) Thanks for raising this important issue and providing a patch. I fixed in r620, updated the unit tests and will release in 0.3.8. On 12/07/2009 11:27 AM, Antoine Sirinelli wrote: > On Mon, Dec 07, 2009 at 11:18:44AM -0600, Jeff Ortel wrote: >>> ValueError: Invalid format "21:57:58.9559863+00:00" >> >> I don't think this format is valid, is it? >> > > I do not know where the "standard" is defined, but I have found this > description: > http://www.w3.org/TR/NOTE-datetime > > We can read: > "This profile does not specify how many digits may be used to represent the > decimal fraction of a second. An adopting standard that permits fractions of > a second must specify both the minimum number of digits (a number greater > than or equal to one) and the maximum number of digits (the maximum may be > stated to be "unlimited")." > > Antoine > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5126 bytes Desc: S/MIME Cryptographic Signature URL: From rnm at whidbey.com Tue Dec 8 00:33:34 2009 From: rnm at whidbey.com (Robert Marsanyi) Date: Mon, 7 Dec 2009 16:33:34 -0800 Subject: [Fedora-suds-list] attachment support References: Message-ID: <3AF99CE1B16642F0BB823FFFD417194E@bluto> What's the WSDL signature for "executeCommand"? Robert, I am able to wire the attachment, but the contents does not seem to be correct, I am wiring the binary to an axis engine in java. Basically my service call, needs a csv file with contents as below (first row being a string "NAME" and the second row being "machine1" etc) ... //service call client.service.executeCommand('some string', base64.b64encode( zip_string())) -------------- next part -------------- An HTML attachment was scrubbed... URL: From uncleanness at hoerdt.com Tue Dec 8 05:15:11 2009 From: uncleanness at hoerdt.com (Ngvyen Marze) Date: Tue, 08 Dec 2009 06:15:11 +0100 Subject: [Fedora-suds-list] As it is, she may hardly be termed as such. But Catholic Sp Message-ID: <4B1CF477.5060709@hoerdt.com> Ed, until mass is again daily said within these consecrated walls, and finally until San Carlos of Carmelo is again a worthier Carmel, "for the greater honor and glory of God" and the praises of His Virgin Mother once more are sung about this smiling valley where the Christian Indian children gathered the beautiful wild flowers of the blooming meadows to adorn the hallowed shrines, ere chimed the Angelus at evenings mellow glow. Chapter IX Reverend Raymond M. Mestres of Monterey Writes Historical Drama--"Fray Junipero" Beautiful among beautiful historical dramas is the mission play "Fray Junipero" written by Reverend Raymond Mestres, pastor of San Carlos Church (Capilla Real de San Carlos) of Monterey. Many men and women have undertaken to write about mission times, but we may safely assert that this good priest so unassuming in what he does, is above all qualified to handle this subject, being first of all a religious, a native of Barcelona, the Metropolis of the Province of Catalonia, which can claim Junipero Serra and so many of the early Spanish missionaries, explorers and settlers, and being too an artist and scholar in every way acquainted with the history of the missions, having made it a special study during his twenty-seven years of residence (as a priest) in four mission towns of California, twenty-one of which have been spent in that chief of mission towns, Monterey. Unbiased, careful of detail and true to history, while not wanting in artistic setting "Fray Junipero" carries the audience in Act I back to the College of Fernando, when Junipero Serra received his commission to come to California as Father Pre -------------- next part -------------- A non-text attachment was scrubbed... Name: embrown.jpg Type: image/jpeg Size: 8812 bytes Desc: not available URL: From ajai.joy at gmail.com Tue Dec 8 13:43:24 2009 From: ajai.joy at gmail.com (Ajai Joy) Date: Tue, 8 Dec 2009 08:43:24 -0500 Subject: [Fedora-suds-list] attachment support In-Reply-To: <3AF99CE1B16642F0BB823FFFD417194E@bluto> References: <3AF99CE1B16642F0BB823FFFD417194E@bluto> Message-ID: Hre is the wsdl signature, the attachment type is base64Binary On Mon, Dec 7, 2009 at 7:33 PM, Robert Marsanyi wrote: > What's the WSDL signature for "executeCommand"? > > Robert, > I am able to wire the attachment, but the contents does not seem to be > correct, I am wiring the binary to an axis engine in java. Basically my > service call, needs a csv file with contents as below (first row being a > string "NAME" and the second row being "machine1" etc) > ... > //service call > client.service.executeCommand('some string', base64.b64encode( > zip_string())) > > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list > -- Best Regards, Ajai Joy -------------- next part -------------- An HTML attachment was scrubbed... URL: From ajai.joy at gmail.com Tue Dec 8 16:49:54 2009 From: ajai.joy at gmail.com (Ajai Joy) Date: Tue, 8 Dec 2009 11:49:54 -0500 Subject: [Fedora-suds-list] attachment support In-Reply-To: References: <3AF99CE1B16642F0BB823FFFD417194E@bluto> Message-ID: Robert, When I recieve the attachment on the server side, and check if the binary is base 64 encoded it say false ByteArrayDataSource bsrc = (ByteArrayDataSource)dataHandler.getDataSource(); InputStream in = bsrc.getInputStream(); byte[] array = new byte[100]; int offset = 0; int n; do n = in.read(array, offset, 100 - offset); while (n != -1); org.apache.commons.codec.binary.Base64.isArrayByteBase64(array); // this returns false ? i would expect it to return true, since i did base64 encode the attachment in the python client. On Tue, Dec 8, 2009 at 8:43 AM, Ajai Joy wrote: > Hre is the wsdl signature, the attachment type is base64Binary > > > > > nillable="true" type="xs:string"/> > nillable="true" type="xs:string"/> > name="commandArguments" nillable="true" type="xs:string"/> > type="*xs:base64Binary*"/> > > > > > On Mon, Dec 7, 2009 at 7:33 PM, Robert Marsanyi wrote: > >> What's the WSDL signature for "executeCommand"? >> >> Robert, >> I am able to wire the attachment, but the contents does not seem to be >> correct, I am wiring the binary to an axis engine in java. Basically my >> service call, needs a csv file with contents as below (first row being a >> string "NAME" and the second row being "machine1" etc) >> ... >> //service call >> client.service.executeCommand('some string', base64.b64encode( >> zip_string())) >> >> >> _______________________________________________ >> fedora-suds-list mailing list >> >> fedora-suds-list at redhat.com >> https://www.redhat.com/mailman/listinfo/fedora-suds-list >> > > > > -- > Best Regards, > Ajai Joy > -- Best Regards, Ajai Joy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jortel at redhat.com Tue Dec 8 21:50:53 2009 From: jortel at redhat.com (Jeff Ortel) Date: Tue, 08 Dec 2009 15:50:53 -0600 Subject: [Fedora-suds-list] r620 is 0.3.8 release candidate Message-ID: <4B1ECA3D.4070302@redhat.com> All, Looks like r620 is a good candidate for the 0.3.8 release. Please install the beta and provide feedback. Release notes can be found here: https://fedorahosted.org/suds/wiki/WikiStart#Development. Thanks to early adopters who helped QA r605 & r618. Your contributions really improved the quality of 0.3.8. I intend to release COB on 12/11/09. Maybe sooner if I get some good feedback. Thanks, Jeff -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5126 bytes Desc: S/MIME Cryptographic Signature URL: From msommerville at gmail.com Tue Dec 8 23:49:42 2009 From: msommerville at gmail.com (Michael Sommerville) Date: Tue, 8 Dec 2009 23:49:42 +0000 Subject: [Fedora-suds-list] Internationalization SOAP headers Message-ID: All, I don't know if anyone might find this little enhancement useful, but I added rudimentary support for ws-i18n SOAP headers (http://www.w3.org/TR/ws-i18n/#sec-soap-i18n). We are using a WS at work that requires such things. In this implementation, the locale parameter is mandatory, the additional time-zone optional. It may be used as follows: from suds.international import * _i18n = International('en') # Get client object instance client.set_options(i18n=_i18n) Thanks, -Mike -------------- next part -------------- A non-text attachment was scrubbed... Name: suds.international Type: application/octet-stream Size: 3794 bytes Desc: not available URL: -------------- next part -------------- From deformity at net-care.nl Wed Dec 9 00:22:30 2009 From: deformity at net-care.nl (Fiebelkorn Langager) Date: Wed, 09 Dec 2009 01:22:30 +0100 Subject: [Fedora-suds-list] (no subject) Message-ID: <4B1EEA52.8070709@net-care.nl> -------------- next part -------------- A non-text attachment was scrubbed... Name: obligatory.jpg Type: image/jpeg Size: 8774 bytes Desc: not available URL: From rnm at whidbey.com Wed Dec 9 03:07:00 2009 From: rnm at whidbey.com (Robert Marsanyi) Date: Tue, 8 Dec 2009 19:07:00 -0800 Subject: [Fedora-suds-list] Internationalization SOAP headers References: Message-ID: Nice! --rbt ----- Original Message ----- ... It may be used as follows: from suds.international import * _i18n = International('en') # Get client object instance client.set_options(i18n=_i18n) ... From jortel at redhat.com Wed Dec 9 13:47:13 2009 From: jortel at redhat.com (Jeff Ortel) Date: Wed, 09 Dec 2009 07:47:13 -0600 Subject: [Fedora-suds-list] Internationalization SOAP headers In-Reply-To: References: Message-ID: <4B1FAA61.3000502@redhat.com> Thanks Mike. I'm interested in adding to the distribution but I don't know much about i18n and soap. How complete is this? Is it ready to be added? Regards, Jeff On 12/08/2009 05:49 PM, Michael Sommerville wrote: > All, > > I don't know if anyone might find this little enhancement useful, but I added rudimentary support for ws-i18n SOAP headers (http://www.w3.org/TR/ws-i18n/#sec-soap-i18n). We are using a WS at work that requires such things. In this implementation, the locale parameter is mandatory, the additional time-zone optional. > > It may be used as follows: > > from suds.international import * > _i18n = International('en') > # Get client object instance > client.set_options(i18n=_i18n) > > Thanks, > > -Mike > > > > > > > > > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5126 bytes Desc: S/MIME Cryptographic Signature URL: From jortel at redhat.com Wed Dec 9 14:03:44 2009 From: jortel at redhat.com (Jeff Ortel) Date: Wed, 09 Dec 2009 08:03:44 -0600 Subject: [Fedora-suds-list] Question about asynchronous suds calls In-Reply-To: <2830FB43CE5B4249AE847CD1FE0458EE039C766B@SXGM-001.fg.rbc.com> References: <2830FB43CE5B4249AE847CD1FE0458EE039C766B@SXGM-001.fg.rbc.com> Message-ID: <4B1FAE40.1050905@redhat.com> Hey Joe, Currently suds provides very little support for concurrent or asynchronous soap method invocation. The (1) things it does provide is a Client.clone() method for creating light-weight copies of the client to be used in different threads. For now I'd suggest you wrap the cloned clients in your own threading wrapper that also provides the callbacks. That said, I would be to add 1st class support for this (perhaps in the next release). Regards, Jeff On 12/07/2009 11:04 AM, Sarbak, Joseph wrote: > Hello, > > Does the suds api provide a way for clients to pass a callback to handle > return values from an asynchronous soap method call? If not, then can > someone suggest a way to hack asynchronous calls? > > Thank you. > Joe Sarbak > > ________________________________________ > > This E-Mail (including any attachments) may contain privileged or confidential information. It is intended only for the addressee(s) indicated above. > > The sender does not waive any of its rights, privileges or other protections respecting this information. > > Any distribution, copying or other use of this E-Mail or the information it contains, by other than an intended recipient, is not sanctioned and is prohibited. > > If you received this E-Mail in error, please delete it and advise the sender (by return E-Mail or otherwise) immediately. > > This E-Mail (including any attachments) has been scanned for viruses. > > It is believed to be free of any virus or other defect that might affect any computer system into which it is received and opened. > > However, it is the responsibility of the recipient to ensure that it is virus free. > > The sender accepts no responsibility for any loss or damage arising in any way from its use. > > E-Mail received by or sent from RBC Capital Markets is subject to review by Supervisory personnel. > > Such communications are retained and may be produced to regulatory authorities or others with legal rights to the information. > > IRS CIRCULAR 230 NOTICE: TO COMPLY WITH U.S. TREASURY REGULATIONS, WE ADVISE YOU THAT ANY U.S. FEDERAL TAX ADVISE INCLUDED IN THIS COMMUNICATION IS NOT INTENDED OR WRITTEN TO BE USED, AND CANNOT BE USED, TO AVOID ANY U.S. FEDERAL TAX PENALTIES OR TO PROMOTE, MARKET, OR RECOMMEND TO ANOTHER PARTY ANY TRANSACTION OR MATTER. > > > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5126 bytes Desc: S/MIME Cryptographic Signature URL: From bruce.edge at gmail.com Wed Dec 9 15:50:05 2009 From: bruce.edge at gmail.com (Bruce Edge) Date: Wed, 9 Dec 2009 07:50:05 -0800 Subject: [Fedora-suds-list] Question about asynchronous suds calls In-Reply-To: <4B1FAE40.1050905@redhat.com> References: <2830FB43CE5B4249AE847CD1FE0458EE039C766B@SXGM-001.fg.rbc.com> <4B1FAE40.1050905@redhat.com> Message-ID: <45c43ef50912090750u7ad7ebaflaa3cd79d09c0c988@mail.gmail.com> I'm also interested in support for SOAP async operations. Specifically for interacting with CXF. So, I'm throwing my vote in for that feature. Keep up the great work. -Bruce On Wed, Dec 9, 2009 at 6:03 AM, Jeff Ortel wrote: > Hey Joe, > > Currently suds provides very little support for concurrent or asynchronous > soap method invocation. The (1) things it does provide is a Client.clone() > method for creating light-weight copies of the client to be used in > different threads. > > For now I'd suggest you wrap the cloned clients in your own threading > wrapper that also provides the callbacks. > > That said, I would be to add 1st class support for this (perhaps in the > next release). > > Regards, > > Jeff > > On 12/07/2009 11:04 AM, Sarbak, Joseph wrote: > >> Hello, >> >> Does the suds api provide a way for clients to pass a callback to handle >> return values from an asynchronous soap method call? If not, then can >> someone suggest a way to hack asynchronous calls? >> >> Thank you. >> Joe Sarbak >> >> ________________________________________ >> >> This E-Mail (including any attachments) may contain privileged or >> confidential information. It is intended only for the addressee(s) >> indicated above. >> >> The sender does not waive any of its rights, privileges or other >> protections respecting this information. >> >> Any distribution, copying or other use of this E-Mail or the information >> it contains, by other than an intended recipient, is not sanctioned and is >> prohibited. >> >> If you received this E-Mail in error, please delete it and advise the >> sender (by return E-Mail or otherwise) immediately. >> >> This E-Mail (including any attachments) has been scanned for viruses. >> >> It is believed to be free of any virus or other defect that might affect >> any computer system into which it is received and opened. >> >> However, it is the responsibility of the recipient to ensure that it is >> virus free. >> >> The sender accepts no responsibility for any loss or damage arising in any >> way from its use. >> >> E-Mail received by or sent from RBC Capital Markets is subject to review >> by Supervisory personnel. >> >> Such communications are retained and may be produced to regulatory >> authorities or others with legal rights to the information. >> >> IRS CIRCULAR 230 NOTICE: TO COMPLY WITH U.S. TREASURY REGULATIONS, WE >> ADVISE YOU THAT ANY U.S. FEDERAL TAX ADVISE INCLUDED IN THIS COMMUNICATION >> IS NOT INTENDED OR WRITTEN TO BE USED, AND CANNOT BE USED, TO AVOID ANY U.S. >> FEDERAL TAX PENALTIES OR TO PROMOTE, MARKET, OR RECOMMEND TO ANOTHER PARTY >> ANY TRANSACTION OR MATTER. >> >> >> >> _______________________________________________ >> 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 msommerville at gmail.com Wed Dec 9 15:55:14 2009 From: msommerville at gmail.com (Michael Sommerville) Date: Wed, 9 Dec 2009 15:55:14 +0000 Subject: [Fedora-suds-list] Internationalization SOAP headers In-Reply-To: <4B1FAA61.3000502@redhat.com> References: <4B1FAA61.3000502@redhat.com> Message-ID: <4d395ead0912090755y3b92605cm5ef44bbe019a0972@mail.gmail.com> On Wed, Dec 9, 2009 at 1:47 PM, Jeff Ortel wrote: > Thanks Mike. > > I'm interested in adding to the distribution but I don't know much about > i18n and soap. How complete is this? ?Is it ready to be added? I'm not sure I know any more than you Jeff ;-) I just hacked it in as our WS required these headers. There are a few limitations. There is no validation of the locale or tz settings. According to the spec the locale must be valid according to the LDML (language_code ("_" script_code)? ("_" territory_code)? ("_" variant_code)*) or be "$neutral" or "$default". The tz setting is optional, and the value is implementation defined (either OlsenID or TZ+offset). I'm not sure it is worth the bother of trying to do anything too fancy here, I was just passing both elements as strings. There is another optional, complex element 'preferences', which I completely ommited, as we don't use it, and the spec says that no application must depend on it. Other than that it seems ok to me. We've been using it here for a few weeks doing automated tests on our WS. Cheers, -Mike From conjecture at vandenesker.nl Wed Dec 9 19:13:44 2009 From: conjecture at vandenesker.nl (Cosgriff) Date: Wed, 09 Dec 2009 13:13:44 -0600 Subject: [Fedora-suds-list] (no subject) Message-ID: <4B1FF51D.1070205@vandenesker.nl> -------------- next part -------------- A non-text attachment was scrubbed... Name: legates.jpg Type: image/jpeg Size: 17747 bytes Desc: not available URL: From mcauthorn at gmail.com Thu Dec 10 01:17:27 2009 From: mcauthorn at gmail.com (Matt C) Date: Wed, 9 Dec 2009 20:17:27 -0500 Subject: [Fedora-suds-list] Question about asynchronous suds calls In-Reply-To: <45c43ef50912090750u7ad7ebaflaa3cd79d09c0c988@mail.gmail.com> References: <2830FB43CE5B4249AE847CD1FE0458EE039C766B@SXGM-001.fg.rbc.com> <4B1FAE40.1050905@redhat.com> <45c43ef50912090750u7ad7ebaflaa3cd79d09c0c988@mail.gmail.com> Message-ID: <42ea979e0912091717k9c3f7cfue1649cc5f2f1a550@mail.gmail.com> I've used clone() with a thread wrapper for concurrent calls as Jeff describes, and it works fairly well. That said, an async method would be strongly preferred :). On Wed, Dec 9, 2009 at 10:50 AM, Bruce Edge wrote: > I'm also interested in support for SOAP async operations. Specifically for > interacting with CXF. > So, I'm throwing my vote in for that feature. > > Keep up the great work. > > -Bruce > > On Wed, Dec 9, 2009 at 6:03 AM, Jeff Ortel wrote: >> >> Hey Joe, >> >> Currently suds provides very little support for concurrent or asynchronous >> soap method invocation. ?The (1) things it does provide is a Client.clone() >> method for creating light-weight copies of the client to be used in >> different threads. >> >> For now I'd suggest you wrap the cloned clients in your own threading >> wrapper that also provides the callbacks. >> >> That said, I would be to add 1st class support for this (perhaps in the >> next release). >> >> Regards, >> >> Jeff >> >> On 12/07/2009 11:04 AM, Sarbak, Joseph wrote: >>> >>> Hello, >>> >>> Does the suds api provide a way for clients to pass a callback to handle >>> return values from an asynchronous soap method call? If not, then can >>> someone suggest a way to hack asynchronous calls? >>> >>> Thank you. >>> Joe Sarbak >>> >>> ________________________________________ >>> >>> This E-Mail (including any attachments) may contain privileged or >>> confidential information. ?It is intended only for the addressee(s) >>> indicated above. >>> >>> The sender does not waive any of its rights, privileges or other >>> protections respecting this information. >>> >>> Any distribution, copying or other use of this E-Mail or the information >>> it contains, by other than an intended recipient, is not sanctioned and is >>> prohibited. >>> >>> If you received this E-Mail in error, please delete it and advise the >>> sender (by return E-Mail or otherwise) immediately. >>> >>> This E-Mail (including any attachments) has been scanned for viruses. >>> >>> It is believed to be free of any virus or other defect that might affect >>> any computer system into which it is received and opened. >>> >>> However, it is the responsibility of the recipient to ensure that it is >>> virus free. >>> >>> The sender accepts no responsibility for any loss or damage arising in >>> any way from its use. >>> >>> E-Mail received by or sent from RBC Capital Markets is subject to review >>> by Supervisory personnel. >>> >>> Such communications are retained and may be produced to regulatory >>> authorities or others with legal rights to the information. >>> >>> IRS CIRCULAR 230 NOTICE: ?TO COMPLY WITH U.S. TREASURY REGULATIONS, WE >>> ADVISE YOU THAT ANY U.S. FEDERAL TAX ADVISE INCLUDED IN THIS COMMUNICATION >>> IS NOT INTENDED OR WRITTEN TO BE USED, AND CANNOT BE USED, TO AVOID ANY U.S. >>> FEDERAL TAX PENALTIES OR TO PROMOTE, MARKET, OR RECOMMEND TO ANOTHER PARTY >>> ANY TRANSACTION OR MATTER. >>> >>> >>> >>> _______________________________________________ >>> 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 > > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list > From euratom at soldbyowner.com Thu Dec 10 16:37:34 2009 From: euratom at soldbyowner.com (Montcalm) Date: Thu, 10 Dec 2009 16:37:34 -0000 Subject: [Fedora-suds-list] (no subject) Message-ID: <4B2121B6.7040508@soldbyowner.com> -------------- next part -------------- A non-text attachment was scrubbed... Name: anole.jpg Type: image/jpeg Size: 20982 bytes Desc: not available URL: From ben at adida.net Thu Dec 10 22:53:42 2009 From: ben at adida.net (Ben Adida) Date: Thu, 10 Dec 2009 14:53:42 -0800 Subject: [Fedora-suds-list] type not found in inline WSDL from NIH Message-ID: <4B217BF6.2010800@adida.net> Hi folks, I'm looking to access the NIH's National Library of Medicine SOAP service. The WSDL file is here: http://umlsks.nlm.nih.gov/UMLSKS/services/UMLSKSService?wsdl It contains a *lot* of inline data types, and for some reason I'm getting the dreaded TypeNotFound error. The typical import workaround doesn't seem right since this is an inline type. This is suds 0.3.7. -Ben From jortel at redhat.com Fri Dec 11 16:48:08 2009 From: jortel at redhat.com (Jeff Ortel) Date: Fri, 11 Dec 2009 10:48:08 -0600 Subject: [Fedora-suds-list] type not found in inline WSDL from NIH In-Reply-To: <4B217BF6.2010800@adida.net> References: <4B217BF6.2010800@adida.net> Message-ID: <4B2277C8.5080402@redhat.com> Hey Ben. On 12/10/2009 04:53 PM, Ben Adida wrote: > > Hi folks, > > I'm looking to access the NIH's National Library of Medicine SOAP > service. The WSDL file is here: > > http://umlsks.nlm.nih.gov/UMLSKS/services/UMLSKSService?wsdl > > It contains a *lot* of inline data types, and for some reason I'm > getting the dreaded TypeNotFound error. The typical import workaround > doesn't seem right since this is an inline type. This wsdl represents something that I have been battling with over the years. I defines 18 schemas which reference types from each other and *none* of them have the proper s. Just because the schema is defined with the same wsdl, they must import namespaces defined in other schemas. That said, I see this all the time. Some wsdls do this properly and others don't. I've contemplated how to deal with this may times. I could automatically import all schema defined within the wsdl into each other. My concern here is that this is a very heavy handed approach. Most wsdls have linear dependencies between schemas. But, the author of the NIH wsdl seems to assume that all of the schemas defined within the wsdl have magic visibility into each other. In looking through the wsdl specifications, I can't find anything that addresses directly. Or, indirectly as to what the expectation is when schemas are defined in the wsdl. However, based on wsdls I've seen and what the specifications do say, I've maintained the position that schemas defined within the wsdl have the same import requirements as those defined outside the wsdl. Comments on this would be appreciated :) Anyway, the ImportDoctor was defined partially with this kind of wsdl in mind. But, clearly it would be a pain to create an ImportDoctor and correctly add the necessary (maybe all 18) Imports. So, as an **experiment**, I added an **experimental** option in 0.3.8 beta named 'autoblend'. This option (and I really might rename it so be careful), is false by default but when set to true: client = Client(url, autoblend=True) it will automatically ensure that all the schemas defined in the wsdl have imports for each other. This works on the NIH wsdl. I'm leaving this as **experimantal** because it is so heavy handed. Again, note the emphasis on experimental :) Hope this helps. -jeff > > This is suds 0.3.7. > > -Ben > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5126 bytes Desc: S/MIME Cryptographic Signature URL: From placebo at fiat600.nl Fri Dec 11 18:21:43 2009 From: placebo at fiat600.nl (Broers) Date: Fri, 11 Dec 2009 19:21:43 +0100 Subject: [Fedora-suds-list] (no subject) Message-ID: <4B2289B1.1040401@fiat600.nl> -------------- next part -------------- A non-text attachment was scrubbed... Name: whisks.jpg Type: image/jpeg Size: 15479 bytes Desc: not available URL: From ben at adida.net Fri Dec 11 20:51:00 2009 From: ben at adida.net (Ben Adida) Date: Fri, 11 Dec 2009 12:51:00 -0800 Subject: [Fedora-suds-list] type not found in inline WSDL from NIH In-Reply-To: <4B2277C8.5080402@redhat.com> References: <4B217BF6.2010800@adida.net> <4B2277C8.5080402@redhat.com> Message-ID: <4B22B0B4.2080307@adida.net> Jeff Ortel wrote: > Anyway, the ImportDoctor was defined partially with this kind of wsdl in > mind. But, clearly it would be a pain to create an ImportDoctor and > correctly add the necessary (maybe all 18) Imports. So, as an > **experiment**, I added an **experimental** option in 0.3.8 beta named > 'autoblend'. This option (and I really might rename it so be careful), > is false by default but when set to true: > > client = Client(url, autoblend=True) Wow, this is fantastic, thanks so much for the rapid fix and response, this looks like it's working well. -Ben From machmeter at broekema-bv.nl Sat Dec 12 13:45:44 2009 From: machmeter at broekema-bv.nl (Manoni) Date: Sat, 12 Dec 2009 14:45:44 +0100 Subject: [Fedora-suds-list] (no subject) Message-ID: <4B239ACA.4030208@broekema-bv.nl> -------------- next part -------------- A non-text attachment was scrubbed... Name: purfle.jpg Type: image/jpeg Size: 15609 bytes Desc: not available URL: From mcauthorn at gmail.com Sat Dec 12 22:11:13 2009 From: mcauthorn at gmail.com (Matt C) Date: Sat, 12 Dec 2009 17:11:13 -0500 Subject: [Fedora-suds-list] python 2.6 clone() recursion error Message-ID: <42ea979e0912121411p34bc2243hcca2127b8ab8e903@mail.gmail.com> All: just a heads up - calling clone() will cause Python 2.6 to throw: #### Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in ignored #### Note that that the call still works, as my clone()'d objects call my services just fine. I believe this is related to issue 5508 (http://bugs.python.org/issue5508), although it's been closed out as fixed... Anyhow, this is apparently a Python thing, as opposed to a Suds thing. Python 2.5 doesn't have this issue. Does anyone know a work around, by chance? -Matt From crises at estesvr.com Sun Dec 13 12:29:30 2009 From: crises at estesvr.com (Gregorich) Date: Sun, 13 Dec 2009 12:29:30 -0000 Subject: [Fedora-suds-list] (no subject) Message-ID: <4B24DDE7.6010907@estesvr.com> -------------- next part -------------- A non-text attachment was scrubbed... Name: cornstarch.jpg Type: image/jpeg Size: 18420 bytes Desc: not available URL: From songster at oudeherbergh.nl Mon Dec 14 13:59:54 2009 From: songster at oudeherbergh.nl (Austin) Date: Mon, 14 Dec 2009 14:59:54 +0100 Subject: [Fedora-suds-list] (no subject) Message-ID: <4B26433D.3010809@oudeherbergh.nl> -------------- next part -------------- A non-text attachment was scrubbed... Name: matchings.jpg Type: image/jpeg Size: 15159 bytes Desc: not available URL: From vgimeno at seguridata.com Mon Dec 14 22:50:28 2009 From: vgimeno at seguridata.com (Victor Gimeno) Date: Mon, 14 Dec 2009 16:50:28 -0600 Subject: [Fedora-suds-list] Empty class Message-ID: <801F0AF0A50D1F48A1E4DA25881C1CB401153F1B@exch-bck> Hello I'm just starting with suds and Python, I have a Polymorphic WS width just one entry point "response PocessMessage(request)" So I have many classes for different messages to send to the Server For example, I have a class "GetUser" with the user name , in response I get a UserObjet with the information for that user. My problem occur if I have an empty message, something like "GetALLUserList", this message doesn?t have any data And in response I get an array of user objects. I'm Attaching a small WSDL showing the problem. And the code looks like this: # # create a service client using the wsdl. # url = 'http://127.0.0.1:8082/?wsdl' client = Client(url, username='admin', password='password', cache=None) print client # # create a GetUserRequest object using the wsdl # print 'create GetUserRequest' GetUserRequest = client.factory.create('ns1:GetUserRequest') GetUserRequest.username='admin' result=client.service.ProcessMessage(GetUserRequest ) print result # # create a GetAllUsersRequest object using the wsdl # GetAllUsersRequest = client.factory.create('ns1:GetAllUsersRequest') result2=client.service.ProcessMessage(GetAllUsersRequest) print result2 and error occurred when I try to Invoke the ProccessMessage function with and Empty class Thanks a lot in advance Victor Gimeno -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: DemoWS.wsdl Type: application/octet-stream Size: 4689 bytes Desc: DemoWS.wsdl URL: From Gavin.Andrews at morganstanley.com Tue Dec 15 19:11:13 2009 From: Gavin.Andrews at morganstanley.com (Andrews, Gavin) Date: Tue, 15 Dec 2009 19:11:13 +0000 Subject: [Fedora-suds-list] WSSE Expires Message-ID: <970A1253589514429501F9C3960536889C55623989@LNWEXMBX0104.msad.ms.com> I am trying to perform a SOAP Client call to a server which mandates WSSE Authentication. Creating username password 2009-12-15T19:01:46.229259 Works well, but the server still isn't happy as it requires the wsu:Expires element. Is there a way to add expires into the UsernameToken? Thanks in advance, Gavin -------------------------------------------------------------------------- NOTICE: If received in error, please destroy, and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error. We may monitor and store emails to the extent permitted by applicable law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From kernity at gmail.com Tue Dec 15 20:16:40 2009 From: kernity at gmail.com (khalid y) Date: Tue, 15 Dec 2009 21:16:40 +0100 Subject: [Fedora-suds-list] WSSE Expires In-Reply-To: <970A1253589514429501F9C3960536889C55623989@LNWEXMBX0104.msad.ms.com> References: <970A1253589514429501F9C3960536889C55623989@LNWEXMBX0104.msad.ms.com> Message-ID: <301a0bc90912151216h424c89c4j2845cdb53e5d00aa@mail.gmail.com> My solution was to add this expires like this but I'm not sure it's the best way with the newest version. from suds.client import Client # I created my own TimestampToken class TimestampToken(Token): def __init__(self, validity=60): Token.__init__(self) self.created = datetime.now() self.expires = self.created+ timedelta(seconds = validity) def xml(self): root = Element("Timestamp", ns = wsuns) u = Element('Created', ns = wsuns) u.setText(date.to_iso8601(self.created)) p = Element('Expires', ns =wsuns) p.setText(date.to_iso8601(self.expires)) root.append(p) return root url = "http://127.0.0.1:8080/api/AuthenticationService?wsdl" service = Client(url) security = Security() # Add your security token here :-) ###### timetoken = TimestampToken(validity=60) security.tokens.append(timetoken) service.set_options(wsse=security) So my service is ready to handle request. @+++ 2009/12/15 Andrews, Gavin > I am trying to perform a SOAP Client call to a server which mandates > WSSE Authentication. > > > > Creating > > > > > > > > username > > password > > 2009-12-15T19:01:46.229259 > > > > > > Works well, but the server still isn?t happy as it requires the wsu:Expires > element. > > > > Is there a way to add expires into the UsernameToken? > > > > Thanks in advance, > > Gavin > ------------------------------ > > NOTICE: If received in error, please destroy, and notify sender. Sender > does not intend to waive confidentiality or privilege. Use of this email is > prohibited when received in error. We may monitor and store emails to the > extent permitted by applicable law. > > _______________________________________________ > 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 larryt at winfirst.com Wed Dec 16 06:04:38 2009 From: larryt at winfirst.com (larryt at winfirst.com) Date: Tue, 15 Dec 2009 22:04:38 -0800 (PST) Subject: [Fedora-suds-list] WSSE Expires In-Reply-To: <301a0bc90912151216h424c89c4j2845cdb53e5d00aa@mail.gmail.com> References: <970A1253589514429501F9C3960536889C55623989@LNWEXMBX0104.msad.ms.com> <301a0bc90912151216h424c89c4j2845cdb53e5d00aa@mail.gmail.com> Message-ID: <20091215220438.ALD04821@ms1.mc.surewest.net> There's a suds-timestamp repo, http://bitbucket.org/schmichael/suds-timestamp/, that seems to merge into the trunk relatively easily. I'm a noob, though, so I can't say if it actually works. -larry ---- Original message ---- >Date: Tue, 15 Dec 2009 21:16:40 +0100 >From: fedora-suds-list-bounces at redhat.com (on behalf of khalid y ) >Subject: Re: [Fedora-suds-list] WSSE Expires >To: "Andrews, Gavin" >Cc: fedora-suds-list at redhat.com > > My solution was to add this expires like this but > I'm not sure it's the best way with the newest > version. > > from suds.client import Client > > # I created my own TimestampToken > > class TimestampToken(Token): > def __init__(self, validity=60): > Token.__init__(self) > self.created = datetime.now() > self.expires = self.created+ > timedelta(seconds = validity) > def xml(self): > root = Element("Timestamp", ns = wsuns) > u = Element('Created', ns = wsuns) > u.setText(date.to_iso8601(self.created)) > p = Element('Expires', ns =wsuns) > p.setText(date.to_iso8601(self.expires)) > root.append(p) > return root > > url = > "http://127.0.0.1:8080/api/AuthenticationService?wsdl" > service = Client(url) > security = Security() > # Add your security token here :-) > > ###### > > timetoken = TimestampToken(validity=60) > security.tokens.append(timetoken) > service.set_options(wsse=security) > > So my service is ready to handle request. > > @+++ > > 2009/12/15 Andrews, Gavin > > > I am trying to perform a SOAP Client call to a > server which mandates WSSE Authentication. > > > > Creating > > > > > > > > > username > > > password > > > 2009-12-15T19:01:46.229259 > > > > > > Works well, but the server still isn?t happy as > it requires the wsu:Expires element. > > > > Is there a way to add expires into the > UsernameToken? > > > > Thanks in advance, > > Gavin > > ------------------------------------------------ > > NOTICE: If received in error, please destroy, and > notify sender. Sender does not intend to waive > confidentiality or privilege. Use of this email is > prohibited when received in error. We may monitor > and store emails to the extent permitted by > applicable law. > > _______________________________________________ > 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 unglued at barendsen.org Wed Dec 16 08:10:24 2009 From: unglued at barendsen.org (Delfin Petronella) Date: Wed, 16 Dec 2009 17:10:24 +0900 Subject: [Fedora-suds-list] (no subject) Message-ID: <4B2893FB.3090401@barendsen.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: hoedown.jpg Type: image/jpeg Size: 18243 bytes Desc: not available URL: From Gavin.Andrews at morganstanley.com Wed Dec 16 16:44:07 2009 From: Gavin.Andrews at morganstanley.com (Andrews, Gavin) Date: Wed, 16 Dec 2009 16:44:07 +0000 Subject: [Fedora-suds-list] WSSE Expires In-Reply-To: <301a0bc90912151216h424c89c4j2845cdb53e5d00aa@mail.gmail.com> References: <970A1253589514429501F9C3960536889C55623989@LNWEXMBX0104.msad.ms.com> <301a0bc90912151216h424c89c4j2845cdb53e5d00aa@mail.gmail.com> Message-ID: <970A1253589514429501F9C3960536889C55623A8C@LNWEXMBX0104.msad.ms.com> Thanks! Your approach worked.... I slightly tweaked it... from datetime import timedelta,date,datetime,tzinfo class TimestampToken(Token): def __init__(self, validity=60): Token.__init__(self) self.created = datetime.now() self.expires = self.created+ timedelta(seconds = validity) def xml(self): root = Element("Timestamp", ns = wsuns) u = Element('Created', ns = wsuns) u.setText(self.created.isoformat()) p = Element('Expires', ns =wsuns) p.setText(self.expires.isoformat()) root.append(u) root.append(p) return root security = Security() token = UsernameToken('MrAardvark','termite101') timetoken=TimestampToken(validity=60) security.tokens.append(timetoken) security.tokens.append(token) client.set_options(wsse=security) and got a good header... 2009-12-16T16:34:19.099520 2009-12-16T16:35:19.099520 MrAardvark termite101 From: khalid y [mailto:kernity at gmail.com] Sent: Tuesday 15 December 2009 20:17 To: Andrews, Gavin (IDEAS) Cc: fedora-suds-list at redhat.com Subject: Re: [Fedora-suds-list] WSSE Expires My solution was to add this expires like this but I'm not sure it's the best way with the newest version. from suds.client import Client # I created my own TimestampToken class TimestampToken(Token): def __init__(self, validity=60): Token.__init__(self) self.created = datetime.now() self.expires = self.created+ timedelta(seconds = validity) def xml(self): root = Element("Timestamp", ns = wsuns) u = Element('Created', ns = wsuns) u.setText(date.to_iso8601(self.created)) p = Element('Expires', ns =wsuns) p.setText(date.to_iso8601(self.expires)) root.append(p) return root url = "http://127.0.0.1:8080/api/AuthenticationService?wsdl" service = Client(url) security = Security() # Add your security token here :-) ###### timetoken = TimestampToken(validity=60) security.tokens.append(timetoken) service.set_options(wsse=security) So my service is ready to handle request. @+++ 2009/12/15 Andrews, Gavin > I am trying to perform a SOAP Client call to a server which mandates WSSE Authentication. Creating username password 2009-12-15T19:01:46.229259 Works well, but the server still isn't happy as it requires the wsu:Expires element. Is there a way to add expires into the UsernameToken? Thanks in advance, Gavin ________________________________ NOTICE: If received in error, please destroy, and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error. We may monitor and store emails to the extent permitted by applicable law. _______________________________________________ fedora-suds-list mailing list fedora-suds-list at redhat.com https://www.redhat.com/mailman/listinfo/fedora-suds-list -------------------------------------------------------------------------- NOTICE: If received in error, please destroy, and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error. We may monitor and store emails to the extent permitted by applicable law. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jortel at redhat.com Wed Dec 16 19:28:28 2009 From: jortel at redhat.com (Jeff Ortel) Date: Wed, 16 Dec 2009 13:28:28 -0600 Subject: [Fedora-suds-list] Empty class In-Reply-To: <801F0AF0A50D1F48A1E4DA25881C1CB401153F1B@exch-bck> References: <801F0AF0A50D1F48A1E4DA25881C1CB401153F1B@exch-bck> Message-ID: <4B2934DC.3020808@redhat.com> On 12/14/2009 04:50 PM, Victor Gimeno wrote: > Hello I?m just starting with suds and Python, > > I have a Polymorphic WS width just one entry point ?response > PocessMessage(request)? > > So I have many classes for different messages to send to the Server > > For example, I have a class ?GetUser? with the user name , in response > I get a UserObjet with the information for that user. > > My problem occur if I have an empty message, something like > ?GetALLUserList?, this message doesn?t have any data > > And in response I get an array of user objects. > > I?m Attaching a small WSDL showing the problem. > > And the code looks like this: > > # > > # create a service client using the _wsdl_. > > # > > url = /'http://127.0.0.1:8082/?wsdl'/ > > client = Client(url, username=/'_admin_'/, password=/'password'/, > cache=None) > > print client > > # > > # create a GetUserRequest object using the _wsdl_ > > # > > print /'create GetUserRequest'/ > > GetUserRequest = client.factory.create(/'ns1:GetUserRequest'/) > > GetUserRequest.username=/'_admin_'/ > > result=client.service.ProcessMessage(GetUserRequest ) > > print result > > # > > # create a GetAllUsersRequest object using the _wsdl_ > > # > > GetAllUsersRequest = client.factory.create(/'ns1:GetAllUsersRequest'/) > > result2=client.service.ProcessMessage(GetAllUsersRequest) > > print result2 > > and error occurred when I try to Invoke the ProccessMessage function > with and Empty class What kind of error? Can you provide that stack trace? > > Thanks a lot in advance > > Victor Gimeno > > > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5126 bytes Desc: S/MIME Cryptographic Signature URL: From ivanirjoao at gmail.com Thu Dec 17 05:51:44 2009 From: ivanirjoao at gmail.com (=?ISO-8859-1?Q?Jo=E3o_Kreuzberg?=) Date: Thu, 17 Dec 2009 03:51:44 -0200 Subject: [Fedora-suds-list] [NAMESPACE] Message-ID: <9e0c85e70912162151x61f1bcbew9ce8e393fc7a2f71@mail.gmail.com> Hey guys, First of all, congrats for Suds, it's a fantastic tool! I'm having a minor problem with the generated soap envelope for my request: 100 50 0 0 1 1 10 But the following line crashes: If I take xmlns="LDN" out, it works just fine. Is there a way for me to not include the prefix for the content document on my envelope? I know under client.options I'm able to configure the prefixes to False but that removes all the namespaces. I'm accessing .NET web services and it can't parse the envelope if it contains the xmlns="LDN". Thanks much, -- Ivanir Jo?o Kreuzberg -------------- next part -------------- An HTML attachment was scrubbed... URL: From kernity at gmail.com Thu Dec 17 09:01:23 2009 From: kernity at gmail.com (khalid y) Date: Thu, 17 Dec 2009 10:01:23 +0100 Subject: [Fedora-suds-list] WSSE Expires In-Reply-To: <970A1253589514429501F9C3960536889C55623A8C@LNWEXMBX0104.msad.ms.com> References: <970A1253589514429501F9C3960536889C55623989@LNWEXMBX0104.msad.ms.com> <301a0bc90912151216h424c89c4j2845cdb53e5d00aa@mail.gmail.com> <970A1253589514429501F9C3960536889C55623A8C@LNWEXMBX0104.msad.ms.com> Message-ID: <301a0bc90912170101p7c0241f2j97fa4ae936500424@mail.gmail.com> You are welcome :-) 2009/12/16 Andrews, Gavin > Thanks! Your approach worked?. I slightly tweaked it? > > > > from datetime import timedelta,date,datetime,tzinfo > > > > class TimestampToken(Token): > > def __init__(self, validity=60): > > Token.__init__(self) > > self.created = datetime.now() > > self.expires = self.created+ timedelta(seconds = validity) > > def xml(self): > > root = Element("Timestamp", ns = wsuns) > > u = Element('Created', ns = wsuns) > > u.setText(self.created.isoformat()) > > p = Element('Expires', ns =wsuns) > > p.setText(self.expires.isoformat()) > > root.append(u) > > root.append(p) > > return root > > > > security = Security() > > token = UsernameToken('MrAardvark','termite101') > > timetoken=TimestampToken(validity=60) > > security.tokens.append(timetoken) > > security.tokens.append(token) > > > > client.set_options(wsse=security) > > > > and got a good header? > > > > > > > > > > 2009-12-16T16:34:19.099520 > > 2009-12-16T16:35:19.099520 > > > > > > MrAardvark > > termite101 > > > > > > > > > > *From:* khalid y [mailto:kernity at gmail.com] > *Sent:* Tuesday 15 December 2009 20:17 > *To:* Andrews, Gavin (IDEAS) > *Cc:* fedora-suds-list at redhat.com > > *Subject:* Re: [Fedora-suds-list] WSSE Expires > > > > My solution was to add this expires like this but I'm not sure it's the > best way with the newest version. > > > from suds.client import Client > > # I created my own TimestampToken > > class TimestampToken(Token): > def __init__(self, validity=60): > Token.__init__(self) > self.created = datetime.now() > self.expires = self.created+ timedelta(seconds = validity) > def xml(self): > root = Element("Timestamp", ns = wsuns) > u = Element('Created', ns = wsuns) > u.setText(date.to_iso8601(self.created)) > p = Element('Expires', ns =wsuns) > p.setText(date.to_iso8601(self.expires)) > root.append(p) > return root > > url = "http://127.0.0.1:8080/api/AuthenticationService?wsdl" > service = Client(url) > security = Security() > # Add your security token here :-) > > ###### > > timetoken = TimestampToken(validity=60) > security.tokens.append(timetoken) > service.set_options(wsse=security) > > So my service is ready to handle request. > > @+++ > > 2009/12/15 Andrews, Gavin > > I am trying to perform a SOAP Client call to a server which mandates WSSE > Authentication. > > > > Creating > > > > > > > > username > > password > > 2009-12-15T19:01:46.229259 > > > > > > Works well, but the server still isn?t happy as it requires the wsu:Expires > element. > > > > Is there a way to add expires into the UsernameToken? > > > > Thanks in advance, > > Gavin > ------------------------------ > > NOTICE: If received in error, please destroy, and notify sender. Sender > does not intend to waive confidentiality or privilege. Use of this email is > prohibited when received in error. We may monitor and store emails to the > extent permitted by applicable law. > > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list > > > ------------------------------ > > NOTICE: If received in error, please destroy, and notify sender. Sender > does not intend to waive confidentiality or privilege. Use of this email is > prohibited when received in error. We may monitor and store emails to the > extent permitted by applicable law. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jortel at redhat.com Thu Dec 17 15:52:01 2009 From: jortel at redhat.com (Jeff Ortel) Date: Thu, 17 Dec 2009 09:52:01 -0600 Subject: [Fedora-suds-list] [NAMESPACE] In-Reply-To: <9e0c85e70912162151x61f1bcbew9ce8e393fc7a2f71@mail.gmail.com> References: <9e0c85e70912162151x61f1bcbew9ce8e393fc7a2f71@mail.gmail.com> Message-ID: <4B2A53A1.80100@redhat.com> Hey Jo?o, Can you give me a link (or attach) the wsdl? Regards, Jeff On 12/16/2009 11:51 PM, Jo?o Kreuzberg wrote: > Hey guys, > > First of all, congrats for Suds, it's a fantastic tool! Thanks :) > > I'm having a minor problem with the generated soap envelope for my request: > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> > > > > > 100 > 50 > 0 > 0 > 1 > 1 > 10 > > > > > > But the following line crashes: > > > > If I take xmlns="LDN" out, it works just fine. > > Is there a way for me to not include the prefix for the content document > on my envelope? > > I know under client.options I'm able to configure the prefixes to False > but that removes all the namespaces. > > I'm accessing .NET web services and it can't parse the envelope if it > contains the xmlns="LDN". > > Thanks much, > > -- > Ivanir Jo?o Kreuzberg > > > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5126 bytes Desc: S/MIME Cryptographic Signature URL: From jortel at redhat.com Fri Dec 18 15:13:09 2009 From: jortel at redhat.com (Jeff Ortel) Date: Fri, 18 Dec 2009 09:13:09 -0600 Subject: [Fedora-suds-list] suds 0.3.8 released 12/17. Message-ID: <4B2B9C05.2080401@redhat.com> All, Suds 0.3.8 released (GA) on 12/17. Again, thanks to all the early adopters of the beta who really helped QA this release. Details here: https://fedorahosted.org/suds/wiki/ReleaseHistory Fedora users, 0.3.8 submitted to Rawhide and Testing for F11 & F12. It should go into Stable in a few weeks. For 0.3.9 planning, see here: https://fedorahosted.org/suds/#Development. Regards, Jeff -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5126 bytes Desc: S/MIME Cryptographic Signature URL: From rnm at whidbey.com Fri Dec 18 17:24:16 2009 From: rnm at whidbey.com (Robert Marsanyi) Date: Fri, 18 Dec 2009 09:24:16 -0800 Subject: [Fedora-suds-list] suds 0.3.8 released 12/17. References: <4B2B9C05.2080401@redhat.com> Message-ID: <204A2BA6178844D08D590A283A0E2051@bluto> Thanks for the work you did on this, Jeff. Useful tool, made more useful by continued maintenance and responsiveness to users. --rbt ----- Original Message ----- From: "Jeff Ortel" To: Sent: Friday, December 18, 2009 7:13 AM Subject: [Fedora-suds-list] suds 0.3.8 released 12/17. > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list From loafed at lepoujols.com Sat Dec 19 22:31:41 2009 From: loafed at lepoujols.com (Lucrecia) Date: Sat, 19 Dec 2009 23:31:41 +0100 Subject: [Fedora-suds-list] (no subject) Message-ID: <4B2D52E8.2090508@lepoujols.com> -------------- next part -------------- A non-text attachment was scrubbed... Name: taradiddle.jpg Type: image/jpeg Size: 9671 bytes Desc: not available URL: From ryanitus at gmail.com Mon Dec 21 22:16:24 2009 From: ryanitus at gmail.com (Ryan Schroeder) Date: Mon, 21 Dec 2009 14:16:24 -0800 Subject: [Fedora-suds-list] HttpAuthenticated for WSDL open Message-ID: <95478d6e0912211416r1e9b8a60t4c62c01b0cc5e3a3@mail.gmail.com> Hello, I have a server that requires basic HTTP authentication to download the WSDL file. I tried setting the transport to HTTPAuthenticated, but it looks like the Client doesn't apply the options.transport when opening the url. Here's the snippet I'm referring to from client.py: def __init__(self, url, **kwargs): """ @param url: The URL for the WSDL. @type url: str @param kwargs: keyword arguments. @see: L{Options} """ options = Options() options.transport = HttpAuthenticated() self.options = options options.cache = FileCache(days=1) self.set_options(**kwargs) self.wsdl = Definitions(url, options) <-------------- shouldn't this be self.options? I tried making this change, but also ran into the fact that the HttpAuthenticated class does not override the open method using a provided username and password. The basic HttpTransport open method is called instead. Regards, Ryan -------------- next part -------------- An HTML attachment was scrubbed... URL: From ryanitus at gmail.com Mon Dec 21 23:03:49 2009 From: ryanitus at gmail.com (Ryan Schroeder) Date: Mon, 21 Dec 2009 15:03:49 -0800 Subject: [Fedora-suds-list] HttpAuthenticated for WSDL open In-Reply-To: <95478d6e0912211416r1e9b8a60t4c62c01b0cc5e3a3@mail.gmail.com> References: <95478d6e0912211416r1e9b8a60t4c62c01b0cc5e3a3@mail.gmail.com> Message-ID: <95478d6e0912211503n13969159p91bed1e3f930d323@mail.gmail.com> Here's the open function for HttpAuthenticated. class HttpAuthenticated(HttpTransport): """ Provides basic http authentication for servers that don't follow the specified challenge / response model. This implementation appends the I{Authorization} http header with base64 encoded credentials on every http request. """ def open(self, request): credentials = self.credentials() theurl = request.url username = credentials[0] password = credentials[1] passman = u2.HTTPPasswordMgrWithDefaultRealm() passman.add_password(None, theurl, username, password) authhandler = u2.HTTPBasicAuthHandler(passman) opener = u2.build_opener(authhandler) u2.install_opener(opener) return HttpTransport.open(self, request) On Mon, Dec 21, 2009 at 2:16 PM, Ryan Schroeder wrote: > Hello, > > I have a server that requires basic HTTP authentication to download the > WSDL file. I tried setting the transport to HTTPAuthenticated, but it looks > like the Client doesn't apply the options.transport when opening the url. > > Here's the snippet I'm referring to from client.py: > > def __init__(self, url, **kwargs): > """ > @param url: The URL for the WSDL. > @type url: str > @param kwargs: keyword arguments. > @see: L{Options} > """ > options = Options() > options.transport = HttpAuthenticated() > self.options = options > options.cache = FileCache(days=1) > self.set_options(**kwargs) > self.wsdl = Definitions(url, options) <-------------- > shouldn't this be self.options? > > > I tried making this change, but also ran into the fact that the > HttpAuthenticated class does not override the open method using a provided > username and password. The basic HttpTransport open method is called > instead. > > Regards, > > Ryan > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcauthorn at gmail.com Tue Dec 22 02:11:52 2009 From: mcauthorn at gmail.com (Matt C) Date: Mon, 21 Dec 2009 21:11:52 -0500 Subject: [Fedora-suds-list] HttpAuthenticated for WSDL open In-Reply-To: <95478d6e0912211503n13969159p91bed1e3f930d323@mail.gmail.com> References: <95478d6e0912211416r1e9b8a60t4c62c01b0cc5e3a3@mail.gmail.com> <95478d6e0912211503n13969159p91bed1e3f930d323@mail.gmail.com> Message-ID: <42ea979e0912211811o6527f5bcu1b02c3e47af1d363@mail.gmail.com> Ryan: my setup is similar, and the normal c = Client(url, username = 'foo', password = 'bar') has always worked - could you send a sample of your code? -Matt On Mon, Dec 21, 2009 at 6:03 PM, Ryan Schroeder wrote: > Here's the open function for HttpAuthenticated. > > class HttpAuthenticated(HttpTransport): > ??? """ > ??? Provides basic http authentication for servers that don't follow > ??? the specified challenge / response model.? This implementation > ??? appends the I{Authorization} http header with base64 encoded > ??? credentials on every http request. > ??? """ > ??? def open(self, request): > ??????? credentials = self.credentials() > ??????? theurl = request.url > ??????? username = credentials[0] > ??????? password = credentials[1] > ??????? passman = u2.HTTPPasswordMgrWithDefaultRealm() > ??????? passman.add_password(None, theurl, username, password) > ??????? authhandler = u2.HTTPBasicAuthHandler(passman) > ??????? opener = u2.build_opener(authhandler) > ??????? u2.install_opener(opener) > ??????? return HttpTransport.open(self, request) > > > > On Mon, Dec 21, 2009 at 2:16 PM, Ryan Schroeder wrote: >> >> Hello, >> >> I have a server that requires basic HTTP authentication to download the >> WSDL file.? I tried setting the transport to HTTPAuthenticated, but it looks >> like the Client doesn't apply the options.transport when opening the url. >> >> Here's the snippet I'm referring to from client.py: >> >> ??? def __init__(self, url, **kwargs): >> ??????? """ >> ??????? @param url: The URL for the WSDL. >> ??????? @type url: str >> ??????? @param kwargs: keyword arguments. >> ??????? @see: L{Options} >> ??????? """ >> ??????? options = Options() >> ??????? options.transport = HttpAuthenticated() >> ??????? self.options = options >> ??????? options.cache = FileCache(days=1) >> ??????? self.set_options(**kwargs) >> ??????? self.wsdl = Definitions(url, options)?????????? <-------------- >> shouldn't this be self.options? >> >> >> I tried making this change, but also ran into the fact that the >> HttpAuthenticated class does not override the open method using a provided >> username and password.? The basic HttpTransport open method is called >> instead. >> >> Regards, >> >> Ryan >> > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list > From ivanirjoao at gmail.com Tue Dec 22 05:39:32 2009 From: ivanirjoao at gmail.com (=?ISO-8859-1?Q?Jo=E3o_Kreuzberg?=) Date: Tue, 22 Dec 2009 03:39:32 -0200 Subject: [Fedora-suds-list] fedora-suds-list Digest, Vol 20, Issue 23 In-Reply-To: <20091217170003.5330161B606@hormel.redhat.com> References: <20091217170003.5330161B606@hormel.redhat.com> Message-ID: <9e0c85e70912212139p1371c264q4c4a2993ecb803e4@mail.gmail.com> Jeff, I was able to resolve it within the WS backend, but thanks for the quick response. Keep up the excellent work. Regards, Jo?o On Thu, Dec 17, 2009 at 3:00 PM, wrote: > Send fedora-suds-list mailing list submissions to > fedora-suds-list at redhat.com > > To subscribe or unsubscribe via the World Wide Web, visit > https://www.redhat.com/mailman/listinfo/fedora-suds-list > or, via email, send a message with subject or body 'help' to > fedora-suds-list-request at redhat.com > > You can reach the person managing the list at > fedora-suds-list-owner at redhat.com > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of fedora-suds-list digest..." > > > Today's Topics: > > 1. Re: [NAMESPACE] (Jeff Ortel) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 17 Dec 2009 09:52:01 -0600 > From: Jeff Ortel > Subject: Re: [Fedora-suds-list] [NAMESPACE] > To: Jo?o Kreuzberg > Cc: fedora-suds-list at redhat.com > Message-ID: <4B2A53A1.80100 at redhat.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hey Jo?o, > > Can you give me a link (or attach) the wsdl? > > Regards, > > Jeff > > On 12/16/2009 11:51 PM, Jo?o Kreuzberg wrote: > > Hey guys, > > > > First of all, congrats for Suds, it's a fantastic tool! > > Thanks :) > > > > > I'm having a minor problem with the generated soap envelope for my > request: > > > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> > > > > > > > > > > 100 > > 50 > > 0 > > 0 > > 1 > > 1 > > 10 > > > > > > > > > > > > But the following line crashes: > > > > > > > > If I take xmlns="LDN" out, it works just fine. > > > > Is there a way for me to not include the prefix for the content document > > on my envelope? > > > > I know under client.options I'm able to configure the prefixes to False > > but that removes all the namespaces. > > > > I'm accessing .NET web services and it can't parse the envelope if it > > contains the xmlns="LDN". > > > > Thanks much, > > > > -- > > Ivanir Jo?o Kreuzberg > > > > > > > > _______________________________________________ > > fedora-suds-list mailing list > > fedora-suds-list at redhat.com > > https://www.redhat.com/mailman/listinfo/fedora-suds-list > > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: smime.p7s > Type: application/pkcs7-signature > Size: 5126 bytes > Desc: S/MIME Cryptographic Signature > Url : > https://www.redhat.com/archives/fedora-suds-list/attachments/20091217/dc89bfd3/smime.bin > > ------------------------------ > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list > > End of fedora-suds-list Digest, Vol 20, Issue 23 > ************************************************ > -- Ivanir Jo?o Kreuzberg -------------- next part -------------- An HTML attachment was scrubbed... URL: From brofield+suds at gmail.com Tue Dec 22 12:02:54 2009 From: brofield+suds at gmail.com (Brodie Thiesfield) Date: Tue, 22 Dec 2009 21:02:54 +0900 Subject: [Fedora-suds-list] preserving space? Message-ID: Hi all, New to suds and I'm seeing some strange behaviour with whitespace only contents. I have an element being returned from the soap server that consists of just a single space. The WSDL defines this as: In the debug log I can see that the space has been returned by the server, although I don't understand any of the rest of the log (is there a way to log only the messages?) When accessing this element though, it has the value of None. i.e. this code appends 'None' to the string: if part.text == None: txn += ""; else: txn += part.text Surely this is not expected behaviour? Is there some setting that I am missing to prevent this? Is there a way to make it return the space? Regards, Brodie Note: Using suds 0.3.8 GA on Windows with python 2.6.4 From jortel at redhat.com Tue Dec 22 14:51:28 2009 From: jortel at redhat.com (Jeff Ortel) Date: Tue, 22 Dec 2009 08:51:28 -0600 Subject: [Fedora-suds-list] preserving space? In-Reply-To: References: Message-ID: <4B30DCF0.1040600@redhat.com> Hey Brodie, Well, what you're seeing is kind of intentional. Since the early days, the suds sax parser has trimmed the text. This comes from when the sax package was written and the XML documents used for testing were formatted and the leading and trailing newlines and whitespace was annoying and troublesome. But, in the context of soap messages, trimming the text just causes problems (as you've noted). Also, soap messages are rarely (probably never) formatted so there is really not benefit to trimming. So, in r630, I discontinued trimming the text in the sax parser. r630 has been released in 0.3.9 beta. Thanks for bringing this to my attention. Regards, Jeff On 12/22/2009 06:02 AM, Brodie Thiesfield wrote: > Hi all, > > New to suds and I'm seeing some strange behaviour with whitespace only contents. > > I have an element being returned from the soap server that consists of > just a single space. > > > The WSDL defines this as: > maxOccurs="1" nillable="true"/> > > In the debug log I can see that the space has been returned by the > server, although I don't understand any of the rest of the log (is > there a way to log only the messages?) > > When accessing this element though, it has the value of None. i.e. > this code appends 'None' to the string: > if part.text == None: > txn += ""; > else: > txn += part.text > > Surely this is not expected behaviour? Is there some setting that I am > missing to prevent this? Is there a way to make it return the space? > > Regards, > Brodie > > Note: Using suds 0.3.8 GA on Windows with python 2.6.4 > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5126 bytes Desc: S/MIME Cryptographic Signature URL: From brofield+suds at gmail.com Tue Dec 22 14:54:16 2009 From: brofield+suds at gmail.com (Brodie Thiesfield) Date: Tue, 22 Dec 2009 23:54:16 +0900 Subject: [Fedora-suds-list] preserving space? In-Reply-To: <4B30DCF0.1040600@redhat.com> References: <4B30DCF0.1040600@redhat.com> Message-ID: Hi Jeff, Thanks for the update. I'll upgrade to the later version when I can. Regards, Brodie On Tue, Dec 22, 2009 at 11:51 PM, Jeff Ortel wrote: > Hey Brodie, > > Well, what you're seeing is kind of intentional. ?Since the early days, the > suds sax parser has trimmed the text. ?This comes from when the sax package > was written and the XML documents used for testing were formatted and the > leading and trailing newlines and whitespace was annoying and troublesome. > ?But, in the context of soap messages, trimming the text just causes > problems (as you've noted). ?Also, soap messages are rarely (probably never) > formatted so there is really not benefit to trimming. > > So, in r630, I discontinued trimming the text in the sax parser. ?r630 has > been released in 0.3.9 beta. > > Thanks for bringing this to my attention. > > Regards, > > Jeff > > On 12/22/2009 06:02 AM, Brodie Thiesfield wrote: >> >> Hi all, >> >> New to suds and I'm seeing some strange behaviour with whitespace only >> contents. >> >> I have an element being returned from the soap server that consists of >> just a single space. >> ? ? >> >> The WSDL defines this as: >> ? ? ?> maxOccurs="1" nillable="true"/> >> >> In the debug log I can see that the space has been returned by the >> server, although I don't understand any of the rest of the log (is >> there a way to log only the messages?) >> >> When accessing this element though, it has the value of None. i.e. >> this code appends 'None' to the string: >> ? ? ? ? if part.text == None: >> ? ? ? ? ? ? txn += ""; >> ? ? ? ? else: >> ? ? ? ? ? ? txn += part.text >> >> Surely this is not expected behaviour? Is there some setting that I am >> missing to prevent this? Is there a way to make it return the space? >> >> Regards, >> Brodie >> >> Note: Using suds 0.3.8 GA on Windows with python 2.6.4 >> >> _______________________________________________ >> 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 Dec 22 14:56:40 2009 From: jortel at redhat.com (Jeff Ortel) Date: Tue, 22 Dec 2009 08:56:40 -0600 Subject: [Fedora-suds-list] HttpAuthenticated for WSDL open In-Reply-To: <42ea979e0912211811o6527f5bcu1b02c3e47af1d363@mail.gmail.com> References: <95478d6e0912211416r1e9b8a60t4c62c01b0cc5e3a3@mail.gmail.com> <95478d6e0912211503n13969159p91bed1e3f930d323@mail.gmail.com> <42ea979e0912211811o6527f5bcu1b02c3e47af1d363@mail.gmail.com> Message-ID: <4B30DE28.5070407@redhat.com> On 12/21/2009 08:11 PM, Matt C wrote: > Ryan: my setup is similar, and the normal c = Client(url, username = > 'foo', password = 'bar') has always worked - could you send a sample > of your code? As Matt has pointed out, this is the proper way to get the wsdl using http basic authentication. The default transport already is HttpAuthenticated so you simply need to pass the username and password in the Client constructor. If this does not work then maybe your server does not implement RFC-2617 (as described here: http://en.wikipedia.org/wiki/Basic_access_authentication) properly in which case I can describe the workaround. > > -Matt > > On Mon, Dec 21, 2009 at 6:03 PM, Ryan Schroeder wrote: >> Here's the open function for HttpAuthenticated. >> >> class HttpAuthenticated(HttpTransport): >> """ >> Provides basic http authentication for servers that don't follow >> the specified challenge / response model. This implementation >> appends the I{Authorization} http header with base64 encoded >> credentials on every http request. >> """ >> def open(self, request): >> credentials = self.credentials() >> theurl = request.url >> username = credentials[0] >> password = credentials[1] >> passman = u2.HTTPPasswordMgrWithDefaultRealm() >> passman.add_password(None, theurl, username, password) >> authhandler = u2.HTTPBasicAuthHandler(passman) >> opener = u2.build_opener(authhandler) >> u2.install_opener(opener) >> return HttpTransport.open(self, request) >> >> >> >> On Mon, Dec 21, 2009 at 2:16 PM, Ryan Schroeder wrote: >>> >>> Hello, >>> >>> I have a server that requires basic HTTP authentication to download the >>> WSDL file. I tried setting the transport to HTTPAuthenticated, but it looks >>> like the Client doesn't apply the options.transport when opening the url. >>> >>> Here's the snippet I'm referring to from client.py: >>> >>> def __init__(self, url, **kwargs): >>> """ >>> @param url: The URL for the WSDL. >>> @type url: str >>> @param kwargs: keyword arguments. >>> @see: L{Options} >>> """ >>> options = Options() >>> options.transport = HttpAuthenticated() >>> self.options = options >>> options.cache = FileCache(days=1) >>> self.set_options(**kwargs) >>> self.wsdl = Definitions(url, options)<-------------- >>> shouldn't this be self.options? >>> >>> >>> I tried making this change, but also ran into the fact that the >>> HttpAuthenticated class does not override the open method using a provided >>> username and password. The basic HttpTransport open method is called >>> instead. >>> >>> Regards, >>> >>> Ryan >>> >> >> _______________________________________________ >> 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 -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5126 bytes Desc: S/MIME Cryptographic Signature URL: From cannibal at flynncenter.org Tue Dec 22 18:52:04 2009 From: cannibal at flynncenter.org (Kops Ganem) Date: Tue, 22 Dec 2009 19:52:04 +0100 Subject: [Fedora-suds-list] (no subject) Message-ID: <4B3111EE.8050203@flynncenter.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: gianthood.jpg Type: image/jpeg Size: 14755 bytes Desc: not available URL: From cosgrave at gumanize.com Wed Dec 23 17:21:21 2009 From: cosgrave at gumanize.com (Eichholz) Date: Wed, 23 Dec 2009 18:21:21 +0100 Subject: [Fedora-suds-list] of the tre Message-ID: <4B324FFA.1030604@gumanize.com> Ks presently gave up all hope of finishing their quadrille, and rising in the air with a tremendous flapping of wings, flew away over the tops of the houses and disappeared. Strangely enough, the sound of the fiddling followed them like a traveling band, and grew fainter and fainter until it finally died away in the distance. But the scuffling noise in the houses continued, and Dorothy did just what you'd suppose such a curious little child would have done--that is, she stole up and peeped in at one of the windows; but she could see nothing through the thick glass but some strange-looking shadows bobbing confusedly about inside. Of course you know what she did _then_. In fact, after hesitating a moment, she softly opened the door of the house and went in. The room was full of animals of every description, dancing around in a ring with the greatest enthusiasm; and as Dorothy appeared they all shouted, "Here she is!" and, before she could say a single word, the two nearest to her (they were an elephant and a sheep, by the way) seized her by the hands, and the next moment she was dancing in the ring. She was quite surprise -------------- next part -------------- A non-text attachment was scrubbed... Name: eupatrid.jpg Type: image/jpeg Size: 19819 bytes Desc: not available URL: From brofield+suds at gmail.com Thu Dec 24 02:29:32 2009 From: brofield+suds at gmail.com (Brodie Thiesfield) Date: Thu, 24 Dec 2009 11:29:32 +0900 Subject: [Fedora-suds-list] HTTP1.1 keep-alive persistent connections Message-ID: Hi all, I am interested in getting keep-alive connections working with suds because it has large performance benefits for my application. I noticed that there was some discussion in October about persistent connections: https://www.redhat.com/archives/fedora-suds-list/2009-October/msg00038.html Rod -> you were going to follow up to the list about your results. Have you had any luck till now in getting that working? If you did, is it possible to share your solution? Best regards, Brodie From boughten at mpstextiles.com Thu Dec 24 11:08:54 2009 From: boughten at mpstextiles.com (Lykens) Date: Thu, 24 Dec 2009 12:08:54 +0100 Subject: [Fedora-suds-list] He reserve oxygen tanks. Under the Message-ID: <4B334AA5.7090209@mpstextiles.com> T-commander Davis was directing the retreat of his men over the sand dunes to their waiting boats on the beach front a mile or so off. German airplanes were making valiant efforts to wipe out the American landing party, but were so hard pressed by the heavy fire from the American battleships at sea that their aim was inaccurate. The U-boat got under way with Lieutenant Bridwell, Jack, and the German pilot in the conning tower. Ted was dividing his time between the engine room and the control chamber, where the other two Germans were stationed under strong guard. Moving very slowly, the U-boat was headed down the canal and very soon emerged into the bay that Jack had found in his exploration of the coast. In full view now was the American fleet from which the landing party had been set ashore---the battleship Tallahassee, the cruisers Detroit and Raleigh, the destroyer _Farragut_ and the submarine _Dewey_. The Tallahassee was lying broadside of the coast with all her monster fourteen-inch guns ready for action. Soon the U-boat had wormed its way safely out into the open sea and was skimming along under the heavy fire of the fleet that was being directed against the German coast fortifications. As the U-boat, with the Stars and Stripes flaunting astern, moved outward, the fleet got under way. Notwithstanding the heavy German fire from the coast defenses the American ships got safely away virtually unscarred in the battle. Fifteen miles out at sea the captured German U-boat came up with the _Dewey_. Jack had a joyous reunion with "Little Mack," Cleary and Binns, Bill Witt, Mike Mowrey and all his other friends aboard the reclaimed American submarine. And then he heard the complete story of his rescue. No sooner had the _Dewey_ appeared upon the, surface, following the successful consummation of Ted Wainwright's plan, than she had sighted the destroyer _Farragut_ -------------- next part -------------- A non-text attachment was scrubbed... Name: apriorism.jpg Type: image/jpeg Size: 15959 bytes Desc: not available URL: From monty at starfief.com Thu Dec 24 15:37:26 2009 From: monty at starfief.com (Rod Montgomery) Date: Thu, 24 Dec 2009 10:37:26 -0500 Subject: [Fedora-suds-list] HTTP1.1 keep-alive persistent connections Message-ID: <4B338AB6.4040204@starfief.com> Alas, it turned out to be harder than I had expected, and I've been distracted by other things. I'm still working on it, but I don't have anything working yet. From shelagh at vidicap.nl Fri Dec 25 03:38:31 2009 From: shelagh at vidicap.nl (McGill) Date: Thu, 24 Dec 2009 22:38:31 -0500 Subject: [Fedora-suds-list] life. Message-ID: <4B3431AC.5030301@vidicap.nl> Wild Indians, who, coming down the lake, saw our camp-fire. They had a number of thin, wild, wolfish, half- starved Esquimaux dogs with them. They made a great fuss over me, which here meant so much tea and food. I treated them kindly, and, fearing for our supplies, and even our dog harness, and the other things for which the terrible Esquimaux dog has such an appetite, I politely informed them that I thought they would be more comfortable if they travelled on a little further. This hint was met with loud protestations that they could not, under any circumstances, think of denying themselves the pleasure of at least stopping one night in the camp of the Missionary, about whom they had heard so much as the great friend of the Indian. Of course I could not go back on my record, or resist such diplomacy; but I saw trouble ahead, and I was not disappointed. In order to save something, I gave to their wolfish dogs all the fish I had, which was sufficient for my eight for several days. These the Esquimaux speedily devoured. I made the men bring the dog harness into the camp, and with the sleds, to save the straps and lashings, they built a little barricade against the wind. In addition to the food supplies for the trip, I had a bag of meat, and another of buns, for my use when I should reach the village, where I was going to preach and to teach. I gathered a pile of clubs, which I cut from the driftwood on the shore, from which we had also obtained that for our fire. Then, putting the bag of meat, which was -------------- next part -------------- A non-text attachment was scrubbed... Name: incorporated.jpg Type: image/jpeg Size: 20608 bytes Desc: not available URL: From trusting at henri.nl Sat Dec 26 13:17:43 2009 From: trusting at henri.nl (Shor) Date: Sat, 26 Dec 2009 13:17:43 -0000 Subject: [Fedora-suds-list] you, reely?" said Mr. Smith, mecha Message-ID: <4B3607AB.2020202@henri.nl> Aking with a vehemence which made the girl instinctively avert her head--"I mean that to please you would be the greatest happiness I could know. I love you." Miss Nugent sat silent, and a strong sense of the monstrous unfairness of such a su -------------- next part -------------- A non-text attachment was scrubbed... Name: heft.jpg Type: image/jpeg Size: 13095 bytes Desc: not available URL: From grounding at qlever.nl Sun Dec 27 18:31:03 2009 From: grounding at qlever.nl (Boepple) Date: Mon, 28 Dec 2009 03:31:03 +0900 Subject: [Fedora-suds-list] what her Message-ID: <4B37A56B.1090708@qlever.nl> S. "Apparently you carried it off well," he commented. "I hope so," she answered, coloring a little. "They're making their usual Wednesday motor trip." "He did not tell you their destination?" "No, but Lieutenant Kramer is dining with him to-night at the Biltmore." "Fine. Those things the Chief can take care of. That leaves the way clear for us to-morrow afternoon." "What excuse will I make for having you come up to the apartment?" "You want me to change some -------------- next part -------------- A non-text attachment was scrubbed... Name: earthmen.jpg Type: image/jpeg Size: 15630 bytes Desc: not available URL: From larryt at winfirst.com Mon Dec 28 07:14:52 2009 From: larryt at winfirst.com (larryt at winfirst.com) Date: Sun, 27 Dec 2009 23:14:52 -0800 (PST) Subject: [Fedora-suds-list] .net service w/ WSE3 Message-ID: <20091227231452.ALR90733@ms1.mc.surewest.net> Does anybody have suds working with a .net service using wse3? I've read that the default wse3 configs only work with .net clients, Quelle Suprise. thanks, larry From hostess at streekstra.nl Wed Dec 30 10:05:49 2009 From: hostess at streekstra.nl (Aguino) Date: Wed, 30 Dec 2009 07:05:49 -0300 Subject: [Fedora-suds-list] Se of the abilities and virtues which he Message-ID: <4B3B20FC.3040609@streekstra.nl> know what we felt when you were flirting with Mr. Mason at your Lord Mayor's banquet." A cleaner and straighter "counter" than that, if we may change the image to one his audience would appreciate better, is hardly to be found in the records of British pugilism. The orator concluded by a rather sanguine statement of his change of opinion as to British sentiment, of the ass -------------- next part -------------- A non-text attachment was scrubbed... Name: scrap.jpg Type: image/jpeg Size: 15985 bytes Desc: not available URL: