From jortel at redhat.com Thu Oct 1 13:01:59 2009 From: jortel at redhat.com (Jeff Ortel) Date: Thu, 01 Oct 2009 08:01:59 -0500 Subject: [Fedora-suds-list] Trunk broken r754 Message-ID: <4AC4A847.9040006@redhat.com> Trunk is broken as of r574. I'll fix ASAP and post an update to the list. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3360 bytes Desc: S/MIME Cryptographic Signature URL: From jortel at redhat.com Thu Oct 1 13:23:57 2009 From: jortel at redhat.com (Jeff Ortel) Date: Thu, 01 Oct 2009 08:23:57 -0500 Subject: [Fedora-suds-list] Trunk fixed. Message-ID: <4AC4AD6D.6080307@redhat.com> Trunk back on its feet again, r576. I'll continue testing/fixing throughout the day. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3360 bytes Desc: S/MIME Cryptographic Signature URL: From jortel at redhat.com Thu Oct 1 15:00:52 2009 From: jortel at redhat.com (Jeff Ortel) Date: Thu, 01 Oct 2009 10:00:52 -0500 Subject: [Fedora-suds-list] Suds memory footprint In-Reply-To: <4AA963A5.7030807@redhat.com> References: <4AA963A5.7030807@redhat.com> Message-ID: <4AC4C424.8070203@redhat.com> On 09/10/2009 03:37 PM, Jeff Ortel wrote: > > > On 09/10/2009 11:00 AM, Chris Frantz wrote: >> Hello, >> >> I would like to use suds to talk to several SOAP services, each using >> the same WSDL. The wsdl file is rather large (about 500K) and >> translates to about 50M of memory once parsed. >> >> If I do this: >> c1 = Client('file:myservice.wsdl) >> c1.set_options(location="https://addr1/soap") >> c2 = Client('file:myservice.wsdl) >> c2.set_options(location="https://addr2/soap") >> (etc) >> >> Then each Client instance adds about 50M to my program's memory >> footprint. Is there any way to parse the WSDL once and create >> several client objects based on the already-parsed file? > > Not really. > >> >> A cursory inspection of the Client code suggests I might be able to >> create the first Client() and then make new instances of client that >> reference the wsdl, factory and sd members of the original, but >> contains different Options and possibly it's own ServiceSelector. > > This approach is your best bet. Let me tweak a few things to facilitate > this. I added a Client.clone() method to help provide for cases like yours where users want to read the wsdl once and then create many (thin) clones to support usage in multiple threads with a minimal memory footprint. I added clone() in a previous revision but it needed some Options refactoring and __deepcopy__() tweaking in the HttpTransport hierarchy to really behave correctly. The clone() provides for sharing the wsdl but allowing for independent Options and Transports. Anyway, I know you cooked up a solution which is great. But, I don't really have a good test environment for this and I'd appreciate your giving it a try. Thanks -jeff > >> >> Suggestions or comments? >> --Chris >> >> _______________________________________________ >> 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: 3360 bytes Desc: S/MIME Cryptographic Signature URL: From lucy at bilumi.org Tue Oct 6 03:42:48 2009 From: lucy at bilumi.org (Lucy Mendel) Date: Mon, 5 Oct 2009 23:42:48 -0400 Subject: [Fedora-suds-list] suds.WebFault: Server raised fault: 'The arguments supplied to the function were not valid: Missing Message-ID: Hi, I'm new to suds and soap in general, so please bear with my imprecise terminology (and feel free to correct me). Namely, the following fails inexplicably with a Missing argument server fault, yet I've supplied the exact argument requested, both as named parameters, positional parameters, **dict. >>> from suds.client import Client >>> url = 'https://api.verticalresponse.com/partner-wsdl/1.0/VRAPI.wsdl' >>> client = Client(url) >>> client.service.login(username="clay at bilumi.org", password="XXX", session_duration_minutes=30) <<< python 2.6 on os X.5 >>> No handlers could be found for logger "suds.client" Traceback (most recent call last): File "", line 1, in File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 535, in __call__ File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 595, in invoke File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 630, in send File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 681, in failed File "build/bdist.macosx-10.3-fat/egg/suds/bindings/binding.py", line 235, in get_fault suds.WebFault: Server raised fault: 'The arguments supplied to the function were not valid: Missing username' <<< python 2.5 on ubuntu 8.04 >>> No handlers could be found for logger "suds.client" Traceback (most recent call last): File "", line 1, in File "build/bdist.linux-i686/egg/suds/client.py", line 535, in __call__ File "build/bdist.linux-i686/egg/suds/client.py", line 595, in invoke File "build/bdist.linux-i686/egg/suds/client.py", line 630, in send File "build/bdist.linux-i686/egg/suds/client.py", line 681, in failed File "build/bdist.linux-i686/egg/suds/bindings/binding.py", line 235, in get_fault suds.WebFault: Server raised fault: 'The arguments supplied to the function were not valid: Missing username' <<< ipython 2.6 on mac >>> --------------------------------------------------------------------------- WebFault Traceback (most recent call last) /Users/lucy/sandbox/CalmProcrasDonate/procrasdonate/applib/ in () /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc in __call__(self, *args, **kwargs) 533 return (500, e) 534 else: --> 535 return client.invoke(args, kwargs) 536 537 def faults(self): /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc in invoke(self, args, kwargs) 593 self.method.name, timer) 594 timer.start() --> 595 result = self.send(msg) 596 timer.stop() 597 metrics.log.debug( /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc in send(self, msg) 628 else: 629 log.error(self.last_sent()) --> 630 result = self.failed(binding, e) 631 return result 632 /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc in failed(self, binding, error) 679 if status == 500: 680 if len(reply) > 0: --> 681 r, p = binding.get_fault(reply) 682 self.last_received(r) 683 return (status, p) /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/bindings/binding.pyc in get_fault(self, reply) 233 p = unmarshaller.process(fault) 234 if self.options.faults: --> 235 raise WebFault(p, faultroot) 236 return (faultroot, p.detail) 237 WebFault: Server raised fault: 'The arguments supplied to the function were not valid: Missing username' just in case: client.service.login(username="clay at bilumi.org", password="XXX", session_duration_minutes=30) client.service.login("clay at bilumi.org", "XXX", 30) d = {'username':"clay at bilumi.org", 'password':"XXX", 'session_duration_minutes':3} client.service.login(**d) I tried to get suds to work with a different wsdl to determine whether the problem is user error. I could not find a simple soap server to point at. Maybe that is all I really need....suggestions? I'm using revision 577 of the suds repo. I am in communication with a VerticalResponse engineer; VerticalResponse is the company whose API I'd like to communicate with. People there have barely heard of python, though, so if I can be certain the problem is not on my end (it likely is) that would be awesome. Thanks for your help. I've heard excellent things about suds on stackoverflow, so keep up the good work. Lucy. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lucy at bilumi.org Tue Oct 6 03:47:55 2009 From: lucy at bilumi.org (Lucy Mendel) Date: Mon, 5 Oct 2009 23:47:55 -0400 Subject: [Fedora-suds-list] Re: suds.WebFault: Server raised fault: 'The arguments supplied to the function were not valid: Missing In-Reply-To: References: Message-ID: ps - this is the documentation that leads me to think i'm calling login correctly https://api.verticalresponse.com/partner-wsdl/1.0/documentation.html#createList pps - i sporatically get the error message below when calling Client(url). i delete the temp file (cache?) and then things work. Traceback (most recent call last): File "", line 1, in File "build/bdist.linux-i686/egg/suds/client.py", line 109, in __init__ File "build/bdist.linux-i686/egg/suds/wsdl.py", line 194, in __init__ File "build/bdist.linux-i686/egg/suds/wsdl.py", line 256, in build_schema File "build/bdist.linux-i686/egg/suds/xsd/schema.py", line 90, in load File "build/bdist.linux-i686/egg/suds/xsd/schema.py", line 277, in open_imports File "build/bdist.linux-i686/egg/suds/xsd/sxbasic.py", line 554, in open File "build/bdist.linux-i686/egg/suds/xsd/sxbasic.py", line 572, in download File "build/bdist.linux-i686/egg/suds/sax/parser.py", line 134, in parse File "/usr/lib/python2.5/xml/sax/expatreader.py", line 107, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/lib/python2.5/xml/sax/xmlreader.py", line 123, in parse self.feed(buffer) File "/usr/lib/python2.5/xml/sax/expatreader.py", line 211, in feed self._err_handler.fatalError(exc) File "/usr/lib/python2.5/xml/sax/handler.py", line 38, in fatalError raise exception xml.sax._exceptions.SAXParseException: /tmp/suds/suds-649682136.http:10:2: mismatched tag ppps - i apologize for the lack of plain text. and for top posting. if you need me to resend in plain text i can do that. On Mon, Oct 5, 2009 at 11:42 PM, Lucy Mendel wrote: > Hi, > > I'm new to suds and soap in general, so please bear with my imprecise > terminology (and feel free to correct me). > > Namely, the following fails inexplicably with a Missing argument server > fault, yet I've supplied the exact argument requested, both as named > parameters, positional parameters, **dict. > > >>> from suds.client import Client > >>> url = 'https://api.verticalresponse.com/partner-wsdl/1.0/VRAPI.wsdl' > >>> client = Client(url) > >>> client.service.login(username="clay at bilumi.org", password="XXX", > session_duration_minutes=30) > <<< python 2.6 on os X.5 >>> > No handlers could be found for logger "suds.client" > Traceback (most recent call last): > File "", line 1, in > File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 535, in > __call__ > File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 595, in > invoke > File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 630, in send > File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 681, in > failed > File "build/bdist.macosx-10.3-fat/egg/suds/bindings/binding.py", line > 235, in get_fault > suds.WebFault: Server raised fault: 'The arguments supplied to the function > were not valid: Missing username' > > <<< python 2.5 on ubuntu 8.04 >>> > No handlers could be found for logger "suds.client" > Traceback (most recent call last): > File "", line 1, in > File "build/bdist.linux-i686/egg/suds/client.py", line 535, in __call__ > File "build/bdist.linux-i686/egg/suds/client.py", line 595, in invoke > File "build/bdist.linux-i686/egg/suds/client.py", line 630, in send > File "build/bdist.linux-i686/egg/suds/client.py", line 681, in failed > File "build/bdist.linux-i686/egg/suds/bindings/binding.py", line 235, in > get_fault > suds.WebFault: Server raised fault: 'The arguments supplied to the function > were not valid: Missing username' > > <<< ipython 2.6 on mac >>> > --------------------------------------------------------------------------- > WebFault Traceback (most recent call last) > > /Users/lucy/sandbox/CalmProcrasDonate/procrasdonate/applib/ console> in () > > /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc > in __call__(self, *args, **kwargs) > 533 return (500, e) > 534 else: > --> 535 return client.invoke(args, kwargs) > 536 > 537 def faults(self): > > /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc > in invoke(self, args, kwargs) > 593 self.method.name, timer) > 594 timer.start() > --> 595 result = self.send(msg) > 596 timer.stop() > 597 metrics.log.debug( > > /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc > in send(self, msg) > 628 else: > 629 log.error(self.last_sent()) > --> 630 result = self.failed(binding, e) > 631 return result > 632 > > /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc > in failed(self, binding, error) > 679 if status == 500: > 680 if len(reply) > 0: > --> 681 r, p = binding.get_fault(reply) > 682 self.last_received(r) > 683 return (status, p) > > /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/bindings/binding.pyc > in get_fault(self, reply) > 233 p = unmarshaller.process(fault) > 234 if self.options.faults: > --> 235 raise WebFault(p, faultroot) > 236 return (faultroot, p.detail) > 237 > > WebFault: Server raised fault: 'The arguments supplied to the function were > not valid: Missing username' > > just in case: > client.service.login(username="clay at bilumi.org", password="XXX", > session_duration_minutes=30) > client.service.login("clay at bilumi.org", "XXX", 30) > d = {'username':"clay at bilumi.org", 'password':"XXX", > 'session_duration_minutes':3} > client.service.login(**d) > > I tried to get suds to work with a different wsdl to determine whether the > problem is user error. I could not find a simple soap server to point at. > Maybe that is all I really need....suggestions? > > I'm using revision 577 of the suds repo. > > I am in communication with a VerticalResponse engineer; VerticalResponse is > the company whose API I'd like to communicate with. People there have barely > heard of python, though, so if I can be certain the problem is not on my end > (it likely is) that would be awesome. > > Thanks for your help. > I've heard excellent things about suds on stackoverflow, so keep up the > good work. > > Lucy. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jortel at redhat.com Tue Oct 6 15:07:28 2009 From: jortel at redhat.com (Jeff Ortel) Date: Tue, 06 Oct 2009 10:07:28 -0500 Subject: [Fedora-suds-list] suds.WebFault: Server raised fault: 'The arguments supplied to the function were not valid: Missing In-Reply-To: References: Message-ID: <4ACB5D30.6070705@redhat.com> Hey Lucy, This wsdl isn't written in a way that is unconventional for a rcp/encoded soap service and contrary to the documentation: https://api.verticalresponse.com/partner-wsdl/1.0/documentation.html#login. I'm not sure how the PHP example works because the argument to the login() method is of type ns0:loginArgs. The message for this operation is defined as: and If the arguments were really intended to be: login(username, password, session_duration_minutes, ...) I would expect the message for rpc/encoded to be: But, with that said, I will review the WSDL/SOAP specifications to see if there is anything I missed regarding this type of message. For now, though - the best way to see what suds believes the arguments to be for any given method, you should (print) the client as below and supply the arguments as it describes. I did the following and the server complained about invalid username or password which suggests the message is correct. Hope this helps, Jeff > client = Client(url, cache=None) > print client [see: attached] > credentials = client.factory.create('ns0:loginArgs') > print login > credentials.username='jeff' > credentials.password='xxx' > credentials.session_duration_minutes=30 > print client.service.login(credentials) [fault] 2009-10-06 09:45:20,517 [ERROR] send() @client.py:629 jeff xxx 30 Server raised fault: 'The username or password supplied was incorrect.' (Fault){ faultcode = "SOAP-ENV:VRAPI.InvalidLogin" faultstring = "The username or password supplied was incorrect." } On 10/05/2009 10:42 PM, Lucy Mendel wrote: > Hi, > > I'm new to suds and soap in general, so please bear with my imprecise > terminology (and feel free to correct me). > > Namely, the following fails inexplicably with a Missing argument server > fault, yet I've supplied the exact argument requested, both as named > parameters, positional parameters, **dict. > >> >> from suds.client import Client >> >> url = 'https://api.verticalresponse.com/partner-wsdl/1.0/VRAPI.wsdl' >> >> client = Client(url) >> >> client.service.login(username="clay at bilumi.org > ", password="XXX", session_duration_minutes=30) > <<< python 2.6 on os X.5 >>> > No handlers could be found for logger "suds.client" > Traceback (most recent call last): > ? File "", line 1, in > ? File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 535, in > __call__ > ? File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 595, in > invoke > ? File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 630, in send > ? File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 681, in > failed > ? File "build/bdist.macosx-10.3-fat/egg/suds/bindings/binding.py", line > 235, in get_fault > suds.WebFault: Server raised fault: 'The arguments supplied to the > function were not valid: Missing username' > > <<< python 2.5 on ubuntu 8.04 >>> > No handlers could be found for logger "suds.client" > Traceback (most recent call last): > ? File "", line 1, in > ? File "build/bdist.linux-i686/egg/suds/client.py", line 535, in __call__ > ? File "build/bdist.linux-i686/egg/suds/client.py", line 595, in invoke > ? File "build/bdist.linux-i686/egg/suds/client.py", line 630, in send > ? File "build/bdist.linux-i686/egg/suds/client.py", line 681, in failed > ? File "build/bdist.linux-i686/egg/suds/bindings/binding.py", line 235, > in get_fault > suds.WebFault: Server raised fault: 'The arguments supplied to the > function were not valid: Missing username' > > <<< ipython 2.6 on mac >>> > --------------------------------------------------------------------------- > WebFault? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? > Traceback (most recent call last) > > /Users/lucy/sandbox/CalmProcrasDonate/procrasdonate/applib/ console> in () > > /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc > in __call__(self, *args, **kwargs) > ? ? ? 533? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? return (500, e) > ? ? ? 534? ? ? ? ? ? ? ? else: > --> 535? ? ? ? ? ? ? ? ? ? ? ? return client.invoke(args, kwargs) > ? ? ? 536 > ? ? ? 537? ? ? ? def faults(self): > > /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc > in invoke(self, args, kwargs) > ? ? ? 593? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? self.method.name > , timer) > ? ? ? 594? ? ? ? ? ? ? ? timer.start() > --> 595? ? ? ? ? ? ? ? result = self.send(msg) > ? ? ? 596? ? ? ? ? ? ? ? timer.stop() > ? ? ? 597? ? ? ? ? ? ? ? metrics.log.debug( > > /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc > in send(self, msg) > ? ? ? 628? ? ? ? ? ? ? ? ? ? ? ? else: > ? ? ? 629? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? log.error(self.last_sent()) > --> 630? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? result = self.failed(binding, e) > ? ? ? 631? ? ? ? ? ? ? ? return result > ? ? ? 632 > > /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc > in failed(self, binding, error) > ? ? ? 679? ? ? ? ? ? ? ? if status == 500: > ? ? ? 680? ? ? ? ? ? ? ? ? ? ? ? if len(reply) > 0: > --> 681? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? r, p = binding.get_fault(reply) > ? ? ? 682? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? self.last_received(r) > ? ? ? 683? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? return (status, p) > > /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/bindings/binding.pyc > in get_fault(self, reply) > ? ? ? 233? ? ? ? ? ? ? ? p = unmarshaller.process(fault) > ? ? ? 234? ? ? ? ? ? ? ? if self.options.faults: > --> 235? ? ? ? ? ? ? ? ? ? ? ? raise WebFault(p, faultroot) > ? ? ? 236? ? ? ? ? ? ? ? return (faultroot, p.detail) > ? ? ? 237 > > WebFault: Server raised fault: 'The arguments supplied to the function > were not valid: Missing username' > > just in case: > client.service.login(username="clay at bilumi.org > ", password="XXX", session_duration_minutes=30) > client.service.login("clay at bilumi.org ", "XXX", 30) > d = {'username':"clay at bilumi.org ", > 'password':"XXX", 'session_duration_minutes':3} > client.service.login(**d) > > I tried to get suds to work with a different wsdl to determine whether > the problem is user error. I could not find a simple soap server to > point at. Maybe that is all I really need....suggestions? > > I'm using revision 577 of the suds repo. > > I am in communication with a VerticalResponse engineer; VerticalResponse > is the company whose API I'd like to communicate with. People there have > barely heard of python, though, so if I can be certain the problem is > not on my end (it likely is) that would be awesome. > > Thanks for your help. > I've heard excellent things about suds on stackoverflow, so keep up the > good work. > > Lucy. > > > ------------------------------------------------------------------------ > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: client.txt URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3360 bytes Desc: S/MIME Cryptographic Signature URL: From jortel at redhat.com Tue Oct 6 15:11:44 2009 From: jortel at redhat.com (Jeff Ortel) Date: Tue, 06 Oct 2009 10:11:44 -0500 Subject: [Fedora-suds-list] suds.WebFault: Server raised fault: 'The arguments supplied to the function were not valid: Missing In-Reply-To: <4ACB5D30.6070705@redhat.com> References: <4ACB5D30.6070705@redhat.com> Message-ID: <4ACB5E30.60700@redhat.com> On 10/06/2009 10:07 AM, Jeff Ortel wrote: > Hey Lucy, > > This wsdl isn't written in a way that is unconventional for a > rcp/encoded soap service and contrary to the documentation: > https://api.verticalresponse.com/partner-wsdl/1.0/documentation.html#login. > I'm not sure how the PHP example works because the argument to the > login() method is of type ns0:loginArgs. > > The message for this operation is defined as: > > > > > > and > > > > > > > > type="xsd:string"/> > > > > > If the arguments were really intended to be: > > login(username, password, session_duration_minutes, ...) > > I would expect the message for rpc/encoded to be: > > > > > > > > > > > But, with that said, I will review the WSDL/SOAP specifications to see > if there is anything I missed regarding this type of message. > > For now, though - the best way to see what suds believes the arguments > to be for any given method, you should (print) the client as below and > supply the arguments as it describes. I did the following and the server > complained about invalid username or password which suggests the message > is correct. > > Hope this helps, > > Jeff > > > > client = Client(url, cache=None) > > print client > > [see: attached] > > > credentials = client.factory.create('ns0:loginArgs') > > print login > > credentials.username='jeff' > > credentials.password='xxx' > > credentials.session_duration_minutes=30 > > print client.service.login(credentials) I renamed the 'credentials' variable for the email. This ^^ should be: > credentials = client.factory.create('ns0:loginArgs') > print credentials > credentials.username='jeff' > credentials.password='xxx' > credentials.session_duration_minutes=30 > print client.service.login(credentials) > > [fault] > > 2009-10-06 09:45:20,517 [ERROR] send() @client.py:629 > > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:ns0="http://api.verticalresponse.com/1.0/VRAPI.xsd" > xmlns:ns1="http://www.w3.org/2001/XMLSchema" xmlns:ns2="VR/API/1_0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:SOAP-ENV="http://schemas.xmlsoap.org > /soap/envelope/" > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> > > > > > jeff > xxx > xsi:type="ns1:integer">30 > > > > > > Server raised fault: 'The username or password supplied was incorrect.' > (Fault){ > faultcode = "SOAP-ENV:VRAPI.InvalidLogin" > faultstring = "The username or password supplied was incorrect." > } > > > On 10/05/2009 10:42 PM, Lucy Mendel wrote: >> Hi, >> >> I'm new to suds and soap in general, so please bear with my imprecise >> terminology (and feel free to correct me). >> >> Namely, the following fails inexplicably with a Missing argument server >> fault, yet I've supplied the exact argument requested, both as named >> parameters, positional parameters, **dict. >> >>> >> from suds.client import Client >>> >> url = 'https://api.verticalresponse.com/partner-wsdl/1.0/VRAPI.wsdl' >>> >> client = Client(url) >>> >> client.service.login(username="clay at bilumi.org >> ", password="XXX", session_duration_minutes=30) >> <<< python 2.6 on os X.5 >>> >> No handlers could be found for logger "suds.client" >> Traceback (most recent call last): >> ? File "", line 1, in >> ? File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 535, in >> __call__ >> ? File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 595, in >> invoke >> ? File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 630, in >> send >> ? File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 681, in >> failed >> ? File "build/bdist.macosx-10.3-fat/egg/suds/bindings/binding.py", line >> 235, in get_fault >> suds.WebFault: Server raised fault: 'The arguments supplied to the >> function were not valid: Missing username' >> >> <<< python 2.5 on ubuntu 8.04 >>> >> No handlers could be found for logger "suds.client" >> Traceback (most recent call last): >> ? File "", line 1, in >> ? File "build/bdist.linux-i686/egg/suds/client.py", line 535, in __call__ >> ? File "build/bdist.linux-i686/egg/suds/client.py", line 595, in invoke >> ? File "build/bdist.linux-i686/egg/suds/client.py", line 630, in send >> ? File "build/bdist.linux-i686/egg/suds/client.py", line 681, in failed >> ? File "build/bdist.linux-i686/egg/suds/bindings/binding.py", line 235, >> in get_fault >> suds.WebFault: Server raised fault: 'The arguments supplied to the >> function were not valid: Missing username' >> >> <<< ipython 2.6 on mac >>> >> --------------------------------------------------------------------------- >> >> WebFault? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? >> Traceback (most recent call last) >> >> /Users/lucy/sandbox/CalmProcrasDonate/procrasdonate/applib/> console> in () >> >> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc >> >> in __call__(self, *args, **kwargs) >> ? ? ? 533? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? return (500, e) >> ? ? ? 534? ? ? ? ? ? ? ? else: >> --> 535? ? ? ? ? ? ? ? ? ? ? ? return client.invoke(args, kwargs) >> ? ? ? 536 >> ? ? ? 537? ? ? ? def faults(self): >> >> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc >> >> in invoke(self, args, kwargs) >> ? ? ? 593? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? self.method.name >> , timer) >> ? ? ? 594? ? ? ? ? ? ? ? timer.start() >> --> 595? ? ? ? ? ? ? ? result = self.send(msg) >> ? ? ? 596? ? ? ? ? ? ? ? timer.stop() >> ? ? ? 597? ? ? ? ? ? ? ? metrics.log.debug( >> >> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc >> >> in send(self, msg) >> ? ? ? 628? ? ? ? ? ? ? ? ? ? ? ? else: >> ? ? ? 629? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? log.error(self.last_sent()) >> --> 630? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? result = self.failed(binding, e) >> ? ? ? 631? ? ? ? ? ? ? ? return result >> ? ? ? 632 >> >> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc >> >> in failed(self, binding, error) >> ? ? ? 679? ? ? ? ? ? ? ? if status == 500: >> ? ? ? 680? ? ? ? ? ? ? ? ? ? ? ? if len(reply) > 0: >> --> 681? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? r, p = binding.get_fault(reply) >> ? ? ? 682? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? self.last_received(r) >> ? ? ? 683? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? return (status, p) >> >> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/bindings/binding.pyc >> >> in get_fault(self, reply) >> ? ? ? 233? ? ? ? ? ? ? ? p = unmarshaller.process(fault) >> ? ? ? 234? ? ? ? ? ? ? ? if self.options.faults: >> --> 235? ? ? ? ? ? ? ? ? ? ? ? raise WebFault(p, faultroot) >> ? ? ? 236? ? ? ? ? ? ? ? return (faultroot, p.detail) >> ? ? ? 237 >> >> WebFault: Server raised fault: 'The arguments supplied to the function >> were not valid: Missing username' >> >> just in case: >> client.service.login(username="clay at bilumi.org >> ", password="XXX", session_duration_minutes=30) >> client.service.login("clay at bilumi.org ", >> "XXX", 30) >> d = {'username':"clay at bilumi.org ", >> 'password':"XXX", 'session_duration_minutes':3} >> client.service.login(**d) >> >> I tried to get suds to work with a different wsdl to determine whether >> the problem is user error. I could not find a simple soap server to >> point at. Maybe that is all I really need....suggestions? >> >> I'm using revision 577 of the suds repo. >> >> I am in communication with a VerticalResponse engineer; VerticalResponse >> is the company whose API I'd like to communicate with. People there have >> barely heard of python, though, so if I can be certain the problem is >> not on my end (it likely is) that would be awesome. >> >> Thanks for your help. >> I've heard excellent things about suds on stackoverflow, so keep up the >> good work. >> >> Lucy. >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> 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: 3360 bytes Desc: S/MIME Cryptographic Signature URL: From lucy at bilumi.org Tue Oct 6 15:20:22 2009 From: lucy at bilumi.org (Lucy Mendel) Date: Tue, 6 Oct 2009 11:20:22 -0400 Subject: [Fedora-suds-list] suds.WebFault: Server raised fault: 'The arguments supplied to the function were not valid: Missing In-Reply-To: <4ACB5E30.60700@redhat.com> References: <4ACB5D30.6070705@redhat.com> <4ACB5E30.60700@redhat.com> Message-ID: jeff, neat! i'd seen the factory stuff for object args, it was just too new a concept for my brain to believe. strangely i'm getting incorrect username or password, too, but i'm confident i can move forward with using suds. thanks so much for your timely and helpful response! lucy. On Tue, Oct 6, 2009 at 11:11 AM, Jeff Ortel wrote: > > > On 10/06/2009 10:07 AM, Jeff Ortel wrote: > >> Hey Lucy, >> >> This wsdl isn't written in a way that is unconventional for a >> rcp/encoded soap service and contrary to the documentation: >> https://api.verticalresponse.com/partner-wsdl/1.0/documentation.html#login >> . >> I'm not sure how the PHP example works because the argument to the >> login() method is of type ns0:loginArgs. >> >> The message for this operation is defined as: >> >> >> >> >> >> and >> >> >> >> >> >> >> >> > type="xsd:string"/> >> >> >> >> >> If the arguments were really intended to be: >> >> login(username, password, session_duration_minutes, ...) >> >> I would expect the message for rpc/encoded to be: >> >> >> >> >> >> >> >> >> >> >> But, with that said, I will review the WSDL/SOAP specifications to see >> if there is anything I missed regarding this type of message. >> >> For now, though - the best way to see what suds believes the arguments >> to be for any given method, you should (print) the client as below and >> supply the arguments as it describes. I did the following and the server >> complained about invalid username or password which suggests the message >> is correct. >> >> Hope this helps, >> >> Jeff >> >> >> > client = Client(url, cache=None) >> > print client >> >> [see: attached] >> >> > credentials = client.factory.create('ns0:loginArgs') >> > print login >> > credentials.username='jeff' >> > credentials.password='xxx' >> > credentials.session_duration_minutes=30 >> > print client.service.login(credentials) >> > > I renamed the 'credentials' variable for the email. This ^^ should be: > > > > credentials = client.factory.create('ns0:loginArgs') > > print credentials > > > credentials.username='jeff' > > credentials.password='xxx' > > credentials.session_duration_minutes=30 > > print client.service.login(credentials) > > >> [fault] >> >> 2009-10-06 09:45:20,517 [ERROR] send() @client.py:629 >> >> > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" >> xmlns:ns0="http://api.verticalresponse.com/1.0/VRAPI.xsd" >> xmlns:ns1="http://www.w3.org/2001/XMLSchema" xmlns:ns2="VR/API/1_0" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xmlns:SOAP-ENV="http://schemas.xmlsoap.org >> /soap/envelope/" >> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> >> >> >> >> >> jeff >> xxx >> > xsi:type="ns1:integer">30 >> >> >> >> >> >> Server raised fault: 'The username or password supplied was incorrect.' >> (Fault){ >> faultcode = "SOAP-ENV:VRAPI.InvalidLogin" >> faultstring = "The username or password supplied was incorrect." >> } >> >> >> On 10/05/2009 10:42 PM, Lucy Mendel wrote: >> >>> Hi, >>> >>> I'm new to suds and soap in general, so please bear with my imprecise >>> terminology (and feel free to correct me). >>> >>> Namely, the following fails inexplicably with a Missing argument server >>> fault, yet I've supplied the exact argument requested, both as named >>> parameters, positional parameters, **dict. >>> >>> >> from suds.client import Client >>>> >> url = 'https://api.verticalresponse.com/partner-wsdl/1.0/VRAPI.wsdl' >>>> >> client = Client(url) >>>> >> client.service.login(username="clay at bilumi.org >>>> >>> ", password="XXX", session_duration_minutes=30) >>> <<< python 2.6 on os X.5 >>> >>> No handlers could be found for logger "suds.client" >>> Traceback (most recent call last): >>> ? File "", line 1, in >>> ? File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 535, in >>> __call__ >>> ? File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 595, in >>> invoke >>> ? File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 630, in >>> send >>> ? File "build/bdist.macosx-10.3-fat/egg/suds/client.py", line 681, in >>> failed >>> ? File "build/bdist.macosx-10.3-fat/egg/suds/bindings/binding.py", line >>> 235, in get_fault >>> suds.WebFault: Server raised fault: 'The arguments supplied to the >>> function were not valid: Missing username' >>> >>> <<< python 2.5 on ubuntu 8.04 >>> >>> No handlers could be found for logger "suds.client" >>> Traceback (most recent call last): >>> ? File "", line 1, in >>> ? File "build/bdist.linux-i686/egg/suds/client.py", line 535, in __call__ >>> ? File "build/bdist.linux-i686/egg/suds/client.py", line 595, in invoke >>> ? File "build/bdist.linux-i686/egg/suds/client.py", line 630, in send >>> ? File "build/bdist.linux-i686/egg/suds/client.py", line 681, in failed >>> ? File "build/bdist.linux-i686/egg/suds/bindings/binding.py", line 235, >>> in get_fault >>> suds.WebFault: Server raised fault: 'The arguments supplied to the >>> function were not valid: Missing username' >>> >>> <<< ipython 2.6 on mac >>> >>> >>> --------------------------------------------------------------------------- >>> >>> WebFault? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? >>> Traceback (most recent call last) >>> >>> /Users/lucy/sandbox/CalmProcrasDonate/procrasdonate/applib/>> console> in () >>> >>> >>> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc >>> >>> in __call__(self, *args, **kwargs) >>> ? ? ? 533? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? return (500, e) >>> ? ? ? 534? ? ? ? ? ? ? ? else: >>> --> 535? ? ? ? ? ? ? ? ? ? ? ? return client.invoke(args, kwargs) >>> ? ? ? 536 >>> ? ? ? 537? ? ? ? def faults(self): >>> >>> >>> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc >>> >>> in invoke(self, args, kwargs) >>> ? ? ? 593? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? self.method.name >>> , timer) >>> ? ? ? 594? ? ? ? ? ? ? ? timer.start() >>> --> 595? ? ? ? ? ? ? ? result = self.send(msg) >>> ? ? ? 596? ? ? ? ? ? ? ? timer.stop() >>> ? ? ? 597? ? ? ? ? ? ? ? metrics.log.debug( >>> >>> >>> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc >>> >>> in send(self, msg) >>> ? ? ? 628? ? ? ? ? ? ? ? ? ? ? ? else: >>> ? ? ? 629? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? log.error(self.last_sent()) >>> --> 630? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? result = self.failed(binding, e) >>> ? ? ? 631? ? ? ? ? ? ? ? return result >>> ? ? ? 632 >>> >>> >>> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/client.pyc >>> >>> in failed(self, binding, error) >>> ? ? ? 679? ? ? ? ? ? ? ? if status == 500: >>> ? ? ? 680? ? ? ? ? ? ? ? ? ? ? ? if len(reply) > 0: >>> --> 681? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? r, p = binding.get_fault(reply) >>> ? ? ? 682? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? self.last_received(r) >>> ? ? ? 683? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? return (status, p) >>> >>> >>> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/suds-0.3.7-py2.6.egg/suds/bindings/binding.pyc >>> >>> in get_fault(self, reply) >>> ? ? ? 233? ? ? ? ? ? ? ? p = unmarshaller.process(fault) >>> ? ? ? 234? ? ? ? ? ? ? ? if self.options.faults: >>> --> 235? ? ? ? ? ? ? ? ? ? ? ? raise WebFault(p, faultroot) >>> ? ? ? 236? ? ? ? ? ? ? ? return (faultroot, p.detail) >>> ? ? ? 237 >>> >>> WebFault: Server raised fault: 'The arguments supplied to the function >>> were not valid: Missing username' >>> >>> just in case: >>> client.service.login(username="clay at bilumi.org >>> ", password="XXX", session_duration_minutes=30) >>> client.service.login("clay at bilumi.org ", >>> "XXX", 30) >>> d = {'username':"clay at bilumi.org ", >>> 'password':"XXX", 'session_duration_minutes':3} >>> client.service.login(**d) >>> >>> I tried to get suds to work with a different wsdl to determine whether >>> the problem is user error. I could not find a simple soap server to >>> point at. Maybe that is all I really need....suggestions? >>> >>> I'm using revision 577 of the suds repo. >>> >>> I am in communication with a VerticalResponse engineer; VerticalResponse >>> is the company whose API I'd like to communicate with. People there have >>> barely heard of python, though, so if I can be certain the problem is >>> not on my end (it likely is) that would be awesome. >>> >>> Thanks for your help. >>> I've heard excellent things about suds on stackoverflow, so keep up the >>> good work. >>> >>> Lucy. >>> >>> >>> ------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> 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 sammyflarn at gmail.com Wed Oct 7 17:57:14 2009 From: sammyflarn at gmail.com (Sammy Flarn) Date: Wed, 7 Oct 2009 12:57:14 -0500 Subject: [Fedora-suds-list] Mismatched Tag Error Message-ID: <3adeffdd0910071057y1269a8a2p1490296de06bfa34@mail.gmail.com> Hi - I am trying to connect to an IP and get the following error. I am using SUDS 0.3.6. >>> client = Client(url) Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python2.4/site-packages/suds/client.py", line 106, in __init__ self.wsdl = Definitions(url, options) File "/usr/local/lib/python2.4/site-packages/suds/wsdl.py", line 171, in __init__ root = p.parse(url=url).root() File "/usr/local/lib/python2.4/site-packages/suds/sax/parser.py", line 134, in parse sax.parse(fp) File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 107, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/local/lib/python2.4/xml/sax/xmlreader.py", line 123, in parse self.feed(buffer) File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 211, in feed self._err_handler.fatalError(exc) File "/usr/local/lib/python2.4/xml/sax/handler.py", line 38, in fatalError raise exception xml.sax._exceptions.SAXParseException: /tmp/suds/suds-823874735.http:59:18: mismatched tag Ticket #256 --> https://fedorahosted.org/suds/ticket/256 suggested deleting the tmp directories, but this did not help me. Can anyone give me a suggestion on how to troubleshoot this problem? SammyF -------------- next part -------------- An HTML attachment was scrubbed... URL: From diN0bot at bilumi.org Wed Oct 7 18:13:50 2009 From: diN0bot at bilumi.org (dinosaur robot) Date: Wed, 7 Oct 2009 14:13:50 -0400 Subject: [Fedora-suds-list] Mismatched Tag Error In-Reply-To: <3adeffdd0910071057y1269a8a2p1490296de06bfa34@mail.gmail.com> References: <3adeffdd0910071057y1269a8a2p1490296de06bfa34@mail.gmail.com> Message-ID: I think you need to clear your cache. The end of the error message specifies the file as /tmp/suds/suds-823874735.http you can also instantiate a client without a cache via client = Client(url, cache=None) On Wed, Oct 7, 2009 at 1:57 PM, Sammy Flarn wrote: > Hi - > > I am trying to connect to an IP and get the following error.? I am using > SUDS 0.3.6. > >>>> client = Client(url) > Traceback (most recent call last): > ? File "", line 1, in ? > ? File "/usr/local/lib/python2.4/site-packages/suds/client.py", line 106, in > __init__ > ??? self.wsdl = Definitions(url, options) > ? File "/usr/local/lib/python2.4/site-packages/suds/wsdl.py", line 171, in > __init__ > ??? root = p.parse(url=url).root() > ? File "/usr/local/lib/python2.4/site-packages/suds/sax/parser.py", line > 134, in parse > ??? sax.parse(fp) > ? File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 107, in parse > ??? xmlreader.IncrementalParser.parse(self, source) > ? File "/usr/local/lib/python2.4/xml/sax/xmlreader.py", line 123, in parse > ??? self.feed(buffer) > ? File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 211, in feed > ??? self._err_handler.fatalError(exc) > ? File "/usr/local/lib/python2.4/xml/sax/handler.py", line 38, in fatalError > ??? raise exception > xml.sax._exceptions.SAXParseException: /tmp/suds/suds-823874735.http:59:18: > mismatched tag > > Ticket #256 --> https://fedorahosted.org/suds/ticket/256 suggested deleting > the tmp directories, but this did not help me. > > Can anyone give me a suggestion on how to troubleshoot this problem? > > SammyF > > > > > _______________________________________________ > fedora-suds-list mailing list > fedora-suds-list at redhat.com > https://www.redhat.com/mailman/listinfo/fedora-suds-list > From diN0bot at bilumi.org Wed Oct 7 18:15:47 2009 From: diN0bot at bilumi.org (dinosaur robot) Date: Wed, 7 Oct 2009 14:15:47 -0400 Subject: [Fedora-suds-list] Mismatched Tag Error In-Reply-To: References: <3adeffdd0910071057y1269a8a2p1490296de06bfa34@mail.gmail.com> Message-ID: sorry, sent too soon. I meant to add that the deleting of tmp directories only worked for me sometimes, too. It usually took repeated attempts at Client instantiation and tmp deletion. Paired with cache=None the problem went away. On Wed, Oct 7, 2009 at 2:13 PM, dinosaur robot wrote: > I think you need to clear your cache. The end of the error message > specifies the file as > ? ?/tmp/suds/suds-823874735.http > > you can also instantiate a client without a cache via > ? ?client = Client(url, cache=None) > > On Wed, Oct 7, 2009 at 1:57 PM, Sammy Flarn wrote: >> Hi - >> >> I am trying to connect to an IP and get the following error.? I am using >> SUDS 0.3.6. >> >>>>> client = Client(url) >> Traceback (most recent call last): >> ? File "", line 1, in ? >> ? File "/usr/local/lib/python2.4/site-packages/suds/client.py", line 106, in >> __init__ >> ??? self.wsdl = Definitions(url, options) >> ? File "/usr/local/lib/python2.4/site-packages/suds/wsdl.py", line 171, in >> __init__ >> ??? root = p.parse(url=url).root() >> ? File "/usr/local/lib/python2.4/site-packages/suds/sax/parser.py", line >> 134, in parse >> ??? sax.parse(fp) >> ? File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 107, in parse >> ??? xmlreader.IncrementalParser.parse(self, source) >> ? File "/usr/local/lib/python2.4/xml/sax/xmlreader.py", line 123, in parse >> ??? self.feed(buffer) >> ? File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 211, in feed >> ??? self._err_handler.fatalError(exc) >> ? File "/usr/local/lib/python2.4/xml/sax/handler.py", line 38, in fatalError >> ??? raise exception >> xml.sax._exceptions.SAXParseException: /tmp/suds/suds-823874735.http:59:18: >> mismatched tag >> >> Ticket #256 --> https://fedorahosted.org/suds/ticket/256 suggested deleting >> the tmp directories, but this did not help me. >> >> Can anyone give me a suggestion on how to troubleshoot this problem? >> >> SammyF >> >> >> >> >> _______________________________________________ >> fedora-suds-list mailing list >> fedora-suds-list at redhat.com >> https://www.redhat.com/mailman/listinfo/fedora-suds-list >> > From jortel at redhat.com Wed Oct 7 18:21:37 2009 From: jortel at redhat.com (Jeff Ortel) Date: Wed, 07 Oct 2009 13:21:37 -0500 Subject: [Fedora-suds-list] Mismatched Tag Error In-Reply-To: <3adeffdd0910071057y1269a8a2p1490296de06bfa34@mail.gmail.com> References: <3adeffdd0910071057y1269a8a2p1490296de06bfa34@mail.gmail.com> Message-ID: <4ACCDC31.3040409@redhat.com> On 10/07/2009 12:57 PM, Sammy Flarn wrote: > Hi - > > I am trying to connect to an IP and get the following error. I am using > SUDS 0.3.6. > > >>> client = Client(url) > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/local/lib/python2.4/site-packages/suds/client.py", line > 106, in __init__ > self.wsdl = Definitions(url, options) > File "/usr/local/lib/python2.4/site-packages/suds/wsdl.py", line 171, > in __init__ > root = p.parse(url=url).root() > File "/usr/local/lib/python2.4/site-packages/suds/sax/parser.py", > line 134, in parse > sax.parse(fp) > File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 107, in > parse > xmlreader.IncrementalParser.parse(self, source) > File "/usr/local/lib/python2.4/xml/sax/xmlreader.py", line 123, in parse > self.feed(buffer) > File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 211, in feed > self._err_handler.fatalError(exc) > File "/usr/local/lib/python2.4/xml/sax/handler.py", line 38, in > fatalError > raise exception > xml.sax._exceptions.SAXParseException: > /tmp/suds/suds-823874735.http:59:18: mismatched tag > > Ticket #256 --> https://fedorahosted.org/suds/ticket/256 suggested > deleting the tmp directories, but this did not help me. Usually, (rm -f /tmp/suds/*) does the trick. The cache files can be corrupted when: - A collision between 2+ suds clients running on the same machine - The suds client is interrupted while writing the cache file. Do you have more then (1) suds client running on this machine at the *same* time? > > Can anyone give me a suggestion on how to troubleshoot this problem? > > SammyF > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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: 3360 bytes Desc: S/MIME Cryptographic Signature URL: From sammyflarn at gmail.com Wed Oct 7 18:21:39 2009 From: sammyflarn at gmail.com (Sammy Flarn) Date: Wed, 7 Oct 2009 13:21:39 -0500 Subject: [Fedora-suds-list] Mismatched Tag Error In-Reply-To: References: <3adeffdd0910071057y1269a8a2p1490296de06bfa34@mail.gmail.com> Message-ID: <3adeffdd0910071121g1aad0b29j9d1ab6a92207957d@mail.gmail.com> Thanks for the suggestions. I tried deleting the cache in between client instantiations and still received the 'mismatched tag' error. I also tried creating the client without a cache, but received a simliar 'mistmatched tag' error; instead of listing a file in the error, it lists unknown: xml.sax._exceptions.SAXParseException: :59:18: mismatched tag On Wed, Oct 7, 2009 at 1:15 PM, dinosaur robot wrote: > sorry, sent too soon. I meant to add that the deleting of tmp > directories only worked for me sometimes, too. It usually took > repeated attempts at Client instantiation and tmp deletion. Paired > with cache=None the problem went away. > > On Wed, Oct 7, 2009 at 2:13 PM, dinosaur robot wrote: > > I think you need to clear your cache. The end of the error message > > specifies the file as > > /tmp/suds/suds-823874735.http > > > > you can also instantiate a client without a cache via > > client = Client(url, cache=None) > > > > On Wed, Oct 7, 2009 at 1:57 PM, Sammy Flarn > wrote: > >> Hi - > >> > >> I am trying to connect to an IP and get the following error. I am using > >> SUDS 0.3.6. > >> > >>>>> client = Client(url) > >> Traceback (most recent call last): > >> File "", line 1, in ? > >> File "/usr/local/lib/python2.4/site-packages/suds/client.py", line > 106, in > >> __init__ > >> self.wsdl = Definitions(url, options) > >> File "/usr/local/lib/python2.4/site-packages/suds/wsdl.py", line 171, > in > >> __init__ > >> root = p.parse(url=url).root() > >> File "/usr/local/lib/python2.4/site-packages/suds/sax/parser.py", line > >> 134, in parse > >> sax.parse(fp) > >> File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 107, in > parse > >> xmlreader.IncrementalParser.parse(self, source) > >> File "/usr/local/lib/python2.4/xml/sax/xmlreader.py", line 123, in > parse > >> self.feed(buffer) > >> File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 211, in > feed > >> self._err_handler.fatalError(exc) > >> File "/usr/local/lib/python2.4/xml/sax/handler.py", line 38, in > fatalError > >> raise exception > >> xml.sax._exceptions.SAXParseException: > /tmp/suds/suds-823874735.http:59:18: > >> mismatched tag > >> > >> Ticket #256 --> https://fedorahosted.org/suds/ticket/256 suggested > deleting > >> the tmp directories, but this did not help me. > >> > >> Can anyone give me a suggestion on how to troubleshoot this problem? > >> > >> SammyF > >> > >> > >> > >> > >> _______________________________________________ > >> 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 sammyflarn at gmail.com Wed Oct 7 18:27:03 2009 From: sammyflarn at gmail.com (Sammy Flarn) Date: Wed, 7 Oct 2009 13:27:03 -0500 Subject: [Fedora-suds-list] Mismatched Tag Error In-Reply-To: <3adeffdd0910071121g1aad0b29j9d1ab6a92207957d@mail.gmail.com> References: <3adeffdd0910071057y1269a8a2p1490296de06bfa34@mail.gmail.com> <3adeffdd0910071121g1aad0b29j9d1ab6a92207957d@mail.gmail.com> Message-ID: <3adeffdd0910071127x55665c4fye91c1300cbd0874a@mail.gmail.com> Jeff - I only have 1 suds client running on this system. On Wed, Oct 7, 2009 at 1:21 PM, Sammy Flarn wrote: > Thanks for the suggestions. I tried deleting the cache in between client > instantiations and still received the 'mismatched tag' error. I also tried > creating the client without a cache, but received a simliar 'mistmatched > tag' error; instead of listing a file in the error, it lists unknown: > xml.sax._exceptions.SAXParseException: :59:18: mismatched tag > > > > > > On Wed, Oct 7, 2009 at 1:15 PM, dinosaur robot wrote: > >> sorry, sent too soon. I meant to add that the deleting of tmp >> directories only worked for me sometimes, too. It usually took >> repeated attempts at Client instantiation and tmp deletion. Paired >> with cache=None the problem went away. >> >> On Wed, Oct 7, 2009 at 2:13 PM, dinosaur robot >> wrote: >> > I think you need to clear your cache. The end of the error message >> > specifies the file as >> > /tmp/suds/suds-823874735.http >> > >> > you can also instantiate a client without a cache via >> > client = Client(url, cache=None) >> > >> > On Wed, Oct 7, 2009 at 1:57 PM, Sammy Flarn >> wrote: >> >> Hi - >> >> >> >> I am trying to connect to an IP and get the following error. I am >> using >> >> SUDS 0.3.6. >> >> >> >>>>> client = Client(url) >> >> Traceback (most recent call last): >> >> File "", line 1, in ? >> >> File "/usr/local/lib/python2.4/site-packages/suds/client.py", line >> 106, in >> >> __init__ >> >> self.wsdl = Definitions(url, options) >> >> File "/usr/local/lib/python2.4/site-packages/suds/wsdl.py", line 171, >> in >> >> __init__ >> >> root = p.parse(url=url).root() >> >> File "/usr/local/lib/python2.4/site-packages/suds/sax/parser.py", >> line >> >> 134, in parse >> >> sax.parse(fp) >> >> File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 107, in >> parse >> >> xmlreader.IncrementalParser.parse(self, source) >> >> File "/usr/local/lib/python2.4/xml/sax/xmlreader.py", line 123, in >> parse >> >> self.feed(buffer) >> >> File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 211, in >> feed >> >> self._err_handler.fatalError(exc) >> >> File "/usr/local/lib/python2.4/xml/sax/handler.py", line 38, in >> fatalError >> >> raise exception >> >> xml.sax._exceptions.SAXParseException: >> /tmp/suds/suds-823874735.http:59:18: >> >> mismatched tag >> >> >> >> Ticket #256 --> https://fedorahosted.org/suds/ticket/256 suggested >> deleting >> >> the tmp directories, but this did not help me. >> >> >> >> Can anyone give me a suggestion on how to troubleshoot this problem? >> >> >> >> SammyF >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> >> fedora-suds-list mailing list >> >> fedora-suds-list at redhat.com >> >> https://www.redhat.com/mailman/listinfo/fedora-suds-list >> >> >> > >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jortel at redhat.com Wed Oct 7 18:32:11 2009 From: jortel at redhat.com (Jeff Ortel) Date: Wed, 07 Oct 2009 13:32:11 -0500 Subject: [Fedora-suds-list] Mismatched Tag Error In-Reply-To: <3adeffdd0910071127x55665c4fye91c1300cbd0874a@mail.gmail.com> References: <3adeffdd0910071057y1269a8a2p1490296de06bfa34@mail.gmail.com> <3adeffdd0910071121g1aad0b29j9d1ab6a92207957d@mail.gmail.com> <3adeffdd0910071127x55665c4fye91c1300cbd0874a@mail.gmail.com> Message-ID: <4ACCDEAB.6040101@redhat.com> Maybe the WSDL URL is wrong or the WSDL isn't valid XML. When you browse the WSDL URL using your web browser, do you get a valid document? On 10/07/2009 01:27 PM, Sammy Flarn wrote: > Jeff - I only have 1 suds client running on this system. > > On Wed, Oct 7, 2009 at 1:21 PM, Sammy Flarn > wrote: > > Thanks for the suggestions. I tried deleting the cache in between > client instantiations and still received the 'mismatched tag' > error. I also tried creating the client without a cache, but > received a simliar 'mistmatched tag' error; instead of listing a > file in the error, it lists unknown: > xml.sax._exceptions.SAXParseException: :59:18: mismatched tag > > > > > > On Wed, Oct 7, 2009 at 1:15 PM, dinosaur robot > wrote: > > sorry, sent too soon. I meant to add that the deleting of tmp > directories only worked for me sometimes, too. It usually took > repeated attempts at Client instantiation and tmp deletion. Paired > with cache=None the problem went away. > > On Wed, Oct 7, 2009 at 2:13 PM, dinosaur robot > > wrote: > > I think you need to clear your cache. The end of the error > message > > specifies the file as > > /tmp/suds/suds-823874735.http > > > > you can also instantiate a client without a cache via > > client = Client(url, cache=None) > > > > On Wed, Oct 7, 2009 at 1:57 PM, Sammy Flarn > > wrote: > >> Hi - > >> > >> I am trying to connect to an IP and get the following > error. I am using > >> SUDS 0.3.6. > >> > >>>>> client = Client(url) > >> Traceback (most recent call last): > >> File "", line 1, in ? > >> File > "/usr/local/lib/python2.4/site-packages/suds/client.py", line > 106, in > >> __init__ > >> self.wsdl = Definitions(url, options) > >> File > "/usr/local/lib/python2.4/site-packages/suds/wsdl.py", line 171, in > >> __init__ > >> root = p.parse(url=url).root() > >> File > "/usr/local/lib/python2.4/site-packages/suds/sax/parser.py", line > >> 134, in parse > >> sax.parse(fp) > >> File "/usr/local/lib/python2.4/xml/sax/expatreader.py", > line 107, in parse > >> xmlreader.IncrementalParser.parse(self, source) > >> File "/usr/local/lib/python2.4/xml/sax/xmlreader.py", line > 123, in parse > >> self.feed(buffer) > >> File "/usr/local/lib/python2.4/xml/sax/expatreader.py", > line 211, in feed > >> self._err_handler.fatalError(exc) > >> File "/usr/local/lib/python2.4/xml/sax/handler.py", line > 38, in fatalError > >> raise exception > >> xml.sax._exceptions.SAXParseException: > /tmp/suds/suds-823874735.http:59:18: > >> mismatched tag > >> > >> Ticket #256 --> https://fedorahosted.org/suds/ticket/256 > suggested deleting > >> the tmp directories, but this did not help me. > >> > >> Can anyone give me a suggestion on how to troubleshoot this > problem? > >> > >> SammyF > >> > >> > >> > >> > >> _______________________________________________ > >> 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: 3360 bytes Desc: S/MIME Cryptographic Signature URL: From sammyflarn at gmail.com Wed Oct 7 18:44:20 2009 From: sammyflarn at gmail.com (Sammy Flarn) Date: Wed, 7 Oct 2009 13:44:20 -0500 Subject: [Fedora-suds-list] Mismatched Tag Error In-Reply-To: <4ACCDEAB.6040101@redhat.com> References: <3adeffdd0910071057y1269a8a2p1490296de06bfa34@mail.gmail.com> <3adeffdd0910071121g1aad0b29j9d1ab6a92207957d@mail.gmail.com> <3adeffdd0910071127x55665c4fye91c1300cbd0874a@mail.gmail.com> <4ACCDEAB.6040101@redhat.com> Message-ID: <3adeffdd0910071144h4c7596ao49d0468626e89b04@mail.gmail.com> I'm not sure what happened. I rebooted my system. I deleted all cache files. Now when I instantiate the client with cache=None I am successful. Thank you for all the assistance. On Wed, Oct 7, 2009 at 1:32 PM, Jeff Ortel wrote: > Maybe the WSDL URL is wrong or the WSDL isn't valid XML. > > When you browse the WSDL URL using your web browser, do you get a valid > document? > > On 10/07/2009 01:27 PM, Sammy Flarn wrote: > >> Jeff - I only have 1 suds client running on this system. >> >> On Wed, Oct 7, 2009 at 1:21 PM, Sammy Flarn > > wrote: >> >> Thanks for the suggestions. I tried deleting the cache in between >> client instantiations and still received the 'mismatched tag' >> error. I also tried creating the client without a cache, but >> received a simliar 'mistmatched tag' error; instead of listing a >> file in the error, it lists unknown: >> xml.sax._exceptions.SAXParseException: :59:18: mismatched tag >> >> >> >> >> >> On Wed, Oct 7, 2009 at 1:15 PM, dinosaur robot > > wrote: >> >> sorry, sent too soon. I meant to add that the deleting of tmp >> directories only worked for me sometimes, too. It usually took >> repeated attempts at Client instantiation and tmp deletion. Paired >> with cache=None the problem went away. >> >> On Wed, Oct 7, 2009 at 2:13 PM, dinosaur robot >> > wrote: >> > I think you need to clear your cache. The end of the error >> message >> > specifies the file as >> > /tmp/suds/suds-823874735.http >> > >> > you can also instantiate a client without a cache via >> > client = Client(url, cache=None) >> > >> > On Wed, Oct 7, 2009 at 1:57 PM, Sammy Flarn >> > wrote: >> >> Hi - >> >> >> >> I am trying to connect to an IP and get the following >> error. I am using >> >> SUDS 0.3.6. >> >> >> >>>>> client = Client(url) >> >> Traceback (most recent call last): >> >> File "", line 1, in ? >> >> File >> "/usr/local/lib/python2.4/site-packages/suds/client.py", line >> 106, in >> >> __init__ >> >> self.wsdl = Definitions(url, options) >> >> File >> "/usr/local/lib/python2.4/site-packages/suds/wsdl.py", line 171, in >> >> __init__ >> >> root = p.parse(url=url).root() >> >> File >> "/usr/local/lib/python2.4/site-packages/suds/sax/parser.py", line >> >> 134, in parse >> >> sax.parse(fp) >> >> File "/usr/local/lib/python2.4/xml/sax/expatreader.py", >> line 107, in parse >> >> xmlreader.IncrementalParser.parse(self, source) >> >> File "/usr/local/lib/python2.4/xml/sax/xmlreader.py", line >> 123, in parse >> >> self.feed(buffer) >> >> File "/usr/local/lib/python2.4/xml/sax/expatreader.py", >> line 211, in feed >> >> self._err_handler.fatalError(exc) >> >> File "/usr/local/lib/python2.4/xml/sax/handler.py", line >> 38, in fatalError >> >> raise exception >> >> xml.sax._exceptions.SAXParseException: >> /tmp/suds/suds-823874735.http:59:18: >> >> mismatched tag >> >> >> >> Ticket #256 --> https://fedorahosted.org/suds/ticket/256 >> suggested deleting >> >> the tmp directories, but this did not help me. >> >> >> >> Can anyone give me a suggestion on how to troubleshoot this >> problem? >> >> >> >> SammyF >> >> >> >> >> >> >> >> >> >> _______________________________________________ >> >> fedora-suds-list mailing list >> >> fedora-suds-list at redhat.com > 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 straycat000 at yahoo.com Thu Oct 8 01:20:07 2009 From: straycat000 at yahoo.com (Matthew) Date: Wed, 7 Oct 2009 18:20:07 -0700 (PDT) Subject: [Fedora-suds-list] (no subject) Message-ID: <925835.95893.qm@web30203.mail.mud.yahoo.com> http://mind-rocket.co.uk/8li5VvgtnP.html From fchevitarese at gmail.com Thu Oct 8 17:43:04 2009 From: fchevitarese at gmail.com (Fred Chevitarese) Date: Thu, 8 Oct 2009 14:43:04 -0300 Subject: [Fedora-suds-list] Suds + SSL = Handshake failure Message-ID: <4440dfd00910081043p3f9938b2n978270590ac328fe@mail.gmail.com> Hello all ... I'm getting a little problem with Suds and a webservice with ssl ... When i use the url without the https i'm going ok... With https i'm getting an error... handshake failure... I suppose that i got this error because a not valid certificate, but i has to accept this certificate if his valid or not... Thanks in advance!!! http://chevitarese.wordpress.com Fred Chevitarese - GNU/Linux -------------- next part -------------- An HTML attachment was scrubbed... URL: From jortel at redhat.com Mon Oct 12 14:37:24 2009 From: jortel at redhat.com (Jeff Ortel) Date: Mon, 12 Oct 2009 09:37:24 -0500 Subject: [Fedora-suds-list] Re: suds.options.Options.update(...) infinite recursion In-Reply-To: <20091011220359.GA23365@xrgtn-q40> References: <20091011220359.GA23365@xrgtn-q40> Message-ID: <4AD33F24.4030405@redhat.com> Alexander, Thanks for the report. I rewrote the Options class in 0.3.7. There were a number of problems with the 0.3.6 (and earlier) version. The intention of the update() method was to provide a seamless integration between Options contained with the Transport and the main Options instance within the Client. For cases where users create a Transport, set transport related options, then pass the Transport to the Client in the constructor. Then a user changes a Transport option using Client.set_options() and it has no effect because the Transport has it's own Options object. So, the update() method was designed to find the Options attribute in the Transport and set it to itself. I know, kind of hacky :/ The main thing that is broken here is that the Options object contains a Transport _and_ the Transport contains a Options. So, in 0.3.7, I refactored the Options class. The main suds.options.Options class contains general Suds client options and the suds.transport.Options class contains Transport related options. To support setting Transport related options via Client.set_options() (and visa versa actually), the refactored Options classes provides a mechanism to associate many options instances together creating one virtual Options domain. When accessing an option, though any of the Options instances, the request is forwarded to the "owner" of that option. This way, a user can do something like this and it will work as expected: > > transport = HttpTransport(timeout=10) > client = Client(url, transport=transport) > # > # got the wsdl, now I need to set a proxy for invoking methods > # > proxy = dict(http='http://abc.com')) > client.set_options(proxy=proxy) > OR > > transport = HttpTransport(timeout=10) > client = Client(url, transport=transport) > # > # got the wsdl, now I need to set a proxy for invoking methods > # > proxy = dict(http='http://abc.com')) > transport.options.proxy=proxy > Also, most users run into the infinite recursion problem when trying to copy the client to be used for concurrent requests. 0.3.7 provides a Client.clone() method that, in conjuction with some tweaks in the Transport, provides a lightweight copy of the Cleint. It is lightweight because the clients share the WSDL/XSD objects but have their own transports and options. I'm getting the release notes together now for 0.3.7 to be released soon. Hope this helps. Regards, Jeff On 10/11/2009 05:03 PM, Alexander Gattin wrote: > Hello, > > Options class has a controversial update(x) > method, which finds all Options objects > from x's children and tries to perform > a merge (AFAIU) using Options.__setattr__(...). > The latter method in turn calls update(...), > which can cause recursion. > > def update(self, x): > for attr, options in self.optattrs(x): > if options == self: > continue > for k in options.__defined__: > v = options.get(k) > setattr(self, k, v) > setattr(x, attr, self) > > def __setattr__(self, name, value): > builtin = name.startswith('__') and name.endswith('__') > if not builtin: > self.__constraint__.validate(name, value) > value = self.default(name, value) > self.__defined__.add(name) > self.update(value) > self.__dict__[name] = value > > I'm sending a POC code and exception trace. > The code creates 2 Client objects referring > to the same Transport instance (t). > > 1st Client object (foowscl) gets created OK, but > the second Client (barwscl) triggers infinite > recursion by calling barwscloptions.set(**kwargs), > and then barwscl.options.__setattr__('transport', t) > > The barwscl.options.__setattr__('transport', t) > calls barwscl.options.update(t), which finds > t.options object of class Options. The interesting > thing here is that the t.options refers to the > foowscl.options instance, foowscl.options != > barwscl.options, and the foowscl.options already > contains "defined" ('transport' => t) item... > > So the barwscl.options.update(t) calls > setattr(barwscl.options, 'transport', t) => > barwscl.options.__setattr__('transport', t) > Loop. > > P.S. > > I don't understand why the merge is necessary > in the first place. Why not just let the > parent/child objects to have their own sets > of options? > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3360 bytes Desc: S/MIME Cryptographic Signature URL: From monty at starfief.com Mon Oct 12 17:50:33 2009 From: monty at starfief.com (Rod Montgomery) Date: Mon, 12 Oct 2009 13:50:33 -0400 Subject: [Fedora-suds-list] Ticket #239: handling recursive imports in WSDL files Message-ID: <4AD36C69.4020901@starfief.com> My impression was that I should post my contributions towards the solution of a ticket as a change to the ticket, rather than posting to the mailing list, so that's what I did. I remember seeing something, somewhere, in the Suds Trac pages, that said to do it that way, but I can no longer find it. But my posting to Ticket #239 on 10/11/09 01:45:43 does not, as of 10/12/09 13:48, appear on the Suds project Timeline page. Is there Something Else I'm supposed to do, or do instead, to bring my contribution to the attention of others who might be able to suggest what to do next, to fully resolve the ticket? From roland.hedberg at adm.umu.se Mon Oct 12 19:36:32 2009 From: roland.hedberg at adm.umu.se (Roland Hedberg) Date: Mon, 12 Oct 2009 21:36:32 +0200 Subject: [Fedora-suds-list] Can this be done Message-ID: Hi! I'm new to suds, so obviously I don't know a lot about how it works :-) Anyway, I've seen a lot of examples with WSDL described SOAP services, which is all good and well but unfortunately it doesn't help me. I'm writing a SAML2 implementation in Python and I need to be able to do SOAP calls that looks like this: ... . That is the SOAP body is a XML document that I construct using modules I have. Can suds help me with this ? I've looked through the documentation but can't see how it could be done, but then I'm new to suds and am well aware that I don't understand suds yet. --Roland From jortel at redhat.com Mon Oct 12 19:48:02 2009 From: jortel at redhat.com (Jeff Ortel) Date: Mon, 12 Oct 2009 14:48:02 -0500 Subject: [Fedora-suds-list] Can this be done In-Reply-To: References: Message-ID: <4AD387F2.8020906@redhat.com> Hey Doland, Welcome to suds :) So SAML2 is SOAP but not Web Services as defined by WSDL? Regards, Jeff On 10/12/2009 02:36 PM, Roland Hedberg wrote: > Hi! > > I'm new to suds, so obviously I don't know a lot about how it works :-) > Anyway, I've seen a lot of examples with WSDL described SOAP services, > which is all good and well but unfortunately it doesn't help me. > > I'm writing a SAML2 implementation in Python and I need to be able to do > SOAP calls that looks like this: > > xmlns:SOAP-ENV=?http://schemas.xmlsoap.org/soap/envelope/?> > > xmlns:saml=?...? xmlns:ds=?...? ID=?_6c3a4f8b9c2d? Version=?2.0? > IssueInstant=?2004-03-27T08:41:00Z? > ... > > . > > > > > That is the SOAP body is a XML document that I construct using modules I > have. > > Can suds help me with this ? > > I've looked through the documentation but can't see how it could be > done, but then I'm new to suds and am well aware that I don't understand > suds yet. > > --Roland > > > _______________________________________________ > 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: 3360 bytes Desc: S/MIME Cryptographic Signature URL: From roland.hedberg at adm.umu.se Mon Oct 12 20:06:19 2009 From: roland.hedberg at adm.umu.se (Roland Hedberg) Date: Mon, 12 Oct 2009 22:06:19 +0200 Subject: [Fedora-suds-list] Can this be done In-Reply-To: <4AD387F2.8020906@redhat.com> References: <4AD387F2.8020906@redhat.com> Message-ID: <43C1C561-1699-4C73-8C19-4CBC64ED9E31@adm.umu.se> On Oct 12, 2009, at 21:48, Jeff Ortel wrote: > Welcome to suds :) Thanks! > So SAML2 is SOAP but not Web Services as defined by WSDL? Right! --Roland From monty at starfief.com Wed Oct 14 15:12:06 2009 From: monty at starfief.com (Rod Montgomery) Date: Wed, 14 Oct 2009 11:12:06 -0400 Subject: [Fedora-suds-list] wsdl.py class Definitions method open_imports - why base = self.url ? Message-ID: <4AD5EA46.9060903@starfief.com> Trying to understand the code, to work on Ticket #239: handling recursive imports in WSDL files In file wsdl.py in class Definitions there is this method: def open_imports(self): """ Import the I{imported} WSDLs. """ for imp in self.imports: base = self.url imp.load(self) What use is the second line from the bottom? The variable base is a local variable of the method, is it not? For that matter, I don't find any references to any variable named base anywhere in wsdl.py, other than on that line. I see no reason not to delete this line. If there is such a reason, what am I missing? From monty at starfief.com Thu Oct 15 12:46:57 2009 From: monty at starfief.com (Rod Montgomery) Date: Thu, 15 Oct 2009 08:46:57 -0400 Subject: [Fedora-suds-list] Ticket #239: handling recursive imports in WSDL files Message-ID: <4AD719C1.5070409@starfief.com> I still have not fully figured out the namespace problem, but I get the impression it might have something to do with the order in which the children of the root Definitions node get resolved. In the example WSDL files from the original ticket, one file contains everything except the Binding element and the other contains only the Binding element. The code parses the first file, appending each element it encounters both to the list of elements of that particular type (imports, types, messages, porttypes, bindings and services) and to an overall list of all children. The code then sorts the list of all children into proper order for resolution. Next, the code loads the second file as an import. In loading the second file, the code parses it, builds the lists of elements -- for the second file separately -- sorts the children into proper order for resolution and the tries to resolve the children -- there's only one, the Binding element -- *within the context of the second file only*. If that had succeeded, the code would then append the resolved elements from the second file back into the corresponding type-specific element lists for the first file. I *think* the reason this fails, for the example files, is that the Port definitions needed to resolve the Binding element are in the first file, so they aren't available when the code tries to resolve the Binding definition within the context of the second file only. I also *think* it would not be enough, just to (somehow) make the load method of the Import class refer to the definitions in the importing file, as well as those in the imported file, because I think the process of resolving (for example) a Binding needs the *resolved* Port elements, and when the code loads the Imports the elements in the first file are not yet resolved. I think what the code has to do is make One Big List of all the elements, from all the files, sort that list into proper order for resolution, then resolve everything all together. Am I missing something? From frantzcj at gmail.com Thu Oct 15 16:32:09 2009 From: frantzcj at gmail.com (Chris Frantz) Date: Thu, 15 Oct 2009 11:32:09 -0500 Subject: [Fedora-suds-list] Question about the soap envelope namespace In-Reply-To: <4d395ead0908250944j7b7cf8d0se158661a2a1e8089@mail.gmail.com> References: <4d395ead0908250944j7b7cf8d0se158661a2a1e8089@mail.gmail.com> Message-ID: I got bitten by this again. My program wants to talk to several different SOAP services and a couple of them are very picky about the SOAP-ENV. Worse, they don't use the same SOAP-ENV. This patch allows suds to pick up the SOAP-ENV from the WSDL, iff it is defined as a namespace prefix in the root of the document. I'm no XML and/or WSDL expert, so this fix may or may not work for you. It happens to work for me. This patch is based on suds-0.3.7. --Chris --- C:/src/suds/suds/bindings/binding.py (revision 5) +++ C:/src/suds/suds/bindings/binding.py (revision 337) @@ -67,6 +67,10 @@ self.options = Options() self.parser = Parser() self.multiref = MultiRef() + self.envns = envns + ns = wsdl.root.nsprefixes.get('SOAP-ENV') + if ns: + self.envns = ('SOAP-ENV', ns) def unmarshaller(self, typed=True): """ @@ -289,7 +293,7 @@ @return: The soap envelope containing the body and header. @rtype: L{Element} """ - env = Element('Envelope', ns=envns) + env = Element('Envelope', ns=self.envns) env.addPrefix(Namespace.xsins[0], Namespace.xsins[1]) env.append(header) env.append(body) @@ -303,7 +307,7 @@ @return: the soap body fragment. @rtype: L{Element} """ - header = Element('Header', ns=envns) + header = Element('Header', ns=self.envns) header.append(content) return header @@ -382,7 +386,7 @@ @return: the soap body fragment. @rtype: L{Element} """ - body = Element('Body', ns=envns) + body = Element('Body', ns=self.envns) body.append(content) return body @@ -503,4 +507,4 @@ return self else: return self.__resolved - \ No newline at end of file + On Tue, Aug 25, 2009 at 11:44 AM, Michael Sommerville wrote: > On Mon, Aug 24, 2009 at 11:55 PM, Chris Frantz wrote: >> Hello, >> >> It appears that the soap envelope namespace is hardcoded to >> 'http://schemas.xmlsoap.org/soap/envelope/' in binding.py.? I'm trying to >> talk to a gSOAP based web service that insists the envelope namespace be >> 'http://www.w3.org/2003/05/soap-envelope'. >> >> Unfortunately, I don't have permission to share the WSDL file. >> >> Any suggestions? > > We have the same issue with our gSOAP service. ?I'm sure there are > other cleaner ways of achieving the same result, but what about simply > replacing the envns object before you make any calls to the web > service? ?For example: > > suds.bindings.binding.envns = ('SOAP-ENV', > 'http://www.w3.org/2003/05/soap-envelope') > > -Mike > From jortel at redhat.com Thu Oct 15 17:58:33 2009 From: jortel at redhat.com (Jeff Ortel) Date: Thu, 15 Oct 2009 12:58:33 -0500 Subject: [Fedora-suds-list] Suds 0.3.7 release candidate Message-ID: <4AD762C9.6040505@redhat.com> All, I believe that r578 is a good release candidate. It fixes many tickets and contains many non-ticket related fixes and enhancements. This release is long overdue mostly because of my personal time constraints. But, as I hope you will agree, it provides a lot of improvements (or at least I think so). See: https://fedorahosted.org/suds/wiki/WikiStart#Development for 0.3.7 details. A warning to those of you with forked projects, private hacks and fixes. Some of the internals have been refactored and in some cases completely rewritten. I try to do this as little as possible, but I also need to make improvements as needed. The Client API, as always, maintains backwards compatibility. For those of you still waiting for fixes or enhancements. Sorry. I'll be reviewing tickets immediately after releasing. I'll also be looking through the mailing list of unresolved issues/questions. But, as always, the best way to ensure your issue gets resolved is to open a ticket. That said, there are a lot of old /case specific/ tickets that have not been resolved (or gotten any love in a while). Many of these I believe to be fixed by later releases but I simply haven't had the time to retest them. If you have an old ticket, PLEASE retest against 0.3.7 and either add a comment or close the ticket. As you can imagine, it's hard for me to keep track of all the issues. So, if you feel that I've forgotten you or your ticket, post an email, add a comment to your ticket or ping me on IRC to remind me. I don't mind :) Regards, Jeff -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5260 bytes Desc: S/MIME Cryptographic Signature URL: From msommerville at gmail.com Fri Oct 16 16:06:26 2009 From: msommerville at gmail.com (Michael Sommerville) Date: Fri, 16 Oct 2009 17:06:26 +0100 Subject: [Fedora-suds-list] Question about the soap envelope namespace In-Reply-To: References: <4d395ead0908250944j7b7cf8d0se158661a2a1e8089@mail.gmail.com> Message-ID: <4d395ead0910160906t1371a19exbb267bb90f9873f1@mail.gmail.com> On Thu, Oct 15, 2009 at 5:32 PM, Chris Frantz wrote: > I got bitten by this again. ?My program wants to talk to several > different SOAP services and a couple of them are very picky about the > SOAP-ENV. ?Worse, they don't use the same SOAP-ENV. > > This patch allows suds to pick up the SOAP-ENV from the WSDL, iff it > is defined as a namespace prefix in the root of the document. > > I'm no XML and/or WSDL expert, so this fix may or may not work for > you. ?It happens to work for me. ?This patch is based on suds-0.3.7. >>> It appears that the soap envelope namespace is hardcoded to >>> 'http://schemas.xmlsoap.org/soap/envelope/' in binding.py.? I'm trying to >>> talk to a gSOAP based web service that insists the envelope namespace be >>> 'http://www.w3.org/2003/05/soap-envelope'. >>> >> We have the same issue with our gSOAP service. ?I'm sure there are >> other cleaner ways of achieving the same result, but what about simply >> replacing the envns object before you make any calls to the web >> service? ?For example: That looks far cleaner than my monkey-patching doesn't it? That works fine for me too. Thanks! -Mike From jortel at redhat.com Fri Oct 16 16:55:59 2009 From: jortel at redhat.com (Jeff Ortel) Date: Fri, 16 Oct 2009 11:55:59 -0500 Subject: [Fedora-suds-list] Question about the soap envelope namespace In-Reply-To: <4d395ead0910160906t1371a19exbb267bb90f9873f1@mail.gmail.com> References: <4d395ead0908250944j7b7cf8d0se158661a2a1e8089@mail.gmail.com> <4d395ead0910160906t1371a19exbb267bb90f9873f1@mail.gmail.com> Message-ID: <4AD8A59F.7000007@redhat.com> On 10/16/2009 11:06 AM, Michael Sommerville wrote: > On Thu, Oct 15, 2009 at 5:32 PM, Chris Frantz wrote: >> I got bitten by this again. My program wants to talk to several >> different SOAP services and a couple of them are very picky about the >> SOAP-ENV. Worse, they don't use the same SOAP-ENV. >> >> This patch allows suds to pick up the SOAP-ENV from the WSDL, iff it >> is defined as a namespace prefix in the root of the document. >> >> I'm no XML and/or WSDL expert, so this fix may or may not work for >> you. It happens to work for me. This patch is based on suds-0.3.7. >>>> It appears that the soap envelope namespace is hardcoded to >>>> 'http://schemas.xmlsoap.org/soap/envelope/' in binding.py. I'm trying to >>>> talk to a gSOAP based web service that insists the envelope namespace be >>>> 'http://www.w3.org/2003/05/soap-envelope'. >>>> >>> We have the same issue with our gSOAP service. I'm sure there are >>> other cleaner ways of achieving the same result, but what about simply >>> replacing the envns object before you make any calls to the web >>> service? For example: > > That looks far cleaner than my monkey-patching doesn't it? That > works fine for me too. I agree that the current hard coded URI for the soap envelope namespace needs to be addressed. It seems to be a difference between soap 1.1 and soap 1.2. soap 1.1 defines: http://schemas.xmlsoap.org/soap/envelope/ soap 1.2 defines: http://www.w3.org/2003/05/soap-envelope Chris: I like your approach (and patch) of determining the soap envelope namespace from the wsdl. But your patch relies on the soap envelope namespace being mapped to a prefix in the WSDL and that it is mapped to the prefix "SOAP-ENV". Neither are reliable. But, as I said, I like the approach and I'm looking through the specs to find a way to determine the soap version by examining the wsdl. Once determined, I can set the proper namespaces in the wsdl.Definitions objects to be used when generating the messages. > > 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: 5260 bytes Desc: S/MIME Cryptographic Signature URL: From monty at starfief.com Sat Oct 17 12:45:21 2009 From: monty at starfief.com (Rod Montgomery) Date: Sat, 17 Oct 2009 08:45:21 -0400 Subject: [Fedora-suds-list] Ticket #239: handling recursive imports in WSDL files Message-ID: <4AD9BC61.8050003@starfief.com> Very confused here. I think I have it working for the service I actually want to use, but not for the two other services for which links had been previously posted to the ticket. Details posted to the ticket at https://fedorahosted.org/suds/ticket/239#comment:5 From drew.h.bryant at gmail.com Sat Oct 17 19:33:59 2009 From: drew.h.bryant at gmail.com (Drew Bryant) Date: Sat, 17 Oct 2009 14:33:59 -0500 Subject: [Fedora-suds-list] Stale suds cache causing wsdl parser errors Message-ID: Hello, The protein data bank webservice that I commonly use updated their wsdl recently, and when attempting to construct a suds.client.Client(url) object for the service I was continually getting the following error: ERROR: An unexpected error occurred while tokenizing input The following traceback may be corrupted or invalid The error message is: ('EOF in multi-line statement', (129, 0)) followed by a large traceback that ultimately failed in the xml.sax.expatreader module as shown below: SAXParseException: /var/folders/aS/aScvrYapHoCwNJHk1sw9LE+++TI/-Tmp-/suds/suds-649682136.http:10:2: mismatched tag I was getting a similar error with several other web services that had recently modified their wsdls so I removed all of the files in the suds tmp folder: /var/folders/aS/aScvrYapHoCwNJHk1sw9LE+++TI/-Tmp-/suds (this is the path selected by suds on my mac running OS X 10.5.8) After removing these tmp files, everything worked fine and I was able to construct the suds.client.Client instances without issues. This is the version of suds that I'm using (via macports): ==================================== py25-suds @0.3.6 (python, devel, net) Description: Suds is a lightweight SOAP python client for consuming Web Services. Homepage: https://fedorahosted.org/suds/ Build Dependencies: py25-setuptools Library Dependencies: python25 Platforms: darwin License: unknown Maintainers: mmoll at macports.org, openmaintainer at macports.org ==================================== one of the SOAP services I was accessing: http://www.rcsb.org/pdb/services/pdbws?wsdl Basically, I resolved my problem already, but I was wondering why suds was using stale information in its tmp directory instead of building the Clients from scratch. Is this an error with suds not removing stale cache files? I can easily clear this directory every time I want to construct a new Client to guarantee that I won't run into this issue again, but is this a good idea? Thanks, Drew From mcauthorn at gmail.com Sun Oct 18 13:16:29 2009 From: mcauthorn at gmail.com (Matt C) Date: Sun, 18 Oct 2009 09:16:29 -0400 Subject: [Fedora-suds-list] Stale suds cache causing wsdl parser errors In-Reply-To: References: Message-ID: <42ea979e0910180616q62569c21geaead4e5865933c7@mail.gmail.com> I run into this as well. Passing "cache = None" into the Client() constructor should help you work around the issue. -Matt On Sat, Oct 17, 2009 at 3:33 PM, Drew Bryant wrote: > Hello, > > The protein data bank webservice that I commonly use updated their > wsdl recently, and when attempting to construct a > suds.client.Client(url) object for the service I was continually > getting the following error: > ERROR: An unexpected error occurred while tokenizing input > The following traceback may be corrupted or invalid > The error message is: ('EOF in multi-line statement', (129, 0)) > > followed by a large traceback that ultimately failed in the > xml.sax.expatreader module as shown below: > SAXParseException: > /var/folders/aS/aScvrYapHoCwNJHk1sw9LE+++TI/-Tmp-/suds/suds-649682136.http:10:2: > mismatched tag > > I was getting a similar error with several other web services that had > recently modified their wsdls so I removed all of the files in the > suds tmp folder: > /var/folders/aS/aScvrYapHoCwNJHk1sw9LE+++TI/-Tmp-/suds > (this is the path selected by suds on my mac running OS X 10.5.8) > > After removing these tmp files, everything worked fine and I was able > to construct the suds.client.Client instances without issues. > > This is the version of suds that I'm using (via macports): > ==================================== > py25-suds @0.3.6 (python, devel, net) > > Description: ? ? ? ? ?Suds is a lightweight SOAP python client for > consuming Web Services. > Homepage: ? ? ? ? ? ? https://fedorahosted.org/suds/ > > Build Dependencies: ? py25-setuptools > Library Dependencies: python25 > Platforms: ? ? ? ? ? ?darwin > License: ? ? ? ? ? ? ?unknown > Maintainers: ? ? ? ? ?mmoll at macports.org, openmaintainer at macports.org > ==================================== > > one of the SOAP services I was accessing: > http://www.rcsb.org/pdb/services/pdbws?wsdl > > Basically, I resolved my problem already, but I was wondering why suds > was using stale information in its tmp directory instead of building > the Clients from scratch. ?Is this an error with suds not removing > stale cache files? ?I can easily clear this directory every time I > want to construct a new Client to guarantee that I won't run into this > issue again, but is this a good idea? > > Thanks, > Drew > > _______________________________________________ > 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 Mon Oct 19 15:23:41 2009 From: jortel at redhat.com (Jeff Ortel) Date: Mon, 19 Oct 2009 10:23:41 -0500 Subject: [Fedora-suds-list] Stale suds cache causing wsdl parser errors In-Reply-To: <42ea979e0910180616q62569c21geaead4e5865933c7@mail.gmail.com> References: <42ea979e0910180616q62569c21geaead4e5865933c7@mail.gmail.com> Message-ID: <4ADC847D.6030802@redhat.com> On 10/18/2009 08:16 AM, Matt C wrote: > I run into this as well. Passing "cache = None" into the Client() > constructor should help you work around the issue. > -Matt > > On Sat, Oct 17, 2009 at 3:33 PM, Drew Bryant wrote: >> Hello, >> >> The protein data bank webservice that I commonly use updated their >> wsdl recently, and when attempting to construct a >> suds.client.Client(url) object for the service I was continually >> getting the following error: >> ERROR: An unexpected error occurred while tokenizing input >> The following traceback may be corrupted or invalid >> The error message is: ('EOF in multi-line statement', (129, 0)) >> >> followed by a large traceback that ultimately failed in the >> xml.sax.expatreader module as shown below: >> SAXParseException: >> /var/folders/aS/aScvrYapHoCwNJHk1sw9LE+++TI/-Tmp-/suds/suds-649682136.http:10:2: >> mismatched tag >> >> I was getting a similar error with several other web services that had >> recently modified their wsdls so I removed all of the files in the >> suds tmp folder: >> /var/folders/aS/aScvrYapHoCwNJHk1sw9LE+++TI/-Tmp-/suds >> (this is the path selected by suds on my mac running OS X 10.5.8) >> >> After removing these tmp files, everything worked fine and I was able >> to construct the suds.client.Client instances without issues. >> >> This is the version of suds that I'm using (via macports): >> ==================================== >> py25-suds @0.3.6 (python, devel, net) >> >> Description: Suds is a lightweight SOAP python client for >> consuming Web Services. >> Homepage: https://fedorahosted.org/suds/ >> >> Build Dependencies: py25-setuptools >> Library Dependencies: python25 >> Platforms: darwin >> License: unknown >> Maintainers: mmoll at macports.org, openmaintainer at macports.org >> ==================================== >> >> one of the SOAP services I was accessing: >> http://www.rcsb.org/pdb/services/pdbws?wsdl >> >> Basically, I resolved my problem already, but I was wondering why suds >> was using stale information in its tmp directory instead of building >> the Clients from scratch. By default, suds caches WSDLs and XSDs locally for 1 day. The cache is used for better performance and quicker Client construction. Also, WSDLs and XSD files tend to be very static so gettting them from the server everytime usually provides little value. But, in cases where you want suds to get these files from the server every time, you can specify that suds not do any caching (as Matt mentioned) by setting the /cache/ option in the Client constructor. The real question is: how does the cache get corrupted in the first place? This happens when either: suds is interrupted while writing the cache file; two clients on the same machine are writing to the cache at the same time. Are either of you running more then one copy of the Client on your machine? If not, any idea how the client can be get interrupted while loading the WSDL? In any case, I will make the caching more robust. Is this an error with suds not removing >> stale cache files? I can easily clear this directory every time I >> want to construct a new Client to guarantee that I won't run into this >> issue again, but is this a good idea? >> >> Thanks, >> Drew >> >> _______________________________________________ >> 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: 5260 bytes Desc: S/MIME Cryptographic Signature URL: From drew.h.bryant at gmail.com Mon Oct 19 16:25:05 2009 From: drew.h.bryant at gmail.com (Drew Bryant) Date: Mon, 19 Oct 2009 11:25:05 -0500 Subject: [Fedora-suds-list] Stale suds cache causing wsdl parser errors In-Reply-To: <4ADC847D.6030802@redhat.com> References: <42ea979e0910180616q62569c21geaead4e5865933c7@mail.gmail.com> <4ADC847D.6030802@redhat.com> Message-ID: As to how the cache became corrupted, I believe that I killed a running process that was in the middle of parsing a WSDL at some point. I didn't make the connection between doing this and subsequent parsing problems because the service's WSDL had changed recently; I figured it was a malformed WSDL. Thanks guys and nice work on suds. Drew On Mon, Oct 19, 2009 at 10:23 AM, Jeff Ortel wrote: > > > On 10/18/2009 08:16 AM, Matt C wrote: >> >> I run into this as well. Passing "cache = None" into the Client() >> constructor should help you work around the issue. >> -Matt >> >> On Sat, Oct 17, 2009 at 3:33 PM, Drew Bryant >> ?wrote: >>> >>> Hello, >>> >>> The protein data bank webservice that I commonly use updated their >>> wsdl recently, and when attempting to construct a >>> suds.client.Client(url) object for the service I was continually >>> getting the following error: >>> ERROR: An unexpected error occurred while tokenizing input >>> The following traceback may be corrupted or invalid >>> The error message is: ('EOF in multi-line statement', (129, 0)) >>> >>> followed by a large traceback that ultimately failed in the >>> xml.sax.expatreader module as shown below: >>> SAXParseException: >>> >>> /var/folders/aS/aScvrYapHoCwNJHk1sw9LE+++TI/-Tmp-/suds/suds-649682136.http:10:2: >>> mismatched tag >>> >>> I was getting a similar error with several other web services that had >>> recently modified their wsdls so I removed all of the files in the >>> suds tmp folder: >>> /var/folders/aS/aScvrYapHoCwNJHk1sw9LE+++TI/-Tmp-/suds >>> (this is the path selected by suds on my mac running OS X 10.5.8) >>> >>> After removing these tmp files, everything worked fine and I was able >>> to construct the suds.client.Client instances without issues. >>> >>> This is the version of suds that I'm using (via macports): >>> ==================================== >>> py25-suds @0.3.6 (python, devel, net) >>> >>> Description: ? ? ? ? ?Suds is a lightweight SOAP python client for >>> consuming Web Services. >>> Homepage: ? ? ? ? ? ? https://fedorahosted.org/suds/ >>> >>> Build Dependencies: ? py25-setuptools >>> Library Dependencies: python25 >>> Platforms: ? ? ? ? ? ?darwin >>> License: ? ? ? ? ? ? ?unknown >>> Maintainers: ? ? ? ? ?mmoll at macports.org, openmaintainer at macports.org >>> ==================================== >>> >>> one of the SOAP services I was accessing: >>> http://www.rcsb.org/pdb/services/pdbws?wsdl >>> >>> Basically, I resolved my problem already, but I was wondering why suds >>> was using stale information in its tmp directory instead of building >>> the Clients from scratch. > > By default, suds caches WSDLs and XSDs locally for 1 day. ?The cache is used > for better performance and quicker Client construction. ?Also, WSDLs and XSD > files tend to be very static so gettting them from the server everytime > usually provides little value. ?But, in cases where you want suds to get > these files from the server every time, you can specify that suds not do any > caching (as Matt mentioned) by setting the /cache/ option in the Client > constructor. > > The real question is: how does the cache get corrupted in the first place? > ?This happens when either: suds is interrupted while writing the cache file; > two clients on the same machine are writing to the cache at the same time. > ?Are either of you running more then one copy of the Client on your machine? > ?If not, any idea how the client can be get interrupted while loading the > WSDL? > > In any case, I will make the caching more robust. > > Is this an error with suds not removing >>> >>> stale cache files? ?I can easily clear this directory every time I >>> want to construct a new Client to guarantee that I won't run into this >>> issue again, but is this a good idea? >>> >>> Thanks, >>> Drew >>> >>> _______________________________________________ >>> 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 roland.hedberg at adm.umu.se Tue Oct 20 18:43:48 2009 From: roland.hedberg at adm.umu.se (Roland Hedberg) Date: Tue, 20 Oct 2009 20:43:48 +0200 Subject: [Fedora-suds-list] Restricting the representation of a complex argument Message-ID: <8F8E2D91-3198-44FB-89E0-A82112F826C6@adm.umu.se> Hi! Just let me start by saying that I really like suds ! Now, with that out of the way :-) I'm trying to access a web service, where the arguments to the methods are really complex. The arguments are class instances with parameters that takes classes as values and these classes has parameters that has classes as values and so on.. Only a small subset of the parameters must have values. When I create an instance of a base class, it seems like all the parameters that I don't assign a values gets a blank as a value. This means that the soap message that is sent contains the whole structure with parts that looks like this: Is there any way of getting suds to make the SOAP messages as lean as possible, that is leave out all the parameters that I don't assign a value ? --Roland From mcauthorn at gmail.com Wed Oct 21 13:27:50 2009 From: mcauthorn at gmail.com (Matt C) Date: Wed, 21 Oct 2009 09:27:50 -0400 Subject: [Fedora-suds-list] Stale suds cache causing wsdl parser errors In-Reply-To: References: <42ea979e0910180616q62569c21geaead4e5865933c7@mail.gmail.com> <4ADC847D.6030802@redhat.com> Message-ID: <42ea979e0910210627o3ffcb13eu218b7513611bbea@mail.gmail.com> In my case, I do much of my work using the iPython shell so I suppose it's possible that it is corrupting the cache somehow when I shut down. For my project I've got so many wsdls that I need to store them on local disk, so caching isn't mandatory for me. -Matt On Mon, Oct 19, 2009 at 12:25 PM, Drew Bryant wrote: > As to how the cache became corrupted, I believe that I killed a > running process that was in the middle of parsing a WSDL at some > point. ?I didn't make the connection between doing this and subsequent > parsing problems because the service's WSDL had changed recently; I > figured it was a malformed WSDL. > > Thanks guys and nice work on suds. > > Drew > > On Mon, Oct 19, 2009 at 10:23 AM, Jeff Ortel wrote: >> >> >> On 10/18/2009 08:16 AM, Matt C wrote: >>> >>> I run into this as well. Passing "cache = None" into the Client() >>> constructor should help you work around the issue. >>> -Matt >>> >>> On Sat, Oct 17, 2009 at 3:33 PM, Drew Bryant >>> ?wrote: >>>> >>>> Hello, >>>> >>>> The protein data bank webservice that I commonly use updated their >>>> wsdl recently, and when attempting to construct a >>>> suds.client.Client(url) object for the service I was continually >>>> getting the following error: >>>> ERROR: An unexpected error occurred while tokenizing input >>>> The following traceback may be corrupted or invalid >>>> The error message is: ('EOF in multi-line statement', (129, 0)) >>>> >>>> followed by a large traceback that ultimately failed in the >>>> xml.sax.expatreader module as shown below: >>>> SAXParseException: >>>> >>>> /var/folders/aS/aScvrYapHoCwNJHk1sw9LE+++TI/-Tmp-/suds/suds-649682136.http:10:2: >>>> mismatched tag >>>> >>>> I was getting a similar error with several other web services that had >>>> recently modified their wsdls so I removed all of the files in the >>>> suds tmp folder: >>>> /var/folders/aS/aScvrYapHoCwNJHk1sw9LE+++TI/-Tmp-/suds >>>> (this is the path selected by suds on my mac running OS X 10.5.8) >>>> >>>> After removing these tmp files, everything worked fine and I was able >>>> to construct the suds.client.Client instances without issues. >>>> >>>> This is the version of suds that I'm using (via macports): >>>> ==================================== >>>> py25-suds @0.3.6 (python, devel, net) >>>> >>>> Description: ? ? ? ? ?Suds is a lightweight SOAP python client for >>>> consuming Web Services. >>>> Homepage: ? ? ? ? ? ? https://fedorahosted.org/suds/ >>>> >>>> Build Dependencies: ? py25-setuptools >>>> Library Dependencies: python25 >>>> Platforms: ? ? ? ? ? ?darwin >>>> License: ? ? ? ? ? ? ?unknown >>>> Maintainers: ? ? ? ? ?mmoll at macports.org, openmaintainer at macports.org >>>> ==================================== >>>> >>>> one of the SOAP services I was accessing: >>>> http://www.rcsb.org/pdb/services/pdbws?wsdl >>>> >>>> Basically, I resolved my problem already, but I was wondering why suds >>>> was using stale information in its tmp directory instead of building >>>> the Clients from scratch. >> >> By default, suds caches WSDLs and XSDs locally for 1 day. ?The cache is used >> for better performance and quicker Client construction. ?Also, WSDLs and XSD >> files tend to be very static so gettting them from the server everytime >> usually provides little value. ?But, in cases where you want suds to get >> these files from the server every time, you can specify that suds not do any >> caching (as Matt mentioned) by setting the /cache/ option in the Client >> constructor. >> >> The real question is: how does the cache get corrupted in the first place? >> ?This happens when either: suds is interrupted while writing the cache file; >> two clients on the same machine are writing to the cache at the same time. >> ?Are either of you running more then one copy of the Client on your machine? >> ?If not, any idea how the client can be get interrupted while loading the >> WSDL? >> >> In any case, I will make the caching more robust. >> >> Is this an error with suds not removing >>>> >>>> stale cache files? ?I can easily clear this directory every time I >>>> want to construct a new Client to guarantee that I won't run into this >>>> issue again, but is this a good idea? >>>> >>>> Thanks, >>>> Drew >>>> >>>> _______________________________________________ >>>> 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 mcauthorn at gmail.com Wed Oct 21 13:43:22 2009 From: mcauthorn at gmail.com (Matt C) Date: Wed, 21 Oct 2009 09:43:22 -0400 Subject: [Fedora-suds-list] 0.3.7 ServiceDefinition changes Message-ID: <42ea979e0910210643u75eeac2fv394ac5ab95752a3d@mail.gmail.com> In 0.3.6 I was able to peek at the (very useful!) attributes inside of my client object, in particular c.sd.params, where I could iterate over them and fetch each param.name attribute. It appears this has changed in 0.3.7. I've not had a chance to look into the code for 0.3.7 yet, but was wondering if anyone knew of a way for me to quickly recreate the c.sd.params list that I was able to see in 0.3.6? Thanks in advance, -Matt From jortel at redhat.com Wed Oct 21 14:02:14 2009 From: jortel at redhat.com (Jeff Ortel) Date: Wed, 21 Oct 2009 09:02:14 -0500 Subject: [Fedora-suds-list] 0.3.7 ServiceDefinition changes In-Reply-To: <42ea979e0910210643u75eeac2fv394ac5ab95752a3d@mail.gmail.com> References: <42ea979e0910210643u75eeac2fv394ac5ab95752a3d@mail.gmail.com> Message-ID: <4ADF1466.2020703@redhat.com> On 10/21/2009 08:43 AM, Matt C wrote: > In 0.3.6 I was able to peek at the (very useful!) attributes inside of > my client object, in particular c.sd.params, where I could iterate > over them and fetch each param.name attribute. It appears this has > changed in 0.3.7. In 0.3.7 support was added for WSDLs defining multiple services. So, the Client.sd is now a list. So, assuming you WSDL only defines a single service, you should be able to do this: c.sd[0].params and be back where you were with 0.3.6. > > I've not had a chance to look into the code for 0.3.7 yet, but was > wondering if anyone knew of a way for me to quickly recreate the > c.sd.params list that I was able to see in 0.3.6? > > Thanks in advance, > > -Matt > > _______________________________________________ > 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: 5260 bytes Desc: S/MIME Cryptographic Signature URL: From monty at starfief.com Wed Oct 21 14:05:43 2009 From: monty at starfief.com (Rod Montgomery) Date: Wed, 21 Oct 2009 10:05:43 -0400 Subject: [Fedora-suds-list] Persistent connections - anyone else interested / suggest howto / working on it? Message-ID: <4ADF1537.2090705@starfief.com> Currently (i.e. r580 / 0.3.7 release candidate) Suds uses urllib2, which uses urllib, both from the standard Python library. For Python 2.5.2, urllib2 adds a "Connection: close" header, with the following comment: # We want to make an HTTP/1.1 request, but the addinfourl # class isn't prepared to deal with a persistent connection. # It will try to read all remaining data from the socket, # which will block while the server waits for the next request. # So make sure the connection gets closed after the (only) # request. (lines 1069-1074 of /usr/lib/python2.5/urllib2.py). I'm interested in making Suds able to use persistent connections. Twisted (twistedmatrix.com) seems to have an elaborate HTTP/1.1 Client module in development, that threatens to support persistent connections, but I have been unable to figure out how stable it is, and I don't understand how hard it would be to make Suds able to use it. http://twistedmatrix.com/trac/wiki/TwistedWebClient http://twistedmatrix.com/trac/ticket/3420 which leads to http://twistedmatrix.com/trac/ticket/886 Another possibility is httplib2: http://pypi.python.org/pypi/httplib2/python3-0.5.0 Neither project seems to have much recent development-mailing-list activity, though neither seems completely dead either. The Right Thing To Do would be to make Suds' use of any external HTTP package optional, rather than mandatory, to avoid putting Suds at the mercy of the stability of that external package. Anyone else interested in having persistent connections in Suds? Anyone else have other suggestions for how to go about getting them? Anyone else actually working on this? (I don't see any open Suds-Trac tickets for it.) Thanks! From mcauthorn at gmail.com Wed Oct 21 14:16:42 2009 From: mcauthorn at gmail.com (Matt C) Date: Wed, 21 Oct 2009 10:16:42 -0400 Subject: [Fedora-suds-list] 0.3.7 ServiceDefinition changes In-Reply-To: <4ADF1466.2020703@redhat.com> References: <42ea979e0910210643u75eeac2fv394ac5ab95752a3d@mail.gmail.com> <4ADF1466.2020703@redhat.com> Message-ID: <42ea979e0910210716l1d83b0a9k9076104ebbaaca03@mail.gmail.com> Ah yes, that makes sense. Many thanks Jeff. Now off to figure out how to deal with these multi-level nested types :) On Wed, Oct 21, 2009 at 10:02 AM, Jeff Ortel wrote: > > > On 10/21/2009 08:43 AM, Matt C wrote: >> >> In 0.3.6 I was able to peek at the (very useful!) attributes inside of >> my client object, in particular c.sd.params, where I could iterate >> over them and fetch each param.name attribute. It appears this has >> changed in 0.3.7. > > In 0.3.7 support was added for WSDLs defining multiple services. ?So, the > Client.sd is now a list. ?So, assuming you WSDL only defines a single > service, you should be able to do this: > > c.sd[0].params > > and be back where you were with 0.3.6. > >> >> I've not had a chance to look into the code for 0.3.7 yet, but was >> wondering if anyone knew of a way for me to quickly recreate the >> c.sd.params list that I was able to see in 0.3.6? >> >> Thanks in advance, >> >> -Matt >> >> _______________________________________________ >> 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 waldemar.osuch at gmail.com Wed Oct 21 17:20:58 2009 From: waldemar.osuch at gmail.com (Waldemar Osuch) Date: Wed, 21 Oct 2009 11:20:58 -0600 Subject: [Fedora-suds-list] Persistent connections - anyone else interested / suggest howto / working on it? In-Reply-To: <4ADF1537.2090705@starfief.com> References: <4ADF1537.2090705@starfief.com> Message-ID: <6fae95540910211020v6960b339i3403351245dd7973@mail.gmail.com> On Wed, Oct 21, 2009 at 8:05 AM, Rod Montgomery wrote: > Currently (i.e. r580 / 0.3.7 release candidate) Suds uses urllib2, which > uses urllib, both from the standard Python library. > > > I'm interested in making Suds able to use persistent connections. > > Twisted (twistedmatrix.com) seems to have an elaborate HTTP/1.1 Client > > Another possibility is httplib2: Yes, it looks like the Client is using urllib2 by default but you should be able to replace it with a custom transport. Client.options.transport = YourFancyPersistentConnection() As long as YourFancyPersistentConnection confirms to Transport interface from suds.transport it should work. At one time I was playing with httplib2 to do just that. I needed it since persistent connections are requirement for NTLM authentication. Since then the requirements have changed and I did not finish it. I think you will have more luck with httplib2 than Twisted version unless you are versed in Twisted ways. By the way you probably want: http://httplib2.googlecode.com/files/httplib2-0.5.0.tar.gz and not the Python3 version you have linked above. Waldemar From jortel at redhat.com Wed Oct 21 17:45:04 2009 From: jortel at redhat.com (Jeff Ortel) Date: Wed, 21 Oct 2009 12:45:04 -0500 Subject: [Fedora-suds-list] Persistent connections - anyone else interested / suggest howto / working on it? In-Reply-To: <6fae95540910211020v6960b339i3403351245dd7973@mail.gmail.com> References: <4ADF1537.2090705@starfief.com> <6fae95540910211020v6960b339i3403351245dd7973@mail.gmail.com> Message-ID: <4ADF48A0.3040008@redhat.com> On 10/21/2009 12:20 PM, Waldemar Osuch wrote: > On Wed, Oct 21, 2009 at 8:05 AM, Rod Montgomery wrote: >> Currently (i.e. r580 / 0.3.7 release candidate) Suds uses urllib2, which >> uses urllib, both from the standard Python library. >> > >> I'm interested in making Suds able to use persistent connections. >> >> Twisted (twistedmatrix.com) seems to have an elaborate HTTP/1.1 Client > >> Another possibility is httplib2: > > Yes, it looks like the Client is using urllib2 by default but you should > be able to replace it with a custom transport. > > Client.options.transport = YourFancyPersistentConnection() > > As long as YourFancyPersistentConnection confirms to Transport interface from > suds.transport it should work. Yup. The transport functionality as factored out into the Transport (interface) and urllib2 based implementations for just this reason. > > At one time I was playing with httplib2 to do just that. > I needed it since persistent connections are requirement for NTLM > authentication. > Since then the requirements have changed and I did not finish it. I just included a NTLM transport https://fedorahosted.org/suds/wiki/Documentation#WindowsNTLM written by Christopher Bess that uses python-ntlm which is based on urllib2. This seems to work without persistent connections (or at least it did). Will this still work? Are there advantages other then persistent connections to using httplib2 over urllib2? > > I think you will have more luck with httplib2 than Twisted version > unless you are > versed in Twisted ways. > > By the way you probably want: > http://httplib2.googlecode.com/files/httplib2-0.5.0.tar.gz > and not the Python3 version you have linked above. > > Waldemar > > _______________________________________________ > 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: 5260 bytes Desc: S/MIME Cryptographic Signature URL: From waldemar.osuch at gmail.com Wed Oct 21 18:00:23 2009 From: waldemar.osuch at gmail.com (Waldemar Osuch) Date: Wed, 21 Oct 2009 12:00:23 -0600 Subject: [Fedora-suds-list] Persistent connections - anyone else interested / suggest howto / working on it? In-Reply-To: <4ADF48A0.3040008@redhat.com> References: <4ADF1537.2090705@starfief.com> <6fae95540910211020v6960b339i3403351245dd7973@mail.gmail.com> <4ADF48A0.3040008@redhat.com> Message-ID: <6fae95540910211100k26409a3bgb57fe4bb55c078c3@mail.gmail.com> On Wed, Oct 21, 2009 at 11:45 AM, Jeff Ortel wrote: > > > On 10/21/2009 12:20 PM, Waldemar Osuch wrote: >> >> On Wed, Oct 21, 2009 at 8:05 AM, Rod Montgomery >> ?wrote: >>> >> >> At one time I was playing with httplib2 to do just that. >> I needed it since persistent connections are requirement for NTLM >> authentication. >> Since then the requirements have changed and I did not finish it. > > I just included a NTLM transport > https://fedorahosted.org/suds/wiki/Documentation#WindowsNTLM written by > Christopher Bess that uses python-ntlm which is based on urllib2. ?This > seems to work without persistent connections (or at least it did). ?Will > this still work? ?Are there advantages other then persistent connections to > using httplib2 over urllib2? > Your rock :) >From what I can tell Christopher does reuse the socket for the handshake. Is it the same as persistent connections? I am not sure. The gory details are in: http://code.google.com/p/python-ntlm/source/browse/trunk/python26/ntlm/HTTPNtlmAuthHandler.py#retry_using_http_NTLM_auth From monty at starfief.com Wed Oct 21 18:32:27 2009 From: monty at starfief.com (Rod Montgomery) Date: Wed, 21 Oct 2009 14:32:27 -0400 Subject: [Fedora-suds-list] Documentation links to Transport throw 404-NotFound Message-ID: <4ADF53BB.6040009@starfief.com> Under https://fedorahosted.org/suds/wiki/Documentation#OPTIONS the following links throw 404-NotFound: Label: transport options Target: http://jortel.fedorapeople.org/suds/doc/suds.options.transport.Options-class.html Label: The Transport constructor(s) Target: http://jortel.fedorapeople.org/suds/doc/suds.options.transport.Transport-class.html Seemed excessive to open a ticket for this sort of thing. From jortel at redhat.com Wed Oct 21 18:36:10 2009 From: jortel at redhat.com (Jeff Ortel) Date: Wed, 21 Oct 2009 13:36:10 -0500 Subject: [Fedora-suds-list] Persistent connections - anyone else interested / suggest howto / working on it? In-Reply-To: <6fae95540910211100k26409a3bgb57fe4bb55c078c3@mail.gmail.com> References: <4ADF1537.2090705@starfief.com> <6fae95540910211020v6960b339i3403351245dd7973@mail.gmail.com> <4ADF48A0.3040008@redhat.com> <6fae95540910211100k26409a3bgb57fe4bb55c078c3@mail.gmail.com> Message-ID: <4ADF549A.4070307@redhat.com> Oops! I don't have a windows environment to test this but I should have done a little more before committing this :/ The module named "ntlm.py" in suds shadows the import of the ntlm module from python-ntlm package. So, I've fixed by moving the WindowsHttpAuthenticated class to the https.py module in suds. Did a quick run through and at least now it does not barf. Documentation updated. On 10/21/2009 01:00 PM, Waldemar Osuch wrote: > On Wed, Oct 21, 2009 at 11:45 AM, Jeff Ortel wrote: >> >> On 10/21/2009 12:20 PM, Waldemar Osuch wrote: >>> On Wed, Oct 21, 2009 at 8:05 AM, Rod Montgomery >>> wrote: > > >>> At one time I was playing with httplib2 to do just that. >>> I needed it since persistent connections are requirement for NTLM >>> authentication. >>> Since then the requirements have changed and I did not finish it. >> I just included a NTLM transport >> https://fedorahosted.org/suds/wiki/Documentation#WindowsNTLM written by >> Christopher Bess that uses python-ntlm which is based on urllib2. This >> seems to work without persistent connections (or at least it did). Will >> this still work? Are there advantages other then persistent connections to >> using httplib2 over urllib2? >> > Your rock :) > > From what I can tell Christopher does reuse the socket for the handshake. > Is it the same as persistent connections? I am not sure. I hope so. > > The gory details are in: > http://code.google.com/p/python-ntlm/source/browse/trunk/python26/ntlm/HTTPNtlmAuthHandler.py#retry_using_http_NTLM_auth -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 5260 bytes Desc: S/MIME Cryptographic Signature URL: From jacob.fenwick at gmail.com Wed Oct 21 19:13:57 2009 From: jacob.fenwick at gmail.com (Jacob Fenwick) Date: Wed, 21 Oct 2009 15:13:57 -0400 Subject: [Fedora-suds-list] HTTPS Client Authentication: Where do I get the key? Message-ID: <8bd17e2b0910211213v62f2fcb0s7c2b6bddd2840eed@mail.gmail.com> Hello all, I'm new to suds. I've managed to get the public.py example working, which is great. However, I'd like to get suds working over HTTPS. My issue partially lies with my minimal understanding of exactly how trusting X.509 certificates work. I know that in Java I can take a .cer certificate issued by an authority, add it to my keystore, and then I'm able to connect over HTTPS to make a SOAP call. In David Norton's post at http://www.threepillarsoftware.com/soap_client_auth on how to use HTTPS with suds, you need a certificate, but you also need a key. I'm not quite sure what this key is. Is this the public key of the endpoint I'm trying to connect to? It surely can't be their private key. Or is this meant to be my public key? Or my private key? If this is the public key from the endpoint, then is there a way to generate this key from the .cer file? Or if this is the public or private key of the client, then is there a way to generate the user's public or private key? On a related newbie SSL question, does each individual computer have its own unique public/private key used for all SOAP endpoints? Or does a user generate a new public/private key combination each time they want to talk to a different SOAP endpoint (or any SSL endpoint for that matter)? I've also tried reading the httplib documentation at http://docs.python.org/library/httplib.html and I still haven't figured this out. Also, I'm curious if Michal Kochel's patch will be added to the system https://fedorahosted.org/suds/ticket/227 . I've also tried this patch but I've run into the same issues. If anyone can shed some light on this problem I would be greatly appreciative. Thanks, Jacob -------------- next part -------------- An HTML attachment was scrubbed... URL: From monty at starfief.com Thu Oct 22 02:55:55 2009 From: monty at starfief.com (Rod Montgomery) Date: Wed, 21 Oct 2009 22:55:55 -0400 Subject: [Fedora-suds-list] Persistent connections - anyone else interested / suggest howto / working on it? In-Reply-To: <4ADF48A0.3040008@redhat.com> References: <4ADF1537.2090705@starfief.com> <6fae95540910211020v6960b339i3403351245dd7973@mail.gmail.com> <4ADF48A0.3040008@redhat.com> Message-ID: <4ADFC9BB.7090305@starfief.com> Jeff Ortel wrote, On 10/21/2009 01:45 PM: > On 10/21/2009 12:20 PM, Waldemar Osuch wrote: >> On Wed, Oct 21, 2009 at 8:05 AM, Rod Montgomery wrote: >>> Currently (i.e. r580 / 0.3.7 release candidate) Suds uses urllib2, which >>> uses urllib, both from the standard Python library. >>> >>> I'm interested in making Suds able to use persistent connections. >>> >>> Twisted (twistedmatrix.com) seems to have an elaborate HTTP/1.1 Client >> >>> Another possibility is httplib2: >> >> Yes, it looks like the Client is using urllib2 by default but you should >> be able to replace it with a custom transport. >> >> Client.options.transport = YourFancyPersistentConnection() >> >> As long as YourFancyPersistentConnection confirms to Transport >> interface from suds.transport it should work. > > Yup. The transport functionality as factored out into the Transport > (interface) and urllib2 based implementations for just this reason. Aha! That sounds promising! I had not grasped that from the Documentation. Thanks! >> I think you will have more luck with httplib2 than Twisted version >> unless you are versed in Twisted ways. You are now the second person who has warned me that Twisted may be more challenging than I want. >> By the way you probably want: >> http://httplib2.googlecode.com/files/httplib2-0.5.0.tar.gz >> and not the Python3 version you have linked above. It seems httplib2 is also available in a repository from my Linux distribution, Ubuntu. There is also apparently a urllib3, which also claims to be thread-safe: http://pypi.python.org/pypi/urllib3/0.2 I think I'll try both httplib2 and urllib3, and report my results back to the List. Thanks for the prompt, informative responses! From monty at starfief.com Sun Oct 25 21:56:17 2009 From: monty at starfief.com (Rod Montgomery) Date: Sun, 25 Oct 2009 17:56:17 -0400 Subject: [Fedora-suds-list] TransportError needs a docstring, maybe a change in behavior Message-ID: <4AE4C981.2000204@starfief.com> In file transport/__init__.py maybe change the class def to this? class TransportError(Exception): def __init__(self, reason, httpcode, fp=None): """ A transport exception @param reason: Human-readable text message @type reason: str @param httpcode: 3-decimal-digit HTTP status code (RFC 2616) @type httpcode: str @param fp: either a file-like object, containing (?what?), or None @type fp: stream """ Exception.__init__(self, reason) self.httpcode = httpcode self.fp = fp I have not yet figured out exactly *what* is in the fp element, when it is not None. Anybody know offhand? The Python Library Reference, section 2.3, says Exception is derived from BaseException and that raising BaseException with a single argument -- as here -- makes that argument available both as the str() and unicode() values of the exception and as the message attribute of the exception. "All arguments are also stored in args as a tuple, but it will eventually be deprecated and thus its use is discouraged." In Suds as it now stands, the only places that raise TransportError are in the open and send methods of the HttpTransport class, in file transport/http.py. Both cases are in except u2.HTTPError clauses, where u2 is bound to urllib2 from the stdlib: For open: except u2.HTTPError, e: raise TransportError(str(e), e.code, e.fp) For send: except u2.HTTPError, e: if e.code in (202,204): result = None else: raise TransportError(e.msg, e.code, e.fp) Why does open use str(e) where send uses e.msg ? From the source code for HTTPError, it looks to me like e.msg and str(e) differ, in a way that would make it harder than necessary to write a single handler for both versions of the exception. Am I missing something? Is there a good reason for the difference? I was tempted to open a ticket for this, but (a) the proposed changes seemed too trivial and (b) I thought I'd have a better chance of getting my questions answered if I posted to the List instead. I'm digging deeper into exactly how HTTPError works in urllib2 so I'll be able to make TransportError work as uniformly as possible across the Suds-provided Transport and alternatives based on httplib2 and urllib3. It might help my understanding, if I could look at a few cases that actually use TransportError non-trivially. Anyone have any to share? From nick.wiesmueller at singlewire.com Mon Oct 26 15:47:23 2009 From: nick.wiesmueller at singlewire.com (Nick Wiesmueller) Date: Mon, 26 Oct 2009 10:47:23 -0500 Subject: [Fedora-suds-list] Problems using the attached WSDL's Message-ID: Hi, I'm trying to use the attached WSDL's and I'm having some difficulties. I've got this working in C# .NET but I think I don't understand how suds works. I can create my client >>> from suds import * >>> from suds.client import Client >>> client = Client("http://10.1.10.11:81/flex/rpc/zephyrrpcservice?wsdl") My client looks like this. >>> print client Suds ( https://fedorahosted.org/suds/ ) version: 0.3.7 GA build: R580-20091016 Service ( zephyrrpcservice ) tns="http://impl.rpc.thed.com/" Prefixes (1) ns0 = "http://rpc.thed.com/" Ports (1): (ZephyrRPCServicesImplPort) Methods (1): updateTestStatus(ns0:remoteTestResult testResult, ) Types (4): ns0:exception ns0:remoteTestResult ns0:updateTestStatus ns0:updateTestStatusResponse With other WSDL's I was just able to access the methods at this point like this >>>client.someMethod() This doesn't work with the attached WSDL's. It looks like client.service.updateTestStatus(remoteTestResult testResult) might work (I could be totally wrong), but I don't know how to properly create a remoteTestResult object. Thanks for your help, Nick Wiesmueller QA Analyst Singlewire Software PO Box 46218 Madison, WI 53744-6218 Phone Direct - 608.298.1625 www.singlewire.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: zephyrrpcserviceimported.wsdl Type: text/xml Size: 4159 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: zephyrrpcservice.wsdl Type: text/xml Size: 2619 bytes Desc: not available URL: From elyrwendynesh at gmail.com Tue Oct 27 12:22:14 2009 From: elyrwendynesh at gmail.com (Elyrwen Dynesh) Date: Tue, 27 Oct 2009 13:22:14 +0100 Subject: [Fedora-suds-list] How to force NULL, xsi:nil, gsoap? Message-ID: <58b36a720910270522g1ab11a3nfd73f58bb6aea6bb@mail.gmail.com> Hello, I ve just started using suds for accessing a webservice written with gsoap. I have a problem with passing NULL arguments. When I call a remote method which has a pointer argument and I dont not want to specify this argument, suds nevertheless includes this argument in SOAP message with an empty contents, like this: On the other hand, gsoap recognizes this as a non-empty argument and by no means filter == NULL Generally, gsoap treats an argument as NULL only if: or is not present in a SOAP message at all. My question is how to force suds to send or not at all while using methods with pointers? I use the following method calls: client.service.someMethod(filter = None) client.service.someMethod() The method declaration in C++ is: void someMethod(someType* filter = NULL) { if (filter == NULL) { //filter is never NULL } } I've already checked, that when sending the same message suds generates while calling client.service.someMethod(), but with cut out, everything works fine and filter == NULL Anyone has a clue? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jortel at redhat.com Tue Oct 27 20:02:15 2009 From: jortel at redhat.com (Jeff Ortel) Date: Tue, 27 Oct 2009 15:02:15 -0500 Subject: [Fedora-suds-list] How to force NULL, xsi:nil, gsoap? In-Reply-To: <58b36a720910270522g1ab11a3nfd73f58bb6aea6bb@mail.gmail.com> References: <58b36a720910270522g1ab11a3nfd73f58bb6aea6bb@mail.gmail.com> Message-ID: <4AE751C7.4020104@redhat.com> On 10/27/2009 07:22 AM, Elyrwen Dynesh wrote: > Hello, > > I ve just started using suds for accessing a webservice written with gsoap. > I have a problem with passing NULL arguments. When I call a remote method > which has a pointer argument and I dont not want to specify this argument, > suds nevertheless includes this argument in SOAP message with an empty > contents, like this: > > > > On the other hand, gsoap recognizes this as a non-empty argument and by no > means filter == NULL > Generally, gsoap treats an argument as NULL only if: > > > > or is not present in a SOAP message at all. > > My question is how to force suds to send or not at all Suds will send if the element is defined as being nillable in the XSD as follows: Also, if the element is defined as optional then you should be able to call as client.service.someMethod() Can you show me the wsdl and related schemas? > while using methods with pointers? > I use the following method calls: > > client.service.someMethod(filter = None) > client.service.someMethod() > > The method declaration in C++ is: > void someMethod(someType* filter = NULL) { > if (filter == NULL) { > //filter is never NULL > } > > } > > I've already checked, that when sending the same message suds generates > while calling client.service.someMethod(), but with > cut out, everything works fine and > filter == NULL > > Anyone has a clue? > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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: 5260 bytes Desc: S/MIME Cryptographic Signature URL: From jortel at redhat.com Tue Oct 27 20:27:25 2009 From: jortel at redhat.com (Jeff Ortel) Date: Tue, 27 Oct 2009 15:27:25 -0500 Subject: [Fedora-suds-list] Problems using the attached WSDL's In-Reply-To: References: Message-ID: <4AE757AD.8090904@redhat.com> Hey Nick. Welcome to suds! To start with, I'd review the documentation here: https://fedorahosted.org/suds/. Specifically, https://fedorahosted.org/suds/wiki/Documentation I ran your WSDL and updateTestStatus() takes an ns0:remoteTestResult argument that is a complex type (object). > > > > > > > > > > > So, you'll want to create using the factory: > > result = client.factory.create('ns0:remoteTestResult') > print result (remoteTestResult){ encTestScheduleId = None executionDate = None executionNotes = None executionStatus = None id = None testerId = None timeTaken = None } You'll need to set the attributes /something/ like: > > from datetime import datetime as dt > > result.encTestScheduleId = 'xxx' > result.executionDate = dt.now() > result.executionNotes = 'your notes' > result.executionStatus = 'some status' > result.id = 123 > result.testerId = 345 > result.timeTaken = 100 > Then invoke: > > client.service.updateTestStatus(result) > Hope this helps. -jeff On 10/26/2009 10:47 AM, Nick Wiesmueller wrote: > Hi, > > I'm trying to use the attached WSDL's and I'm having some difficulties. > I've got this working in C# .NET but I think I don't understand how suds > works. > I can create my client > > >>> from suds import * > >>> from suds.client import Client > >>> client = Client("http://10.1.10.11:81/flex/rpc/zephyrrpcservice?wsdl") > > My client looks like this. > > >>> print client > > Suds ( https://fedorahosted.org/suds/ ) version: 0.3.7 GA build: > R580-20091016 > > Service ( zephyrrpcservice ) tns="http://impl.rpc.thed.com/" > Prefixes (1) > ns0 = "http://rpc.thed.com/" > Ports (1): > (ZephyrRPCServicesImplPort) > Methods (1): > updateTestStatus(ns0:remoteTestResult testResult, ) > Types (4): > ns0:exception > ns0:remoteTestResult > ns0:updateTestStatus > ns0:updateTestStatusResponse > > > With other WSDL's I was just able to access the methods at this point > like this > >>>client.someMethod() > > This doesn't work with the attached WSDL's. > > It looks like > > client.service.updateTestStatus(remoteTestResult testResult) > > might work (I could be totally wrong), but I don't know how to properly > create a remoteTestResult object. > > Thanks for your help, > > > > Nick Wiesmueller > QA Analyst > Singlewire Software > PO Box 46218 > Madison, WI 53744-6218 > > Phone Direct - 608.298.1625 > www.singlewire.com > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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: 5260 bytes Desc: S/MIME Cryptographic Signature URL: From mcauthorn at gmail.com Thu Oct 29 14:05:20 2009 From: mcauthorn at gmail.com (Matt C) Date: Thu, 29 Oct 2009 10:05:20 -0400 Subject: [Fedora-suds-list] Cache behavior Message-ID: <42ea979e0910290705j5d7eac80p4f6ffa0304fe3ff2@mail.gmail.com> I know that there's some work planned on the cache implementation but I wanted to get this behavior out for the benefit of any tickets that may open (by the way I'm happy to open one on this but I'm not sure I know how). I frequently run into this when instantiating a client (even with cache = None in the constructor): SAXParseException: :10:2: mismatched tag, which indicates the cache issue that has come up before on the list. But, if I run the same command from the same interactive session, I create my client object without any issues. In other words, if I run c = Client(url, cache = None, doctor = doctor) and I get my mismatched tag error, I simply run this command again for the second time and I've got a working client. I've not had a chance to look at the caching code yet so I don't have any input to share beyond this. If I get the chance to poke at this a bit more I'll update here. -Matt From jortel at redhat.com Thu Oct 29 14:26:41 2009 From: jortel at redhat.com (Jeff Ortel) Date: Thu, 29 Oct 2009 09:26:41 -0500 Subject: [Fedora-suds-list] Cache behavior In-Reply-To: <42ea979e0910290705j5d7eac80p4f6ffa0304fe3ff2@mail.gmail.com> References: <42ea979e0910290705j5d7eac80p4f6ffa0304fe3ff2@mail.gmail.com> Message-ID: <4AE9A621.3010908@redhat.com> Thanks Matt! I'll factor this into my cache work. On 10/29/2009 09:05 AM, Matt C wrote: > I know that there's some work planned on the cache implementation but > I wanted to get this behavior out for the benefit of any tickets that > may open (by the way I'm happy to open one on this but I'm not sure I > know how). > > I frequently run into this when instantiating a client (even with > cache = None in the constructor): SAXParseException::10:2: > mismatched tag, which indicates the cache issue that has come up > before on the list. > > But, if I run the same command from the same interactive session, I > create my client object without any issues. In other words, if I run > c = Client(url, cache = None, doctor = doctor) and I get my mismatched > tag error, I simply run this command again for the second time and > I've got a working client. > > I've not had a chance to look at the caching code yet so I don't have > any input to share beyond this. If I get the chance to poke at this a > bit more I'll update here. > > -Matt > > _______________________________________________ > 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 danjrod at gmail.com Thu Oct 29 22:36:57 2009 From: danjrod at gmail.com (Daniel Rodriguez) Date: Thu, 29 Oct 2009 23:36:57 +0100 Subject: [Fedora-suds-list] Clone "needs" messages Message-ID: <8ba9089f0910291536m685c2958u3816a3d9f07b7e55@mail.gmail.com> Hi, I checked in the source code of 0.3.7 and in the subversion trunk and both lack the "cloning" of the "messages" attribute. Trying to usethe "cloned" object fails because it has no "messages". Opening a ticket was my preferred way but it seems that the Fedora Account System is not working properly, so there it goes Original Code at the end of the Client.clone function clone.sd = self.sd return clone New Code clone.sd = self.sd clone.messages = dict(tx=None, rx=None) return clone With that small modification, clone is (so far in my small attempts) working for me. Best regards Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL: From jortel at redhat.com Fri Oct 30 14:07:43 2009 From: jortel at redhat.com (Jeff Ortel) Date: Fri, 30 Oct 2009 09:07:43 -0500 Subject: [Fedora-suds-list] Clone "needs" messages In-Reply-To: <8ba9089f0910291536m685c2958u3816a3d9f07b7e55@mail.gmail.com> References: <8ba9089f0910291536m685c2958u3816a3d9f07b7e55@mail.gmail.com> Message-ID: <4AEAF32F.8070903@redhat.com> Hey Daniel, I was sure my clone() testing included sending messages but apparently not :/ Thank you very much for reporting this. Your patch applied r589 and released in 0.3.7 beta. On 10/29/2009 05:36 PM, Daniel Rodriguez wrote: > Hi, > > I checked in the source code of 0.3.7 and in the subversion trunk and > both lack the "cloning" of the "messages" attribute. Trying to usethe > "cloned" object fails because it has no "messages". > > Opening a ticket was my preferred way but it seems that the Fedora > Account System is not working properly, so there it goes > > Original Code at the end of the Client.clone function > > clone.sd = self.sd > return clone > > New Code > > clone.sd = self.sd > clone.messages = dict(tx=None, rx=None) > return clone > > With that small modification, clone is (so far in my small attempts) > working for me. Great! Thanks for the feedback :) > > Best regards > > Daniel > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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: