From burak.arslan at arskom.com.tr Fri Jan 6 08:43:53 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Fri, 06 Jan 2012 09:43:53 +0200 Subject: [Soap-Python] Django, lxml, WSGI, and Python sub-interpreter magic Message-ID: <4F06A639.6060206@arskom.com.tr> mod_wsgi + soaplib/rpclib users; be mindful: https://techknowhow.library.emory.edu/blogs/branker/2010/07/30/django-lxml-wsgi-and-python-sub-interpreter-magic best, burak From reingart at gmail.com Sun Jan 8 04:07:09 2012 From: reingart at gmail.com (Mariano Reingart) Date: Sun, 8 Jan 2012 00:07:09 -0300 Subject: [Soap-Python] PySimpleSOAP 1.05a released Message-ID: Python Simple SOAP library for client and server webservices interfaces, aimed to be as small and easy as possible, supporting most common functionality. Version 1.05a changelog: * support for SOAP Headers and WS-Security (WSSE) * several WSDL fixes and enhancements (anyType, multiRef, etc.) * SimpleXmlElement object-like xml manipulation new features * improved project structure: test suite, separated http transports * many bugfixes Thanks to the contributors that send their patches along the last year. More information and downloads at: http://code.google.com/p/pysimplesoap/ Best regards, Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com From azurit at pobox.sk Tue Jan 24 18:43:11 2012 From: azurit at pobox.sk (azurIt) Date: Tue, 24 Jan 2012 18:43:11 +0100 Subject: [Soap-Python] rpclib regressions Message-ID: <20120124184311.C1FE9131@pobox.sk> Hi, i just tried to upgrade to 2.5.2 (from 2.4.5) and i come accross HUGE problems. first of all, there is no 'soft' validation in protocol/xml/_base.py so this: in_protocol=Soap11(validator='soft') was raising ValueError. I fixed it in code and strange things started to happend then: SAXParseException: :1:30: unknown encoding i wasn't able to fix this and downgraded back to 2.4.5 :( azur From burak.arslan at arskom.com.tr Tue Jan 24 18:56:47 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 24 Jan 2012 19:56:47 +0200 Subject: [Soap-Python] rpclib regressions In-Reply-To: <20120124184311.C1FE9131@pobox.sk> References: <20120124184311.C1FE9131@pobox.sk> Message-ID: <4F1EF0DF.8020808@arskom.com.tr> On 01/24/12 19:43, azurIt wrote: > Hi, > > i just tried to upgrade to 2.5.2 (from 2.4.5) and i come accross HUGE problems. first of all, there is no 'soft' validation in protocol/xml/_base.py so this: > in_protocol=Soap11(validator='soft') > > was raising ValueError. I fixed it in code and strange things started to happend then: > SAXParseException::1:30: unknown encoding > > i wasn't able to fix this and downgraded back to 2.4.5 :( > hi azur. i fixed the ValueError with validator='soft' in my personal fork. but i don't understand what throws the encoding error. can you provide some code that exhibits the problem? thanks burak From azurit at pobox.sk Tue Jan 24 19:06:02 2012 From: azurit at pobox.sk (azurIt) Date: Tue, 24 Jan 2012 19:06:02 +0100 Subject: [Soap-Python] rpclib regressions In-Reply-To: <4F1EF0DF.8020808@arskom.com.tr> References: <20120124184311.C1FE9131@pobox.sk> <4F1EF0DF.8020808@arskom.com.tr> Message-ID: <20120124190602.94C75F25@pobox.sk> the last working version is 2.4.7, all other are raising that strange SAX error. here is complete traceback (from 2.5.0): Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/application.py", line 102, in process_request ctx.service_class.event_manager.fire_event('method_call', ctx) File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/_base.py", line 308, in fire_event handler(ctx) File "", line 3309, in run_before perm = lib._check_token(ctx.in_object[0], ctx.descriptor.udp["perms"]) File "", line 188, in _check_token return directorlib.call.check_token(token, perms, config.backend_name) File "", line 88, in __call__ result = caller(*args2) File "build/bdist.linux-x86_64/egg/suds/client.py", line 542, in __call__ return client.invoke(args, kwargs) File "build/bdist.linux-x86_64/egg/suds/client.py", line 602, in invoke result = self.send(soapenv) File "build/bdist.linux-x86_64/egg/suds/client.py", line 643, in send result = self.succeeded(binding, reply.message) File "build/bdist.linux-x86_64/egg/suds/client.py", line 678, in succeeded reply, result = binding.get_reply(self.method, reply) File "build/bdist.linux-x86_64/egg/suds/bindings/binding.py", line 145, in get_reply replyroot = sax.parse(string=reply) File "build/bdist.linux-x86_64/egg/suds/sax/parser.py", line 136, in parse sax.parse(source) File "/usr/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/lib/python2.5/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse self.feed(buffer) File "/usr/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line 220, in feed self._err_handler.fatalError(exc) File "/usr/lib/python2.5/site-packages/_xmlplus/sax/handler.py", line 38, in fatalError raise exception SAXParseException: :1:30: unknown encoding Error is raising from function, which is doing checking of permissions on remote server (via SOAP call). It is sending 'and' and 'or' xml elements, maybe this is the problem (the element names). But it was working fine until 2.5.0. ______________________________________________________________ > Od: "Burak Arslan" > Komu: azurIt > D?tum: 24.01.2012 18:56 > Predmet: Re: [Soap-Python] rpclib regressions > > CC: soap at python.org >On 01/24/12 19:43, azurIt wrote: >> Hi, >> >> i just tried to upgrade to 2.5.2 (from 2.4.5) and i come accross HUGE problems. first of all, there is no 'soft' validation in protocol/xml/_base.py so this: >> in_protocol=Soap11(validator='soft') >> >> was raising ValueError. I fixed it in code and strange things started to happend then: >> SAXParseException::1:30: unknown encoding >> >> i wasn't able to fix this and downgraded back to 2.4.5 :( >> > >hi azur. > >i fixed the ValueError with validator='soft' in my personal fork. but i >don't understand what throws the encoding error. can you provide some >code that exhibits the problem? > >thanks >burak > > > From burak.arslan at arskom.com.tr Tue Jan 24 19:12:13 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 24 Jan 2012 20:12:13 +0200 Subject: [Soap-Python] rpclib regressions In-Reply-To: <20120124190602.94C75F25@pobox.sk> References: <20120124184311.C1FE9131@pobox.sk> <4F1EF0DF.8020808@arskom.com.tr> <20120124190602.94C75F25@pobox.sk> Message-ID: <4F1EF47D.2000804@arskom.com.tr> On 01/24/12 20:06, azurIt wrote: > the last working version is 2.4.7, all other are raising that strange SAX error. here is complete traceback (from 2.5.0): > > > Traceback (most recent call last): > File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/application.py", line 102, in process_request > ctx.service_class.event_manager.fire_event('method_call', ctx) > File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/_base.py", line 308, in fire_event > handler(ctx) > File "", line 3309, in run_before > perm = lib._check_token(ctx.in_object[0], ctx.descriptor.udp["perms"]) > File "", line 188, in _check_token > return directorlib.call.check_token(token, perms, config.backend_name) > File "", line 88, in __call__ > result = caller(*args2) > File "build/bdist.linux-x86_64/egg/suds/client.py", line 542, in __call__ > return client.invoke(args, kwargs) > File "build/bdist.linux-x86_64/egg/suds/client.py", line 602, in invoke > result = self.send(soapenv) > File "build/bdist.linux-x86_64/egg/suds/client.py", line 643, in send > result = self.succeeded(binding, reply.message) > File "build/bdist.linux-x86_64/egg/suds/client.py", line 678, in succeeded > reply, result = binding.get_reply(self.method, reply) > File "build/bdist.linux-x86_64/egg/suds/bindings/binding.py", line 145, in get_reply > replyroot = sax.parse(string=reply) > File "build/bdist.linux-x86_64/egg/suds/sax/parser.py", line 136, in parse > sax.parse(source) > File "/usr/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse > xmlreader.IncrementalParser.parse(self, source) > File "/usr/lib/python2.5/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse > self.feed(buffer) > File "/usr/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line 220, in feed > self._err_handler.fatalError(exc) > File "/usr/lib/python2.5/site-packages/_xmlplus/sax/handler.py", line 38, in fatalError > raise exception > SAXParseException::1:30: unknown encoding > > > > Error is raising from function, which is doing checking of permissions on remote server (via SOAP call). It is sending 'and' and 'or' xml elements, maybe this is the problem (the element names). But it was working fine until 2.5.0. all right, this is a suds backtrace. you're making a suds request from a rpclib event, which tanks in a place completely irrelevant with rpclib. you should either provide me information from the other side of the communication, or the xml traffic itself. > > > ______________________________________________________________ >> Od: "Burak Arslan" >> Komu: azurIt >> D?tum: 24.01.2012 18:56 >> Predmet: Re: [Soap-Python] rpclib regressions >> >> CC: soap at python.org >> On 01/24/12 19:43, azurIt wrote: >>> Hi, >>> >>> i just tried to upgrade to 2.5.2 (from 2.4.5) and i come accross HUGE problems. first of all, there is no 'soft' validation in protocol/xml/_base.py so this: >>> in_protocol=Soap11(validator='soft') >>> >>> was raising ValueError. I fixed it in code and strange things started to happend then: >>> SAXParseException::1:30: unknown encoding >>> >>> i wasn't able to fix this and downgraded back to 2.4.5 :( >>> >> hi azur. >> >> i fixed the ValueError with validator='soft' in my personal fork. but i >> don't understand what throws the encoding error. can you provide some >> code that exhibits the problem? >> >> thanks >> burak >> >> >> > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap From azurit at pobox.sk Tue Jan 24 19:33:18 2012 From: azurit at pobox.sk (azurIt) Date: Tue, 24 Jan 2012 19:33:18 +0100 Subject: [Soap-Python] rpclib regressions In-Reply-To: <4F1EF47D.2000804@arskom.com.tr> References: <20120124184311.C1FE9131@pobox.sk>, <4F1EF0DF.8020808@arskom.com.tr>, <20120124190602.94C75F25@pobox.sk> <4F1EF47D.2000804@arskom.com.tr> Message-ID: <20120124193318.3E7E28B6@pobox.sk> here is the request + response, no errors was logged on server side and data in XML looks ok (so the problem is with suds + SAX, it just cannot parse the XML): censored nic censored ..censored data.. ok look here: encoding='utf8' earlier versions of rpclib were sending 'utf-8'. ______________________________________________________________ > Od: "Burak Arslan" > Komu: azurIt > D?tum: 24.01.2012 19:12 > Predmet: Re: [Soap-Python] rpclib regressions > > CC: soap at python.org >On 01/24/12 20:06, azurIt wrote: >> the last working version is 2.4.7, all other are raising that strange SAX error. here is complete traceback (from 2.5.0): >> >> >> Traceback (most recent call last): >> File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/application.py", line 102, in process_request >> ctx.service_class.event_manager.fire_event('method_call', ctx) >> File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/_base.py", line 308, in fire_event >> handler(ctx) >> File "", line 3309, in run_before >> perm = lib._check_token(ctx.in_object[0], ctx.descriptor.udp["perms"]) >> File "", line 188, in _check_token >> return directorlib.call.check_token(token, perms, config.backend_name) >> File "", line 88, in __call__ >> result = caller(*args2) >> File "build/bdist.linux-x86_64/egg/suds/client.py", line 542, in __call__ >> return client.invoke(args, kwargs) >> File "build/bdist.linux-x86_64/egg/suds/client.py", line 602, in invoke >> result = self.send(soapenv) >> File "build/bdist.linux-x86_64/egg/suds/client.py", line 643, in send >> result = self.succeeded(binding, reply.message) >> File "build/bdist.linux-x86_64/egg/suds/client.py", line 678, in succeeded >> reply, result = binding.get_reply(self.method, reply) >> File "build/bdist.linux-x86_64/egg/suds/bindings/binding.py", line 145, in get_reply >> replyroot = sax.parse(string=reply) >> File "build/bdist.linux-x86_64/egg/suds/sax/parser.py", line 136, in parse >> sax.parse(source) >> File "/usr/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse >> xmlreader.IncrementalParser.parse(self, source) >> File "/usr/lib/python2.5/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse >> self.feed(buffer) >> File "/usr/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line 220, in feed >> self._err_handler.fatalError(exc) >> File "/usr/lib/python2.5/site-packages/_xmlplus/sax/handler.py", line 38, in fatalError >> raise exception >> SAXParseException::1:30: unknown encoding >> >> >> >> Error is raising from function, which is doing checking of permissions on remote server (via SOAP call). It is sending 'and' and 'or' xml elements, maybe this is the problem (the element names). But it was working fine until 2.5.0. > > >all right, this is a suds backtrace. you're making a suds request from a >rpclib event, which tanks in a place completely irrelevant with rpclib. >you should either provide me information from the other side of the >communication, or the xml traffic itself. > > > >> >> >> ______________________________________________________________ >>> Od: "Burak Arslan" >>> Komu: azurIt >>> D?tum: 24.01.2012 18:56 >>> Predmet: Re: [Soap-Python] rpclib regressions >>> >>> CC: soap at python.org >>> On 01/24/12 19:43, azurIt wrote: >>>> Hi, >>>> >>>> i just tried to upgrade to 2.5.2 (from 2.4.5) and i come accross HUGE problems. first of all, there is no 'soft' validation in protocol/xml/_base.py so this: >>>> in_protocol=Soap11(validator='soft') >>>> >>>> was raising ValueError. I fixed it in code and strange things started to happend then: >>>> SAXParseException::1:30: unknown encoding >>>> >>>> i wasn't able to fix this and downgraded back to 2.4.5 :( >>>> >>> hi azur. >>> >>> i fixed the ValueError with validator='soft' in my personal fork. but i >>> don't understand what throws the encoding error. can you provide some >>> code that exhibits the problem? >>> >>> thanks >>> burak >>> >>> >>> >> _______________________________________________ >> Soap mailing list >> Soap at python.org >> http://mail.python.org/mailman/listinfo/soap > > From azurit at pobox.sk Tue Jan 24 22:41:04 2012 From: azurit at pobox.sk (azurIt) Date: Tue, 24 Jan 2012 22:41:04 +0100 Subject: [Soap-Python] rpclib regressions In-Reply-To: <20120124193318.3E7E28B6@pobox.sk> References: <20120124184311.C1FE9131@pobox.sk>, <4F1EF0DF.8020808@arskom.com.tr>, <20120124190602.94C75F25@pobox.sk>, <4F1EF47D.2000804@arskom.com.tr> <20120124193318.3E7E28B6@pobox.sk> Message-ID: <20120124224104.CBA7019B@pobox.sk> Ok, i fixed it by replacing 'utf8' with 'utf-8' everywhere :) azur ______________________________________________________________ > Od: "azurIt" > Komu: > D?tum: 24.01.2012 19:34 > Predmet: Re: [Soap-Python] rpclib regressions > >here is the request + response, no errors was logged on server side and data in XML looks ok (so the problem is with suds + SAX, it just cannot parse the XML): > > > > > > > censored > > nic > > censored > > > > > > > > > > > > > ..censored data.. > > ok > > > > > > > > >look here: >encoding='utf8' > >earlier versions of rpclib were sending 'utf-8'. > > > >______________________________________________________________ >> Od: "Burak Arslan" >> Komu: azurIt >> D?tum: 24.01.2012 19:12 >> Predmet: Re: [Soap-Python] rpclib regressions >> >> CC: soap at python.org >>On 01/24/12 20:06, azurIt wrote: >>> the last working version is 2.4.7, all other are raising that strange SAX error. here is complete traceback (from 2.5.0): >>> >>> >>> Traceback (most recent call last): >>> File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/application.py", line 102, in process_request >>> ctx.service_class.event_manager.fire_event('method_call', ctx) >>> File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/_base.py", line 308, in fire_event >>> handler(ctx) >>> File "", line 3309, in run_before >>> perm = lib._check_token(ctx.in_object[0], ctx.descriptor.udp["perms"]) >>> File "", line 188, in _check_token >>> return directorlib.call.check_token(token, perms, config.backend_name) >>> File "", line 88, in __call__ >>> result = caller(*args2) >>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 542, in __call__ >>> return client.invoke(args, kwargs) >>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 602, in invoke >>> result = self.send(soapenv) >>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 643, in send >>> result = self.succeeded(binding, reply.message) >>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 678, in succeeded >>> reply, result = binding.get_reply(self.method, reply) >>> File "build/bdist.linux-x86_64/egg/suds/bindings/binding.py", line 145, in get_reply >>> replyroot = sax.parse(string=reply) >>> File "build/bdist.linux-x86_64/egg/suds/sax/parser.py", line 136, in parse >>> sax.parse(source) >>> File "/usr/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse >>> xmlreader.IncrementalParser.parse(self, source) >>> File "/usr/lib/python2.5/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse >>> self.feed(buffer) >>> File "/usr/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line 220, in feed >>> self._err_handler.fatalError(exc) >>> File "/usr/lib/python2.5/site-packages/_xmlplus/sax/handler.py", line 38, in fatalError >>> raise exception >>> SAXParseException::1:30: unknown encoding >>> >>> >>> >>> Error is raising from function, which is doing checking of permissions on remote server (via SOAP call). It is sending 'and' and 'or' xml elements, maybe this is the problem (the element names). But it was working fine until 2.5.0. >> >> >>all right, this is a suds backtrace. you're making a suds request from a >>rpclib event, which tanks in a place completely irrelevant with rpclib. >>you should either provide me information from the other side of the >>communication, or the xml traffic itself. >> >> >> >>> >>> >>> ______________________________________________________________ >>>> Od: "Burak Arslan" >>>> Komu: azurIt >>>> D?tum: 24.01.2012 18:56 >>>> Predmet: Re: [Soap-Python] rpclib regressions >>>> >>>> CC: soap at python.org >>>> On 01/24/12 19:43, azurIt wrote: >>>>> Hi, >>>>> >>>>> i just tried to upgrade to 2.5.2 (from 2.4.5) and i come accross HUGE problems. first of all, there is no 'soft' validation in protocol/xml/_base.py so this: >>>>> in_protocol=Soap11(validator='soft') >>>>> >>>>> was raising ValueError. I fixed it in code and strange things started to happend then: >>>>> SAXParseException::1:30: unknown encoding >>>>> >>>>> i wasn't able to fix this and downgraded back to 2.4.5 :( >>>>> >>>> hi azur. >>>> >>>> i fixed the ValueError with validator='soft' in my personal fork. but i >>>> don't understand what throws the encoding error. can you provide some >>>> code that exhibits the problem? >>>> >>>> thanks >>>> burak >>>> >>>> >>>> >>> _______________________________________________ >>> Soap mailing list >>> Soap at python.org >>> http://mail.python.org/mailman/listinfo/soap >> >> >_______________________________________________ >Soap mailing list >Soap at python.org >http://mail.python.org/mailman/listinfo/soap > From burak.arslan at arskom.com.tr Tue Jan 24 22:59:41 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 24 Jan 2012 23:59:41 +0200 Subject: [Soap-Python] rpclib regressions In-Reply-To: <20120124224104.CBA7019B@pobox.sk> References: <20120124184311.C1FE9131@pobox.sk>, <4F1EF0DF.8020808@arskom.com.tr>, <20120124190602.94C75F25@pobox.sk>, <4F1EF47D.2000804@arskom.com.tr> <20120124193318.3E7E28B6@pobox.sk> <20120124224104.CBA7019B@pobox.sk> Message-ID: <4F1F29CD.3080700@arskom.com.tr> On 01/24/12 23:41, azurIt wrote: > Ok, i fixed it by replacing 'utf8' with 'utf-8' everywhere :) > > azur looks like this'd be enough: https://github.com/plq/rpclib/blob/master/src/rpclib/protocol/xml/_base.py#L176 > > > ______________________________________________________________ >> Od: "azurIt" >> Komu: >> D?tum: 24.01.2012 19:34 >> Predmet: Re: [Soap-Python] rpclib regressions >> >> here is the request + response, no errors was logged on server side and data in XML looks ok (so the problem is with suds + SAX, it just cannot parse the XML): >> >> >> >> >> >> >> censored >> >> nic >> >> censored >> >> >> >> >> >> >> >> >> >> >> >> >> ..censored data.. >> >> ok >> >> >> >> >> >> >> >> >> look here: >> encoding='utf8' >> >> earlier versions of rpclib were sending 'utf-8'. >> >> >> >> ______________________________________________________________ >>> Od: "Burak Arslan" >>> Komu: azurIt >>> D?tum: 24.01.2012 19:12 >>> Predmet: Re: [Soap-Python] rpclib regressions >>> >>> CC: soap at python.org >>> On 01/24/12 20:06, azurIt wrote: >>>> the last working version is 2.4.7, all other are raising that strange SAX error. here is complete traceback (from 2.5.0): >>>> >>>> >>>> Traceback (most recent call last): >>>> File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/application.py", line 102, in process_request >>>> ctx.service_class.event_manager.fire_event('method_call', ctx) >>>> File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/_base.py", line 308, in fire_event >>>> handler(ctx) >>>> File "", line 3309, in run_before >>>> perm = lib._check_token(ctx.in_object[0], ctx.descriptor.udp["perms"]) >>>> File "", line 188, in _check_token >>>> return directorlib.call.check_token(token, perms, config.backend_name) >>>> File "", line 88, in __call__ >>>> result = caller(*args2) >>>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 542, in __call__ >>>> return client.invoke(args, kwargs) >>>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 602, in invoke >>>> result = self.send(soapenv) >>>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 643, in send >>>> result = self.succeeded(binding, reply.message) >>>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 678, in succeeded >>>> reply, result = binding.get_reply(self.method, reply) >>>> File "build/bdist.linux-x86_64/egg/suds/bindings/binding.py", line 145, in get_reply >>>> replyroot = sax.parse(string=reply) >>>> File "build/bdist.linux-x86_64/egg/suds/sax/parser.py", line 136, in parse >>>> sax.parse(source) >>>> File "/usr/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse >>>> xmlreader.IncrementalParser.parse(self, source) >>>> File "/usr/lib/python2.5/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse >>>> self.feed(buffer) >>>> File "/usr/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line 220, in feed >>>> self._err_handler.fatalError(exc) >>>> File "/usr/lib/python2.5/site-packages/_xmlplus/sax/handler.py", line 38, in fatalError >>>> raise exception >>>> SAXParseException::1:30: unknown encoding >>>> >>>> >>>> >>>> Error is raising from function, which is doing checking of permissions on remote server (via SOAP call). It is sending 'and' and 'or' xml elements, maybe this is the problem (the element names). But it was working fine until 2.5.0. >>> >>> all right, this is a suds backtrace. you're making a suds request from a >>> rpclib event, which tanks in a place completely irrelevant with rpclib. >>> you should either provide me information from the other side of the >>> communication, or the xml traffic itself. >>> >>> >>> >>>> >>>> ______________________________________________________________ >>>>> Od: "Burak Arslan" >>>>> Komu: azurIt >>>>> D?tum: 24.01.2012 18:56 >>>>> Predmet: Re: [Soap-Python] rpclib regressions >>>>> >>>>> CC: soap at python.org >>>>> On 01/24/12 19:43, azurIt wrote: >>>>>> Hi, >>>>>> >>>>>> i just tried to upgrade to 2.5.2 (from 2.4.5) and i come accross HUGE problems. first of all, there is no 'soft' validation in protocol/xml/_base.py so this: >>>>>> in_protocol=Soap11(validator='soft') >>>>>> >>>>>> was raising ValueError. I fixed it in code and strange things started to happend then: >>>>>> SAXParseException::1:30: unknown encoding >>>>>> >>>>>> i wasn't able to fix this and downgraded back to 2.4.5 :( >>>>>> >>>>> hi azur. >>>>> >>>>> i fixed the ValueError with validator='soft' in my personal fork. but i >>>>> don't understand what throws the encoding error. can you provide some >>>>> code that exhibits the problem? >>>>> >>>>> thanks >>>>> burak >>>>> >>>>> >>>>> >>>> _______________________________________________ >>>> Soap mailing list >>>> Soap at python.org >>>> http://mail.python.org/mailman/listinfo/soap >>> >> _______________________________________________ >> Soap mailing list >> Soap at python.org >> http://mail.python.org/mailman/listinfo/soap >> > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap From azurit at pobox.sk Tue Jan 24 23:07:46 2012 From: azurit at pobox.sk (azurIt) Date: Tue, 24 Jan 2012 23:07:46 +0100 Subject: [Soap-Python] rpclib regressions In-Reply-To: <4F1F29CD.3080700@arskom.com.tr> References: <20120124184311.C1FE9131@pobox.sk>, <4F1EF0DF.8020808@arskom.com.tr>, <20120124190602.94C75F25@pobox.sk>, <4F1EF47D.2000804@arskom.com.tr>, <20120124193318.3E7E28B6@pobox.sk>, <20120124224104.CBA7019B@pobox.sk> <4F1F29CD.3080700@arskom.com.tr> Message-ID: <20120124230746.EA4BB64E@pobox.sk> well, maybe you should change it everywhere so this won't happen in the future :) i would also change it to UTF-8 (uppercase), i saw few apps which doesn't like it lowercase too. azur ______________________________________________________________ > Od: "Burak Arslan" > Komu: azurIt > D?tum: 24.01.2012 22:59 > Predmet: Re: [Soap-Python] rpclib regressions > > CC: soap at python.org >On 01/24/12 23:41, azurIt wrote: >> Ok, i fixed it by replacing 'utf8' with 'utf-8' everywhere :) >> >> azur > >looks like this'd be enough: > >https://github.com/plq/rpclib/blob/master/src/rpclib/protocol/xml/_base.py#L176 > > >> >> >> ______________________________________________________________ >>> Od: "azurIt" >>> Komu: >>> D?tum: 24.01.2012 19:34 >>> Predmet: Re: [Soap-Python] rpclib regressions >>> >>> here is the request + response, no errors was logged on server side and data in XML looks ok (so the problem is with suds + SAX, it just cannot parse the XML): >>> >>> >>> >>> >>> >>> >>> censored >>> >>> nic >>> >>> censored >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> ..censored data.. >>> >>> ok >>> >>> >>> >>> >>> >>> >>> >>> >>> look here: >>> encoding='utf8' >>> >>> earlier versions of rpclib were sending 'utf-8'. >>> >>> >>> >>> ______________________________________________________________ >>>> Od: "Burak Arslan" >>>> Komu: azurIt >>>> D?tum: 24.01.2012 19:12 >>>> Predmet: Re: [Soap-Python] rpclib regressions >>>> >>>> CC: soap at python.org >>>> On 01/24/12 20:06, azurIt wrote: >>>>> the last working version is 2.4.7, all other are raising that strange SAX error. here is complete traceback (from 2.5.0): >>>>> >>>>> >>>>> Traceback (most recent call last): >>>>> File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/application.py", line 102, in process_request >>>>> ctx.service_class.event_manager.fire_event('method_call', ctx) >>>>> File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/_base.py", line 308, in fire_event >>>>> handler(ctx) >>>>> File "", line 3309, in run_before >>>>> perm = lib._check_token(ctx.in_object[0], ctx.descriptor.udp["perms"]) >>>>> File "", line 188, in _check_token >>>>> return directorlib.call.check_token(token, perms, config.backend_name) >>>>> File "", line 88, in __call__ >>>>> result = caller(*args2) >>>>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 542, in __call__ >>>>> return client.invoke(args, kwargs) >>>>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 602, in invoke >>>>> result = self.send(soapenv) >>>>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 643, in send >>>>> result = self.succeeded(binding, reply.message) >>>>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 678, in succeeded >>>>> reply, result = binding.get_reply(self.method, reply) >>>>> File "build/bdist.linux-x86_64/egg/suds/bindings/binding.py", line 145, in get_reply >>>>> replyroot = sax.parse(string=reply) >>>>> File "build/bdist.linux-x86_64/egg/suds/sax/parser.py", line 136, in parse >>>>> sax.parse(source) >>>>> File "/usr/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse >>>>> xmlreader.IncrementalParser.parse(self, source) >>>>> File "/usr/lib/python2.5/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse >>>>> self.feed(buffer) >>>>> File "/usr/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line 220, in feed >>>>> self._err_handler.fatalError(exc) >>>>> File "/usr/lib/python2.5/site-packages/_xmlplus/sax/handler.py", line 38, in fatalError >>>>> raise exception >>>>> SAXParseException::1:30: unknown encoding >>>>> >>>>> >>>>> >>>>> Error is raising from function, which is doing checking of permissions on remote server (via SOAP call). It is sending 'and' and 'or' xml elements, maybe this is the problem (the element names). But it was working fine until 2.5.0. >>>> >>>> all right, this is a suds backtrace. you're making a suds request from a >>>> rpclib event, which tanks in a place completely irrelevant with rpclib. >>>> you should either provide me information from the other side of the >>>> communication, or the xml traffic itself. >>>> >>>> >>>> >>>>> >>>>> ______________________________________________________________ >>>>>> Od: "Burak Arslan" >>>>>> Komu: azurIt >>>>>> D?tum: 24.01.2012 18:56 >>>>>> Predmet: Re: [Soap-Python] rpclib regressions >>>>>> >>>>>> CC: soap at python.org >>>>>> On 01/24/12 19:43, azurIt wrote: >>>>>>> Hi, >>>>>>> >>>>>>> i just tried to upgrade to 2.5.2 (from 2.4.5) and i come accross HUGE problems. first of all, there is no 'soft' validation in protocol/xml/_base.py so this: >>>>>>> in_protocol=Soap11(validator='soft') >>>>>>> >>>>>>> was raising ValueError. I fixed it in code and strange things started to happend then: >>>>>>> SAXParseException::1:30: unknown encoding >>>>>>> >>>>>>> i wasn't able to fix this and downgraded back to 2.4.5 :( >>>>>>> >>>>>> hi azur. >>>>>> >>>>>> i fixed the ValueError with validator='soft' in my personal fork. but i >>>>>> don't understand what throws the encoding error. can you provide some >>>>>> code that exhibits the problem? >>>>>> >>>>>> thanks >>>>>> burak >>>>>> >>>>>> >>>>>> >>>>> _______________________________________________ >>>>> Soap mailing list >>>>> Soap at python.org >>>>> http://mail.python.org/mailman/listinfo/soap >>>> >>> _______________________________________________ >>> Soap mailing list >>> Soap at python.org >>> http://mail.python.org/mailman/listinfo/soap >>> >> _______________________________________________ >> Soap mailing list >> Soap at python.org >> http://mail.python.org/mailman/listinfo/soap > > From azurit at pobox.sk Fri Jan 27 07:27:59 2012 From: azurit at pobox.sk (azurIt) Date: Fri, 27 Jan 2012 07:27:59 +0100 Subject: [Soap-Python] rpclib accessing main site error Message-ID: <20120127072759.485DB7D8@pobox.sk> Hi, i'm getting this traceback when accessing main address or my app _without_ the '/?wsdl' part (everything is ok when accessing wsdl): Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/server/wsgi.py", line 173, in __call__ return self._verb_handlers[verb](req_env, start_response) File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/server/wsgi.py", line 237, in handle_rpc initial_ctx.in_string, in_string_charset = reconstruct_wsgi_request(req_env) File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/server/wsgi.py", line 70, in reconstruct_wsgi_request content_type = cgi.parse_header(http_env.get("CONTENT_TYPE")) File "/usr/lib/python2.5/cgi.py", line 339, in parse_header plist = [x.strip() for x in line.split(';')] AttributeError: 'NoneType' object has no attribute 'split' azur From kr at zimmer428.net Fri Jan 27 07:54:14 2012 From: kr at zimmer428.net (Kristian Rink) Date: Fri, 27 Jan 2012 07:54:14 +0100 Subject: [Soap-Python] client for wsdl-driven development using authentication headers? Message-ID: <20120127075414.2147c549@node428> Folks; I'm about to connect to a remote SOAP service that provides a rather verbose WSDL. According to both the service reference documentation and to the stubs my Java SOAP framework managed to generate, there is a "session header" information that needs to be added to the soap-header section of any outbound message more or less like this: ae6e822bc85c1c182f29bac9bb99f8e5 In the Java client classes, this happens in a rather straightforward way (by having an additional "sessionHeader" parameter in each of the remote function calls in the stub classes), but I am unsure how to achieve this effect with any of the Python frameworks out there. So to ask: Inspirations on that, anyone? Any input, and be that just pointers to things worth reading, highly appreciated! :) Cheers, Kristian From stepankk at gmail.com Fri Jan 27 08:40:50 2012 From: stepankk at gmail.com (Stepan Kornyakov) Date: Fri, 27 Jan 2012 11:40:50 +0400 Subject: [Soap-Python] client for wsdl-driven development using authentication headers? In-Reply-To: <20120127075414.2147c549@node428> References: <20120127075414.2147c549@node428> Message-ID: Hello, Kristian Most SOAP clients allow you to set headers for a client instance, for example, take a look at how it is used with suds: https://fedorahosted.org/suds/wiki/Documentation#SOAPHEADERS Best regards, Stepan. 2012/1/27 Kristian Rink : > Folks; > > I'm about to connect to a remote SOAP service that provides a rather > verbose WSDL. According to both the service reference documentation and > to the stubs my Java SOAP framework managed to generate, there is a > "session header" information that needs to be added to the soap-header > section of any outbound message more or less like this: > > > ? ? ? ? > ? ? ? ? ? ? ? ?ae6e822bc85c1c182f29bac9bb99f8e5 > ? ? ? ? > > > In the Java client classes, this happens in a rather straightforward > way (by having an additional "sessionHeader" parameter in each of the > remote function calls in the stub classes), but I am unsure how to > achieve this effect with any of the Python frameworks out there. So to > ask: Inspirations on that, anyone? Any input, and be that just pointers > to things worth reading, highly appreciated! :) > > Cheers, > Kristian > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap From reingart at gmail.com Fri Jan 27 23:01:27 2012 From: reingart at gmail.com (Mariano Reingart) Date: Fri, 27 Jan 2012 19:01:27 -0300 Subject: [Soap-Python] client for wsdl-driven development using authentication headers? In-Reply-To: <20120127075414.2147c549@node428> References: <20120127075414.2147c549@node428> Message-ID: On Fri, Jan 27, 2012 at 3:54 AM, Kristian Rink wrote: > Folks; > > I'm about to connect to a remote SOAP service that provides a rather > verbose WSDL. According to both the service reference documentation and > to the stubs my Java SOAP framework managed to generate, there is a > "session header" information that needs to be added to the soap-header > section of any outbound message more or less like this: > > > > ae6e822bc85c1c182f29bac9bb99f8e5 > > > > In the Java client classes, this happens in a rather straightforward > way (by having an additional "sessionHeader" parameter in each of the > remote function calls in the stub classes), but I am unsure how to > achieve this effect with any of the Python frameworks out there. So to > ask: Inspirations on that, anyone? Any input, and be that just pointers > to things worth reading, highly appreciated! :) > > > With latest versions of PySimpleSoap, you can send the headers as python dicts (if using wsdl): http://code.google.com/p/pysimplesoap/wiki/SoapClient#WSDL_SOAP_Headers_Example You can send also raw xml using SimpleXMLElement (no need of wsdl, much like your sessionHeader example parameter in each remote call): http://code.google.com/p/pysimplesoap/wiki/SoapClient#Raw/arbitrary_SOAP_Header_Example Best regards, Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From burak.arslan at arskom.com.tr Sat Jan 28 18:13:57 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Sat, 28 Jan 2012 19:13:57 +0200 Subject: [Soap-Python] rpclib accessing main site error In-Reply-To: <20120127072759.485DB7D8@pobox.sk> References: <20120127072759.485DB7D8@pobox.sk> Message-ID: <4F242CD5.60005@arskom.com.tr> On 01/27/12 08:27, azurIt wrote: > Hi, > > i'm getting this traceback when accessing main address or my app _without_ the '/?wsdl' part (everything is ok when accessing wsdl): > > Traceback (most recent call last): > File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/server/wsgi.py", line 173, in __call__ > return self._verb_handlers[verb](req_env, start_response) > File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/server/wsgi.py", line 237, in handle_rpc > initial_ctx.in_string, in_string_charset = reconstruct_wsgi_request(req_env) > File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/server/wsgi.py", line 70, in reconstruct_wsgi_request > content_type = cgi.parse_header(http_env.get("CONTENT_TYPE")) > File "/usr/lib/python2.5/cgi.py", line 339, in parse_header > plist = [x.strip() for x in line.split(';')] > AttributeError: 'NoneType' object has no attribute 'split' hey azur, i'm a little bit busy nowadays, would you mind filing an issue so i that don't forget this? thanks burak > azur > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap From azurit at pobox.sk Sat Jan 28 18:35:21 2012 From: azurit at pobox.sk (azurIt) Date: Sat, 28 Jan 2012 18:35:21 +0100 Subject: [Soap-Python] rpclib accessing main site error In-Reply-To: <4F242CD5.60005@arskom.com.tr> References: <20120127072759.485DB7D8@pobox.sk> <4F242CD5.60005@arskom.com.tr> Message-ID: <20120128183521.75C464BC@pobox.sk> done :) ______________________________________________________________ > Od: "Burak Arslan" > Komu: azurIt > D?tum: 28.01.2012 18:14 > Predmet: Re: [Soap-Python] rpclib accessing main site error > > CC: soap at python.org >On 01/27/12 08:27, azurIt wrote: >> Hi, >> >> i'm getting this traceback when accessing main address or my app _without_ the '/?wsdl' part (everything is ok when accessing wsdl): >> >> Traceback (most recent call last): >> File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/server/wsgi.py", line 173, in __call__ >> return self._verb_handlers[verb](req_env, start_response) >> File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/server/wsgi.py", line 237, in handle_rpc >> initial_ctx.in_string, in_string_charset = reconstruct_wsgi_request(req_env) >> File "/usr/lib/python2.5/site-packages/rpclib-2.5.0_beta-py2.5.egg/rpclib/server/wsgi.py", line 70, in reconstruct_wsgi_request >> content_type = cgi.parse_header(http_env.get("CONTENT_TYPE")) >> File "/usr/lib/python2.5/cgi.py", line 339, in parse_header >> plist = [x.strip() for x in line.split(';')] >> AttributeError: 'NoneType' object has no attribute 'split' > >hey azur, > >i'm a little bit busy nowadays, would you mind filing an issue so i that >don't forget this? > >thanks >burak > > >> azur >> _______________________________________________ >> Soap mailing list >> Soap at python.org >> http://mail.python.org/mailman/listinfo/soap > > From jpc at alumni.rice.edu Thu Jan 26 06:58:17 2012 From: jpc at alumni.rice.edu (John Campbell) Date: Thu, 26 Jan 2012 05:58:17 -0000 Subject: [Soap-Python] setting headers in pysimplesoap Message-ID: Hi all, For those using pysimplesoap, I'm in need of help in understanding how to set header vars. I'm new to SOAP in Python, maybe it's simple. I have to place the session id in the header on each client call. Using this same WSDL (https://api.clarizen.com/v1.0/Clarizen.svc) in PHP SoapClient, I would do the following: $header[] = new SoapHeader("http://clarizen.com/api", 'Session', array ("ID" => $sessionId)); $client->__setSoapHeaders($header); This generates: some guid ns1="http://clarizen.com/api", btw. In pysimplesoap, I can successfully login and get the session id. Reading some examples, it seems that the header can be added as a normal dict entry. But I'm not having luck. session = response['LoginResult']['SessionId'] client['Session'] = { 'ID' : session } This does not work and leaves me with an empty . There is obviously something wrong and I didn't use the namespace anywhere which seems wrong. Any help would be appreciated. take care, jpc -------------- next part -------------- An HTML attachment was scrubbed... URL: