From burak.arslan at arskom.com.tr Wed Apr 4 10:20:40 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Wed, 04 Apr 2012 11:20:40 +0300 Subject: [Soap-Python] Customizing rpclib with types that modify the schema In-Reply-To: <4F7B0E73.30306@arskom.com.tr> References: <359299370.20120329193224@gmail.com> <4F74E8F1.8030306@arskom.com.tr> <4F74EA5A.3090801@arskom.com.tr> <4F7B0E73.30306@arskom.com.tr> Message-ID: <4F7C0458.5010209@arskom.com.tr> On 04/03/12 17:51, Burak Arslan wrote: > hi alex, > > here's a test case for us to work on: > > https://gist.github.com/2292401 > > seems to be working with my latest patch (which fixed some other > problem) could you try to reproduce your issue using that one? > > best, > burak > > > On 04/03/12 13:41, Alex wrote: >> Burak, thank you for the feedback. >> >> >>>> I skimmed the spec very quick and from what I gather, you want an >>>> tag instead of an tag inside the >>>> (...) >>>> hierarchy, right? (correct me if i'm >>>> wrong here.) >> Yes. >> >> >> It took me some time to "begin to begin to get started", because I >> wasn't familiar with git. After dealing with that, I set up a >> development environment that would allow me to tinker with the code >> you provided. >> >> >> For now, I just want to deal with one piece of the puzzle - produce >> the schema that looks exactly like the spec says. >> >> This is what I do (based on the example from your last email): >> >> class SomeType(ComplexModel): >> arbitraryElement = AnyXml( >> schema_tag='{%s}any' % rpclib.const.xml_ns.xsd, >> namespace='##other', >> process_contents='lax') >> >> >> This is what I get: >> >> >> >> > minOccurs="0" nillable="true" /> >> >> >> >> >> What I expected: >> >> >> >> >> >> >> >> >> >> Having examined the diff, I saw that it was supposed to work, at least >> partially. This is based on the fact that >> \interface\xml_schema\model\complex.py does verify whether the type is >> AnyXml, and it attempts to set processContents, if it is present in >> the declaration. >> >> I set a breakpoint in the beginning of complex_add, but the breakpoint >> is never hit. For some reason, the function is never called, thus the >> schema is generated in a regular fashion. >> >> >> There are no calls to complex_add anywhere in the code, but the >> function is set as a handler for ComplexModelBase. >> >> As you can see in the definition above, SomeType is derived from >> ComplexModel, which is derived from ComplexModelBase. I cannot make >> sense of it, everything looks right, but not quite. This is where I >> got stuck. >> >> >> Can you shed some light on this? >> >> >> >> >> I created a new RST file that reflects what I know so far. There's not >> much content yet, just two paragraphs :-) Questions related to this >> part: >> 1. what's the most appropriate name for this section? I chose >> "Creating advanced custom types", but this tutorial is XML-centric, so >> that should be reflected somewhere. >> 2. should this be a new file, or should I extend an existing one >> [which one]? >> 3. are there any parts in the manual one should read before trying to >> write such patches? I've read everything that seems to be related, but >> my vision is still blurry. Maybe I missed something? >> >> >> Alex > From azurit at pobox.sk Thu Apr 5 18:11:59 2012 From: azurit at pobox.sk (azurIt) Date: Thu, 05 Apr 2012 18:11:59 +0200 Subject: [Soap-Python] rpclib - dynamic key names Message-ID: <20120405181159.C4A807A9@pobox.sk> Hi, any hints how can i return data structure with dynamic key names (so they cannot be specified in type definition)? For example, something like this: data = {} for i in xrange(1000): data["a%s" % i] = u"something" return data without creating type: class test(ComplexModel): a0 = Unicode a1 = Unicode ... a999 = Unicode Thnx! azur From chris at sydneysys.com Thu Apr 5 20:44:56 2012 From: chris at sydneysys.com (Chris Austin) Date: Thu, 5 Apr 2012 13:44:56 -0500 Subject: [Soap-Python] rpclib - dynamic key names In-Reply-To: <20120405181159.C4A807A9@pobox.sk> References: <20120405181159.C4A807A9@pobox.sk> Message-ID: <38A3E029-3C3D-4FE0-BE17-B9C42401695C@sydneysys.com> Would something like the following work for you? >>> from rpclib.model.complex import ComplexModel >>> class A(ComplexModel): ... def foo(self): ... return "bar" ... ... ... >>> from rpclib.model.primitive import Unicode >>> for x in xrange(5): ... setattr(A, "u%s" % x, Unicode) ... ... >>> dir(A) ['Annotations', 'Attributes', 'Empty', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__getitem__', '__hash__', '__init__', '__len__', '__metaclass__', '__module__', '__namespace__', '__new__', '__reduce__', '__reduce_ex__', '__rep r__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__type_name__', '__weakref__', '_force_own_namespace', '_s_customize', '_type_info', 'alias', 'customize', 'foo', 'from_string', 'get_deserialization_instance', 'get_flat_type_info', 'get_members_pairs', 'get_namespace', 'get_namespace_prefix', 'get_serialization_instance', 'get_simple_type_info', 'get_type_name', 'get_type_name_ns', 'is_default', 'produce', 'resolve_namespace', 'to_dict', 'to_string', 'to_string_iterable', 'u0', 'u1', 'u2', 'u3', 'u4', 'validate_nativ e', 'validate_string'] >>> A.u0 >>> On Apr 5, 2012, at 11:11 AM, azurIt wrote: > > Hi, > > any hints how can i return data structure with dynamic key names (so they cannot be specified in type definition)? For example, something like this: > > data = {} > for i in xrange(1000): > data["a%s" % i] = u"something" > return data > > > without creating type: > > class test(ComplexModel): > a0 = Unicode > a1 = Unicode > ... > a999 = Unicode > > > Thnx! > > azur > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap Chris Austin chris at sydneysys.com From azurit at pobox.sk Thu Apr 5 21:01:41 2012 From: azurit at pobox.sk (azurIt) Date: Thu, 05 Apr 2012 21:01:41 +0200 Subject: [Soap-Python] rpclib - dynamic key names In-Reply-To: <38A3E029-3C3D-4FE0-BE17-B9C42401695C@sydneysys.com> References: <20120405181159.C4A807A9@pobox.sk> <38A3E029-3C3D-4FE0-BE17-B9C42401695C@sydneysys.com> Message-ID: <20120405210141.70223108@pobox.sk> I'm not having problems with creating such an object but i don't know how to return it via SOAP. What should i set as a return value to @srpc? ______________________________________________________________ > Od: "Chris Austin" > Komu: azurIt > D?tum: 05.04.2012 20:45 > Predmet: Re: [Soap-Python] rpclib - dynamic key names > > CC: soap at python.org >Would something like the following work for you? > >>>> from rpclib.model.complex import ComplexModel >>>> class A(ComplexModel): >... def foo(self): >... return "bar" >... >... >... >>>> from rpclib.model.primitive import Unicode >>>> for x in xrange(5): >... setattr(A, "u%s" % x, Unicode) >... >... >>>> dir(A) >['Annotations', 'Attributes', 'Empty', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__getitem__', '__hash__', '__init__', '__len__', '__metaclass__', '__module__', '__namespace__', '__new__', '__reduce__', '__reduce_ex__', '__rep >r__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__type_name__', '__weakref__', '_force_own_namespace', '_s_customize', '_type_info', 'alias', 'customize', 'foo', 'from_string', 'get_deserialization_instance', 'get_flat_type_info', 'get_members_pairs', > 'get_namespace', 'get_namespace_prefix', 'get_serialization_instance', 'get_simple_type_info', 'get_type_name', 'get_type_name_ns', 'is_default', 'produce', 'resolve_namespace', 'to_dict', 'to_string', 'to_string_iterable', 'u0', 'u1', 'u2', 'u3', 'u4', 'validate_nativ >e', 'validate_string'] >>>> A.u0 > >>>> > > >On Apr 5, 2012, at 11:11 AM, azurIt wrote: > >> >> Hi, >> >> any hints how can i return data structure with dynamic key names (so they cannot be specified in type definition)? For example, something like this: >> >> data = {} >> for i in xrange(1000): >> data["a%s" % i] = u"something" >> return data >> >> >> without creating type: >> >> class test(ComplexModel): >> a0 = Unicode >> a1 = Unicode >> ... >> a999 = Unicode >> >> >> Thnx! >> >> azur >> _______________________________________________ >> Soap mailing list >> Soap at python.org >> http://mail.python.org/mailman/listinfo/soap > >Chris Austin >chris at sydneysys.com > > > > From burak.arslan at arskom.com.tr Thu Apr 5 23:35:23 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Fri, 06 Apr 2012 00:35:23 +0300 Subject: [Soap-Python] rpclib - dynamic key names In-Reply-To: <20120405210141.70223108@pobox.sk> References: <20120405181159.C4A807A9@pobox.sk> <38A3E029-3C3D-4FE0-BE17-B9C42401695C@sydneysys.com> <20120405210141.70223108@pobox.sk> Message-ID: <4F7E101B.4000405@arskom.com.tr> On 04/05/12 22:01, azurIt wrote: > I'm not having problems with creating such an object but i don't know how to return it via SOAP. What should i set as a return value to @srpc? why not just use the AnyDict or AnyXml types? > > > ______________________________________________________________ >> Od: "Chris Austin" >> Komu: azurIt >> D?tum: 05.04.2012 20:45 >> Predmet: Re: [Soap-Python] rpclib - dynamic key names >> >> CC: soap at python.org >> Would something like the following work for you? >> >>>>> from rpclib.model.complex import ComplexModel >>>>> class A(ComplexModel): >> ... def foo(self): >> ... return "bar" >> ... >> ... >> ... >>>>> from rpclib.model.primitive import Unicode >>>>> for x in xrange(5): >> ... setattr(A, "u%s" % x, Unicode) >> ... >> ... >>>>> dir(A) >> ['Annotations', 'Attributes', 'Empty', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__getitem__', '__hash__', '__init__', '__len__', '__metaclass__', '__module__', '__namespace__', '__new__', '__reduce__', '__reduce_ex__', '__rep >> r__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__type_name__', '__weakref__', '_force_own_namespace', '_s_customize', '_type_info', 'alias', 'customize', 'foo', 'from_string', 'get_deserialization_instance', 'get_flat_type_info', 'get_members_pairs', >> 'get_namespace', 'get_namespace_prefix', 'get_serialization_instance', 'get_simple_type_info', 'get_type_name', 'get_type_name_ns', 'is_default', 'produce', 'resolve_namespace', 'to_dict', 'to_string', 'to_string_iterable', 'u0', 'u1', 'u2', 'u3', 'u4', 'validate_nativ >> e', 'validate_string'] >>>>> A.u0 >> >> >> On Apr 5, 2012, at 11:11 AM, azurIt wrote: >> >>> Hi, >>> >>> any hints how can i return data structure with dynamic key names (so they cannot be specified in type definition)? For example, something like this: >>> >>> data = {} >>> for i in xrange(1000): >>> data["a%s" % i] = u"something" >>> return data >>> >>> >>> without creating type: >>> >>> class test(ComplexModel): >>> a0 = Unicode >>> a1 = Unicode >>> ... >>> a999 = Unicode >>> >>> >>> Thnx! >>> >>> azur >>> _______________________________________________ >>> Soap mailing list >>> Soap at python.org >>> http://mail.python.org/mailman/listinfo/soap >> Chris Austin >> chris at sydneysys.com >> >> >> >> > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap From azurit at pobox.sk Fri Apr 6 00:41:23 2012 From: azurit at pobox.sk (azurIt) Date: Fri, 06 Apr 2012 00:41:23 +0200 Subject: [Soap-Python] rpclib - dynamic key names In-Reply-To: <4F7E101B.4000405@arskom.com.tr> References: <20120405181159.C4A807A9@pobox.sk>, <38A3E029-3C3D-4FE0-BE17-B9C42401695C@sydneysys.com>, <20120405210141.70223108@pobox.sk> <4F7E101B.4000405@arskom.com.tr> Message-ID: <20120406004123.0C5845B4@pobox.sk> Burak, i tried that AnyDict but got an exception: Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/rpclib-2.7.0_beta-py2.6.egg/rpclib/server/wsgi.py", line 200, in __call__ return self._verb_handlers[verb](req_env, start_response) File "/usr/local/lib/python2.6/dist-packages/rpclib-2.7.0_beta-py2.6.egg/rpclib/server/wsgi.py", line 292, in handle_rpc self.get_out_string(ctx) File "/usr/local/lib/python2.6/dist-packages/rpclib-2.7.0_beta-py2.6.egg/rpclib/server/_base.py", line 112, in get_out_string message=self.app.out_protocol.RESPONSE) File "/usr/local/lib/python2.6/dist-packages/rpclib-2.7.0_beta-py2.6.egg/rpclib/protocol/soap/soap11.py", line 316, in serialize self.app.interface.get_tns(), out_body_doc) File "/usr/local/lib/python2.6/dist-packages/rpclib-2.7.0_beta-py2.6.egg/rpclib/protocol/xml/_base.py", line 134, in to_parent_element handler(self, cls, value, tns, parent_elt, * args, ** kwargs) File "/usr/local/lib/python2.6/dist-packages/rpclib-2.7.0_beta-py2.6.egg/rpclib/protocol/xml/model/_base.py", line 38, in wrapper func(prot, cls, value, tns, parent_elt, *args, **kwargs) File "/usr/local/lib/python2.6/dist-packages/rpclib-2.7.0_beta-py2.6.egg/rpclib/protocol/xml/model/complex.py", line 64, in complex_to_parent_element get_members_etree(prot, cls, inst, element) File "/usr/local/lib/python2.6/dist-packages/rpclib-2.7.0_beta-py2.6.egg/rpclib/protocol/xml/model/complex.py", line 53, in get_members_etree prot.to_parent_element(v, subvalue, cls.get_namespace(), parent, k) File "/usr/local/lib/python2.6/dist-packages/rpclib-2.7.0_beta-py2.6.egg/rpclib/protocol/xml/_base.py", line 134, in to_parent_element handler(self, cls, value, tns, parent_elt, * args, ** kwargs) File "/usr/local/lib/python2.6/dist-packages/rpclib-2.7.0_beta-py2.6.egg/rpclib/protocol/xml/model/_base.py", line 38, in wrapper func(prot, cls, value, tns, parent_elt, *args, **kwargs) File "/usr/local/lib/python2.6/dist-packages/rpclib-2.7.0_beta-py2.6.egg/rpclib/protocol/xml/model/primitive.py", line 48, in dict_to_parent_element dict_to_etree(value, e) File "/usr/local/lib/python2.6/dist-packages/rpclib-2.7.0_beta-py2.6.egg/rpclib/util/etreeconv.py", line 60, in dict_to_etree dict_to_etree(v, child) File "/usr/local/lib/python2.6/dist-packages/rpclib-2.7.0_beta-py2.6.egg/rpclib/util/etreeconv.py", line 55, in dict_to_etree if len(v) == 0: TypeError: object of type 'NoneType' has no len() ______________________________________________________________ > Od: "Burak Arslan" > Komu: azurIt > D?tum: 05.04.2012 23:35 > Predmet: Re: [Soap-Python] rpclib - dynamic key names > > CC: soap at python.org >On 04/05/12 22:01, azurIt wrote: >> I'm not having problems with creating such an object but i don't know how to return it via SOAP. What should i set as a return value to @srpc? > >why not just use the AnyDict or AnyXml types? > >> >> >> ______________________________________________________________ >>> Od: "Chris Austin" >>> Komu: azurIt >>> D?tum: 05.04.2012 20:45 >>> Predmet: Re: [Soap-Python] rpclib - dynamic key names >>> >>> CC: soap at python.org >>> Would something like the following work for you? >>> >>>>>> from rpclib.model.complex import ComplexModel >>>>>> class A(ComplexModel): >>> ... def foo(self): >>> ... return "bar" >>> ... >>> ... >>> ... >>>>>> from rpclib.model.primitive import Unicode >>>>>> for x in xrange(5): >>> ... setattr(A, "u%s" % x, Unicode) >>> ... >>> ... >>>>>> dir(A) >>> ['Annotations', 'Attributes', 'Empty', '__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__getitem__', '__hash__', '__init__', '__len__', '__metaclass__', '__module__', '__namespace__', '__new__', '__reduce__', '__reduce_ex__', '__rep >>> r__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__type_name__', '__weakref__', '_force_own_namespace', '_s_customize', '_type_info', 'alias', 'customize', 'foo', 'from_string', 'get_deserialization_instance', 'get_flat_type_info', 'get_members_pairs', >>> 'get_namespace', 'get_namespace_prefix', 'get_serialization_instance', 'get_simple_type_info', 'get_type_name', 'get_type_name_ns', 'is_default', 'produce', 'resolve_namespace', 'to_dict', 'to_string', 'to_string_iterable', 'u0', 'u1', 'u2', 'u3', 'u4', 'validate_nativ >>> e', 'validate_string'] >>>>>> A.u0 >>> >>> >>> On Apr 5, 2012, at 11:11 AM, azurIt wrote: >>> >>>> Hi, >>>> >>>> any hints how can i return data structure with dynamic key names (so they cannot be specified in type definition)? For example, something like this: >>>> >>>> data = {} >>>> for i in xrange(1000): >>>> data["a%s" % i] = u"something" >>>> return data >>>> >>>> >>>> without creating type: >>>> >>>> class test(ComplexModel): >>>> a0 = Unicode >>>> a1 = Unicode >>>> ... >>>> a999 = Unicode >>>> >>>> >>>> Thnx! >>>> >>>> azur >>>> _______________________________________________ >>>> Soap mailing list >>>> Soap at python.org >>>> http://mail.python.org/mailman/listinfo/soap >>> Chris Austin >>> chris at sydneysys.com >>> >>> >>> >>> >> _______________________________________________ >> Soap mailing list >> Soap at python.org >> http://mail.python.org/mailman/listinfo/soap > > From burak.arslan at arskom.com.tr Fri Apr 6 11:25:37 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Fri, 06 Apr 2012 12:25:37 +0300 Subject: [Soap-Python] rpclib - dynamic key names In-Reply-To: <20120406004123.0C5845B4@pobox.sk> References: <20120405181159.C4A807A9@pobox.sk>, <38A3E029-3C3D-4FE0-BE17-B9C42401695C@sydneysys.com>, <20120405210141.70223108@pobox.sk> <4F7E101B.4000405@arskom.com.tr> <20120406004123.0C5845B4@pobox.sk> Message-ID: <4F7EB691.4000504@arskom.com.tr> On 04/06/12 01:41, azurIt wrote: > Burak, i tried that AnyDict but got an exception: in this case, the strack trace does not have enough information to track down the cause for this error. what's the data that you put in? can you please file an issue and modify one of the examples to reproduce this bug and attach it? i'll see what i can do. best, burak From azurit at pobox.sk Fri Apr 6 12:04:42 2012 From: azurit at pobox.sk (azurIt) Date: Fri, 06 Apr 2012 12:04:42 +0200 Subject: [Soap-Python] rpclib - dynamic key names In-Reply-To: <4F7EB691.4000504@arskom.com.tr> References: <20120405181159.C4A807A9@pobox.sk>, <38A3E029-3C3D-4FE0-BE17-B9C42401695C@sydneysys.com>, <20120405210141.70223108@pobox.sk>, <4F7E101B.4000405@arskom.com.tr>, <20120406004123.0C5845B4@pobox.sk> <4F7EB691.4000504@arskom.com.tr> Message-ID: <20120406120442.C7DF541B@pobox.sk> Problem is only occuring when i'm returning None, i will file a bug report. ______________________________________________________________ > Od: "Burak Arslan" > Komu: azurIt > D?tum: 06.04.2012 11:25 > Predmet: Re: [Soap-Python] rpclib - dynamic key names > > CC: soap at python.org >On 04/06/12 01:41, azurIt wrote: >> Burak, i tried that AnyDict but got an exception: > > >in this case, the strack trace does not have enough information to track >down the cause for this error. what's the data that you put in? > >can you please file an issue and modify one of the examples to reproduce >this bug and attach it? i'll see what i can do. > >best, >burak > From thomas.akakpo at gmail.com Fri Apr 13 10:25:08 2012 From: thomas.akakpo at gmail.com (Thomas AYIH-AKAKPO) Date: Fri, 13 Apr 2012 11:25:08 +0300 Subject: [Soap-Python] UnicodeDecode error while passing parameters with french letters Message-ID: <4F87E2E4.4050702@gmail.com> Hello all, I have an issue while passing parameters with french letters using soaplib 2.0 Let's take a simple "Hello" function @soap(String, _returns=String): def sayhello(self,name): return "Hello %s" % name >>> from suds.client import Client >>> wsdl = Client(url_to_wsdl) >>> wsdl.service.sayhello('Thomas') Hello Thomas >>> wsdl.service.sayhello('J?r?me') UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128) I'm quite embarassed with this, and have no idea where to look at. The error isn't related to the client, as some other clients receive the same error. Anyone got any hint? I didn't browse all the archives of this list, so forgive me if I'm repeating an issue. If so, please redirect me to the right one (while of course I search on my own side :) ). Thank you for any further answer. -- Thomas From azurit at pobox.sk Fri Apr 13 10:30:04 2012 From: azurit at pobox.sk (azurIt) Date: Fri, 13 Apr 2012 10:30:04 +0200 Subject: [Soap-Python] UnicodeDecode error while passing parameters withfrench letters In-Reply-To: <4F87E2E4.4050702@gmail.com> References: <4F87E2E4.4050702@gmail.com> Message-ID: <20120413103004.CC182950@pobox.sk> Hi, use 'Unicode' type (don't forget to import it first): @soap(Unicode, _returns=Unicode): def sayhello(self,name): return "Hello %s" % name azur ______________________________________________________________ > Od: "Thomas AYIH-AKAKPO" > Komu: > D?tum: 13.04.2012 10:25 > Predmet: [Soap-Python] UnicodeDecode error while passing parameters withfrench letters > >Hello all, > >I have an issue while passing parameters with french letters using soaplib 2.0 > >Let's take a simple "Hello" function > >@soap(String, _returns=String): >def sayhello(self,name): > return "Hello %s" % name > >>>> from suds.client import Client >>>> wsdl = Client(url_to_wsdl) >>>> wsdl.service.sayhello('Thomas') >Hello Thomas >>>> wsdl.service.sayhello('J?r?me') >UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128) > >I'm quite embarassed with this, and have no idea where to look at. >The error isn't related to the client, as some other clients receive the same error. >Anyone got any hint? > >I didn't browse all the archives of this list, so forgive me if I'm repeating an issue. >If so, please redirect me to the right one (while of course I search on my own side :) ). > >Thank you for any further answer. > >-- >Thomas > >_______________________________________________ >Soap mailing list >Soap at python.org >http://mail.python.org/mailman/listinfo/soap > From thomas.akakpo at gmail.com Fri Apr 13 10:56:47 2012 From: thomas.akakpo at gmail.com (Thomas AYIH-AKAKPO) Date: Fri, 13 Apr 2012 11:56:47 +0300 Subject: [Soap-Python] UnicodeDecode error while passing parameters withfrench letters In-Reply-To: <20120413103004.CC182950@pobox.sk> References: <4F87E2E4.4050702@gmail.com> <20120413103004.CC182950@pobox.sk> Message-ID: <4F87EA4F.8090003@gmail.com> Le 13/04/2012 11:30, azurIt a ?crit : > Hi, > > use 'Unicode' type (don't forget to import it first): > > @soap(Unicode, _returns=Unicode): > def sayhello(self,name): > return "Hello %s" % name > > > azur > > > Hello, thanks for the advice. Unfortunately when I try "from soaplib.core.model.primitive import Unicode", I get an ImportError: cannot import name Unicode . Or am I importing from the wrong library? Thanks -- Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From azurit at pobox.sk Fri Apr 13 11:04:04 2012 From: azurit at pobox.sk (azurIt) Date: Fri, 13 Apr 2012 11:04:04 +0200 Subject: [Soap-Python] UnicodeDecode error while passing parameters withfrench letters In-Reply-To: <4F87EA4F.8090003@gmail.com> References: <4F87E2E4.4050702@gmail.com>, <20120413103004.CC182950@pobox.sk> <4F87EA4F.8090003@gmail.com> Message-ID: <20120413110404.D6F5E7EF@pobox.sk> Uninstall deprecated soaplib and install rpclib instead :) azur ______________________________________________________________ > Od: "Thomas AYIH-AKAKPO" > Komu: > D?tum: 13.04.2012 10:57 > Predmet: Re: [Soap-Python] UnicodeDecode error while passing parameters withfrench letters > >Le 13/04/2012 11:30, azurIt a ?crit : >> Hi, >> >> use 'Unicode' type (don't forget to import it first): >> >> @soap(Unicode, _returns=Unicode): >> def sayhello(self,name): >> return "Hello %s" % name >> >> >> azur >> >> >> > >Hello, thanks for the advice. >Unfortunately when I try "from soaplib.core.model.primitive import Unicode", >I get an ImportError: cannot import name Unicode . Or am I importing from the wrong >library? > >Thanks > >-- >Thomas > > > >---------- > >_______________________________________________ >Soap mailing list >Soap at python.org >http://mail.python.org/mailman/listinfo/soap > From thomas.akakpo at gmail.com Fri Apr 13 11:10:58 2012 From: thomas.akakpo at gmail.com (Thomas AYIH-AKAKPO) Date: Fri, 13 Apr 2012 12:10:58 +0300 Subject: [Soap-Python] UnicodeDecode error while passing parameters withfrench letters In-Reply-To: <20120413110404.D6F5E7EF@pobox.sk> References: <4F87E2E4.4050702@gmail.com>, <20120413103004.CC182950@pobox.sk> <4F87EA4F.8090003@gmail.com> <20120413110404.D6F5E7EF@pobox.sk> Message-ID: <4F87EDA2.4040400@gmail.com> Le 13/04/2012 12:04, azurIt a ?crit : > Uninstall deprecated soaplib and install rpclib instead :) > > azur > > Ok, I try that right away. But just to say so, I tried this: >>> import sys >>> sys.setdefaultencoding('utf-8') >>> wsdl.service.sayhello('J?r?me') Hello J?r?me Maybe it's wrong to accuse soaplib, but I'll also give a try to your solution. Thanks -- Thomas From azurit at pobox.sk Fri Apr 13 11:26:17 2012 From: azurit at pobox.sk (azurIt) Date: Fri, 13 Apr 2012 11:26:17 +0200 Subject: [Soap-Python] UnicodeDecode error while passing parameters withfrench letters In-Reply-To: <4F87EDA2.4040400@gmail.com> References: <4F87E2E4.4050702@gmail.com>, <20120413103004.CC182950@pobox.sk>, <4F87EA4F.8090003@gmail.com>, <20120413110404.D6F5E7EF@pobox.sk> <4F87EDA2.4040400@gmail.com> Message-ID: <20120413112617.46FC3AE5@pobox.sk> rpclib is a new version of soaplib (it was renamed), soaplib is already deprecated and NOT maintained. do not use it. azur ______________________________________________________________ > Od: "Thomas AYIH-AKAKPO" > Komu: > D?tum: 13.04.2012 11:11 > Predmet: Re: [Soap-Python] UnicodeDecode error while passing parameters withfrench letters > >Le 13/04/2012 12:04, azurIt a ?crit : >> Uninstall deprecated soaplib and install rpclib instead :) >> >> azur >> >> > >Ok, I try that right away. > >But just to say so, I tried this: > >>>> import sys >>>> sys.setdefaultencoding('utf-8') >>>> wsdl.service.sayhello('J?r?me') >Hello J?r?me > >Maybe it's wrong to accuse soaplib, but I'll also give a try to your solution. > >Thanks > >-- >Thomas > >_______________________________________________ >Soap mailing list >Soap at python.org >http://mail.python.org/mailman/listinfo/soap > From thomas.akakpo at gmail.com Fri Apr 13 15:37:18 2012 From: thomas.akakpo at gmail.com (Thomas AYIH-AKAKPO) Date: Fri, 13 Apr 2012 16:37:18 +0300 Subject: [Soap-Python] UnicodeDecode error while passing parameters withfrench letters In-Reply-To: <20120413112617.46FC3AE5@pobox.sk> References: <4F87E2E4.4050702@gmail.com>, <20120413103004.CC182950@pobox.sk>, <4F87EA4F.8090003@gmail.com>, <20120413110404.D6F5E7EF@pobox.sk> <4F87EDA2.4040400@gmail.com> <20120413112617.46FC3AE5@pobox.sk> Message-ID: <4F882C0E.7050303@gmail.com> Le 13/04/2012 12:26, azurIt a ?crit : > rpclib is a new version of soaplib (it was renamed), soaplib is already deprecated and NOT maintained. do not use it. > > azur > > > > Oh really? I didn't know soaplib was already deprecated. Though, I switched to rpclib and used the helloworld_soap example (https://github.com/arskom/rpclib/blob/master/examples/helloworld_soap.py) . By importing Unicode, and replacing String by this, it still didn't work. I still have to go by: >>> sys.setdefaultencoding('utf-8') I am starting to assume that the UTF-8 encoding should be done on the client side. Regards, -- Thomas From azurit at pobox.sk Fri Apr 13 15:47:31 2012 From: azurit at pobox.sk (azurIt) Date: Fri, 13 Apr 2012 15:47:31 +0200 Subject: [Soap-Python] UnicodeDecode error while passing parameters withfrench letters In-Reply-To: <4F882C0E.7050303@gmail.com> References: <4F87E2E4.4050702@gmail.com>, <20120413103004.CC182950@pobox.sk>, <4F87EA4F.8090003@gmail.com>, <20120413110404.D6F5E7EF@pobox.sk>, <4F87EDA2.4040400@gmail.com>, <20120413112617.46FC3AE5@pobox.sk> <4F882C0E.7050303@gmail.com> Message-ID: <20120413154731.2A0F8561@pobox.sk> This has probably something to do with your console encoding (try to NOT print the output). azur ______________________________________________________________ > Od: "Thomas AYIH-AKAKPO" > Komu: > D?tum: 13.04.2012 15:43 > Predmet: Re: [Soap-Python] UnicodeDecode error while passing parameters withfrench letters > >Le 13/04/2012 12:26, azurIt a ?crit : >> rpclib is a new version of soaplib (it was renamed), soaplib is already deprecated and NOT maintained. do not use it. >> >> azur >> >> >> >> > > >Oh really? I didn't know soaplib was already deprecated. > >Though, I switched to rpclib and used the helloworld_soap example >(https://github.com/arskom/rpclib/blob/master/examples/helloworld_soap.py) . > >By importing Unicode, and replacing String by this, it still didn't work. >I still have to go by: > >>>> sys.setdefaultencoding('utf-8') > >I am starting to assume that the UTF-8 encoding should be done >on the client side. > >Regards, > >-- >Thomas > >_______________________________________________ >Soap mailing list >Soap at python.org >http://mail.python.org/mailman/listinfo/soap > From burak.arslan at arskom.com.tr Fri Apr 13 16:17:36 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Fri, 13 Apr 2012 17:17:36 +0300 Subject: [Soap-Python] UnicodeDecode error while passing parameters withfrench letters In-Reply-To: <4F882C0E.7050303@gmail.com> References: <4F87E2E4.4050702@gmail.com>, <20120413103004.CC182950@pobox.sk>, <4F87EA4F.8090003@gmail.com>, <20120413110404.D6F5E7EF@pobox.sk> <4F87EDA2.4040400@gmail.com> <20120413112617.46FC3AE5@pobox.sk> <4F882C0E.7050303@gmail.com> Message-ID: <4F883580.1020309@arskom.com.tr> bonjour thomas, you did not send the full stack dump you're getting, but i suspect that's a suds error and not a soaplib/rpclib one. https://github.com/plq/rpclib/commit/16e1e7c26ab52840ad63e4d590b39fd98af39745 and this works: =================== #encoding: utf8 from suds.client import Client wsdl = Client('http://localhost:7789/?wsdl') print wsdl.service.say_hello(u'J?r?me', 5) =================== Note the unicode string literal. Best, Burak On 04/13/12 16:37, Thomas AYIH-AKAKPO wrote: > Le 13/04/2012 12:26, azurIt a ?crit : >> rpclib is a new version of soaplib (it was renamed), soaplib is >> already deprecated and NOT maintained. do not use it. >> >> azur >> >> >> >> > > > Oh really? I didn't know soaplib was already deprecated. > > Though, I switched to rpclib and used the helloworld_soap example > (https://github.com/arskom/rpclib/blob/master/examples/helloworld_soap.py) > . > > By importing Unicode, and replacing String by this, it still didn't work. > I still have to go by: > >>>> sys.setdefaultencoding('utf-8') > > I am starting to assume that the UTF-8 encoding should be done > on the client side. > > Regards, > From thomas.akakpo at gmail.com Fri Apr 13 16:52:22 2012 From: thomas.akakpo at gmail.com (Thomas AYIH-AKAKPO) Date: Fri, 13 Apr 2012 17:52:22 +0300 Subject: [Soap-Python] UnicodeDecode error while passing parameters withfrench letters In-Reply-To: <4F883580.1020309@arskom.com.tr> References: <4F87E2E4.4050702@gmail.com>, <20120413103004.CC182950@pobox.sk>, <4F87EA4F.8090003@gmail.com>, <20120413110404.D6F5E7EF@pobox.sk> <4F87EDA2.4040400@gmail.com> <20120413112617.46FC3AE5@pobox.sk> <4F882C0E.7050303@gmail.com> <4F883580.1020309@arskom.com.tr> Message-ID: <4F883DA6.1040702@gmail.com> Le 13/04/2012 17:17, Burak Arslan a ?crit : > > bonjour thomas, > > you did not send the full stack dump you're getting, but i suspect > that's a suds error and not a soaplib/rpclib one. > > https://github.com/plq/rpclib/commit/16e1e7c26ab52840ad63e4d590b39fd98af39745 > and this works: > > =================== > #encoding: utf8 > > from suds.client import Client > > wsdl = Client('http://localhost:7789/?wsdl') > print wsdl.service.say_hello(u'J?r?me', 5) > =================== > > Note the unicode string literal. > > Best, > Burak > Bonjour Burak! Right, I just realized that the error is on the client side. By setting the encoding to utf-8 for all the clients, there's no more error. Thank you all for your help! :) -- Thomas From rutsky.vladimir at gmail.com Wed Apr 18 18:34:40 2012 From: rutsky.vladimir at gmail.com (Vladimir Rutsky) Date: Wed, 18 Apr 2012 20:34:40 +0400 Subject: [Soap-Python] Big file transfer with rpclib Message-ID: Hello! I need to write several Python web-services for local network that will exchange with RPC commands with attached files with size 10-1000 MB. I'm trying to use SOAP for message exchanging since XML/JSON RPC can't handle big messages, and SOAP have few features that allows to stream files over network (SwA, MTOM). I see some code related to MTOM in source code of rpclib, is it possible to transfer big files with current version of rpclib? Is there any examples of it? Currently I try to modify binary_soap.py [1] example to return rpclib.model.binary.File object, but without any luck: @srpc(String, _returns=File) def get(file_path): return [File("test.txt", "/tmp/test.txt")] SUDS client receives just string: [File(name='test.txt', path='/tmp/test.txt', type='application/octet-stream', data=)] Thanks in advance, Vladimir Rutsky [1] https://github.com/arskom/rpclib/blob/master/examples/binary_soap.py From burak.arslan at arskom.com.tr Wed Apr 18 22:47:16 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Wed, 18 Apr 2012 23:47:16 +0300 Subject: [Soap-Python] Big file transfer with rpclib In-Reply-To: References: Message-ID: <4F8F2854.8090000@arskom.com.tr> Hi Vladimir, Rpclib's mtom implementation is 90% there. But because there are no test cases for it, it's not currently working, nor is it properly documented. For instance, you need to explicitly enable mtom passing the _mtom=True flag to the @rpc decorator. rpclib.model.binary.File was not tested with soap, so I guess it requires a custom soap serializer routine to work properly. Those said, I don't think suds supports mtom either. Did you check the suds side of things? Why not just use http? Best, Burak On 04/18/12 19:34, Vladimir Rutsky wrote: > Hello! > > I need to write several Python web-services for local network that > will exchange with RPC commands with attached files with size 10-1000 > MB. I'm trying to use SOAP for message exchanging since XML/JSON RPC > can't handle big messages, and SOAP have few features that allows to > stream files over network (SwA, MTOM). > > I see some code related to MTOM in source code of rpclib, is it > possible to transfer big files with current version of rpclib? Is > there any examples of it? > > Currently I try to modify binary_soap.py [1] example to return > rpclib.model.binary.File object, but without any luck: > > @srpc(String, _returns=File) > def get(file_path): > return [File("test.txt", "/tmp/test.txt")] > > SUDS client receives just string: > [File(name='test.txt', path='/tmp/test.txt', > type='application/octet-stream', data= to_string_iterable at 0xb6a18644>)] > > Thanks in advance, > Vladimir Rutsky > > [1] https://github.com/arskom/rpclib/blob/master/examples/binary_soap.py > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap From rj-soaplib at sysgroup.fr Thu Apr 19 10:09:52 2012 From: rj-soaplib at sysgroup.fr (Remi Jolin) Date: Thu, 19 Apr 2012 10:09:52 +0200 Subject: [Soap-Python] Big file transfer with rpclib In-Reply-To: References: Message-ID: <4F8FC850.6030207@sysgroup.fr> Hello, I made a test case to transfer files from the server to the client with SOAP. I used ByteArray on the server side and I got a stream of base64 encoded bytes on the client side. Very easy to decode in python :-) Best regards. Le 18/04/2012 18:34, Vladimir Rutsky a ?crit : > Hello! > > I need to write several Python web-services for local network that > will exchange with RPC commands with attached files with size 10-1000 > MB. I'm trying to use SOAP for message exchanging since XML/JSON RPC > can't handle big messages, and SOAP have few features that allows to > stream files over network (SwA, MTOM). > > I see some code related to MTOM in source code of rpclib, is it > possible to transfer big files with current version of rpclib? Is > there any examples of it? > > Currently I try to modify binary_soap.py [1] example to return > rpclib.model.binary.File object, but without any luck: > > @srpc(String, _returns=File) > def get(file_path): > return [File("test.txt", "/tmp/test.txt")] > > SUDS client receives just string: > [File(name='test.txt', path='/tmp/test.txt', > type='application/octet-stream', data= to_string_iterable at 0xb6a18644>)] > > Thanks in advance, > Vladimir Rutsky > > [1] https://github.com/arskom/rpclib/blob/master/examples/binary_soap.py > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap From rutsky.vladimir at gmail.com Thu Apr 19 14:55:58 2012 From: rutsky.vladimir at gmail.com (Vladimir Rutsky) Date: Thu, 19 Apr 2012 16:55:58 +0400 Subject: [Soap-Python] Big file transfer with rpclib In-Reply-To: <4F8F2854.8090000@arskom.com.tr> References: <4F8F2854.8090000@arskom.com.tr> Message-ID: <4F900B5E.509@gmail.com> On 04/19/2012 12:47 AM, Burak Arslan wrote: > Hi Vladimir, > > Rpclib's mtom implementation is 90% there. But because there are no > test cases for it, it's not currently working, nor is it properly > documented. For instance, you need to explicitly enable mtom passing > the _mtom=True flag to the @rpc decorator. > > rpclib.model.binary.File was not tested with soap, so I guess it > requires a custom soap serializer routine to work properly. > > Those said, I don't think suds supports mtom either. Did you check the > suds side of things? As soon as I know SUDS does not support MTOM, I tried to use it as simple SOAP client to test if server will stream any content. > > Why not just use http? I need RPC to remotely call some functions and return results with note that some arguments or results can be big files, so I want to use some ready RPC solution that can also transfer files. If I use plain HTTP in a REST-like way I need to manually implement RPC functionality, like parse GET query arguments and translate them into my function call, wrap files for upload in POST request and so on. In both solutions (SOAP or REST-like HTTP) actual data will be transferred over HTTP. Also potentially my services will communicate with other Java-based services and it would be awesome if they will be able to interoperate over single and standardised protocol, like SOAP (which is quite well works in Java, as I heard). So if file transfer in Rpclib is not ready yet (and there is no other Python libraries that can do MTOM as far as I know), I will go with transfer in plain HTTP solution. Thanks for respond, Vladimir Rutsky > > Best, > Burak > > > On 04/18/12 19:34, Vladimir Rutsky wrote: >> Hello! >> >> I need to write several Python web-services for local network that >> will exchange with RPC commands with attached files with size 10-1000 >> MB. I'm trying to use SOAP for message exchanging since XML/JSON RPC >> can't handle big messages, and SOAP have few features that allows to >> stream files over network (SwA, MTOM). >> >> I see some code related to MTOM in source code of rpclib, is it >> possible to transfer big files with current version of rpclib? Is >> there any examples of it? >> >> Currently I try to modify binary_soap.py [1] example to return >> rpclib.model.binary.File object, but without any luck: >> >> @srpc(String, _returns=File) >> def get(file_path): >> return [File("test.txt", "/tmp/test.txt")] >> >> SUDS client receives just string: >> [File(name='test.txt', path='/tmp/test.txt', >> type='application/octet-stream', data=> to_string_iterable at 0xb6a18644>)] >> >> Thanks in advance, >> Vladimir Rutsky >> >> [1] https://github.com/arskom/rpclib/blob/master/examples/binary_soap.py >> _______________________________________________ >> Soap mailing list >> Soap at python.org >> http://mail.python.org/mailman/listinfo/soap > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rutsky.vladimir at gmail.com Thu Apr 19 15:01:19 2012 From: rutsky.vladimir at gmail.com (Vladimir Rutsky) Date: Thu, 19 Apr 2012 17:01:19 +0400 Subject: [Soap-Python] Big file transfer with rpclib In-Reply-To: <4F8FC850.6030207@sysgroup.fr> References: <4F8FC850.6030207@sysgroup.fr> Message-ID: <4F900C9F.4090906@gmail.com> Hello! On 04/19/2012 12:09 PM, Remi Jolin wrote: > Hello, > > I made a test case to transfer files from the server to the client > with SOAP. I used ByteArray on the server side and I got a stream of > base64 encoded bytes on the client side. Very easy to decode in python > :-) Is data is streamed in socket or it first completely read into memory and then pushed in socket? Latter case is not an option because it's quite hard to keep in memory 1 GB binary data. But if data is actually streamed, can you provide complete example? > > Best regards. > > Le 18/04/2012 18:34, Vladimir Rutsky a ?crit : >> Hello! >> >> I need to write several Python web-services for local network that >> will exchange with RPC commands with attached files with size 10-1000 >> MB. I'm trying to use SOAP for message exchanging since XML/JSON RPC >> can't handle big messages, and SOAP have few features that allows to >> stream files over network (SwA, MTOM). >> >> I see some code related to MTOM in source code of rpclib, is it >> possible to transfer big files with current version of rpclib? Is >> there any examples of it? >> >> Currently I try to modify binary_soap.py [1] example to return >> rpclib.model.binary.File object, but without any luck: >> >> @srpc(String, _returns=File) >> def get(file_path): >> return [File("test.txt", "/tmp/test.txt")] >> >> SUDS client receives just string: >> [File(name='test.txt', path='/tmp/test.txt', >> type='application/octet-stream', data=> to_string_iterable at 0xb6a18644>)] >> >> Thanks in advance, >> Vladimir Rutsky >> >> [1] https://github.com/arskom/rpclib/blob/master/examples/binary_soap.py >> _______________________________________________ >> 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 -- Vladimir Rutsky From burak.arslan at arskom.com.tr Thu Apr 19 15:05:01 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 19 Apr 2012 16:05:01 +0300 Subject: [Soap-Python] Big file transfer with rpclib In-Reply-To: <4F900B5E.509@gmail.com> References: <4F8F2854.8090000@arskom.com.tr> <4F900B5E.509@gmail.com> Message-ID: <4F900D7D.4010603@arskom.com.tr> On 19/04/12 15:55, Vladimir Rutsky wrote: > If I use plain HTTP in a REST-like way I need to manually implement > RPC functionality, like parse GET query arguments and translate them > into my function call, wrap files for upload in POST request and so > on. In both solutions (SOAP or REST-like HTTP) actual data will be > transferred over HTTP. rpclib supports rpc via HTTP, have a look at the HttpRpc protocol. The File object is supported and you can upload HUGE files using the werkzeug's wsgi server and the file objects. I can put up a sample code somewhere if you give me a few days. best, burak From rocker.yandex at gmail.com Thu Apr 19 15:16:07 2012 From: rocker.yandex at gmail.com (Alexander Kolesnikov) Date: Thu, 19 Apr 2012 17:16:07 +0400 Subject: [Soap-Python] Big file transfer with rpclib In-Reply-To: <4F900D7D.4010603@arskom.com.tr> References: <4F8F2854.8090000@arskom.com.tr> <4F900B5E.509@gmail.com> <4F900D7D.4010603@arskom.com.tr> Message-ID: To keep communication SOAP-like, you can use shared http resources. 1) To send big arguments, upload them to share with WebDAV, and replace them by urls of created resources. These resources can be placed on the same server where SOAP-server works. 2) To return big results, SOAP-server must publish them to this shared storage and return their urls instead. Client can download them by HTTP. Alexander. On Thu, Apr 19, 2012 at 5:05 PM, Burak Arslan wrote: > On 19/04/12 15:55, Vladimir Rutsky wrote: > >> If I use plain HTTP in a REST-like way I need to manually implement RPC >> functionality, like parse GET query arguments and translate them into my >> function call, wrap files for upload in POST request and so on. In both >> solutions (SOAP or REST-like HTTP) actual data will be transferred over >> HTTP. >> > > > rpclib supports rpc via HTTP, have a look at the HttpRpc protocol. The > File object is supported and you can upload HUGE files using the werkzeug's > wsgi server and the file objects. I can put up a sample code somewhere if > you give me a few days. > > best, > burak > > ______________________________**_________________ > Soap mailing list > Soap at python.org > http://mail.python.org/**mailman/listinfo/soap > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rj-soaplib at sysgroup.fr Thu Apr 19 15:27:46 2012 From: rj-soaplib at sysgroup.fr (Remi Jolin) Date: Thu, 19 Apr 2012 15:27:46 +0200 Subject: [Soap-Python] Big file transfer with rpclib In-Reply-To: <4F900C9F.4090906@gmail.com> References: <4F8FC850.6030207@sysgroup.fr> <4F900C9F.4090906@gmail.com> Message-ID: <4F9012D2.3060504@sysgroup.fr> Le 19/04/2012 15:01, Vladimir Rutsky a ?crit : > Hello! > > On 04/19/2012 12:09 PM, Remi Jolin wrote: >> Hello, >> >> I made a test case to transfer files from the server to the client >> with SOAP. I used ByteArray on the server side and I got a stream of >> base64 encoded bytes on the client side. Very easy to decode in >> python :-) > Is data is streamed in socket or it first completely read into memory > and then pushed in socket? I suspect data is read into memory even if you use an iterator... > Latter case is not an option because it's quite hard to keep in memory > 1 GB binary data. > > But if data is actually streamed, can you provide complete example? > >> >> Best regards. >> >> Le 18/04/2012 18:34, Vladimir Rutsky a ?crit : >>> Hello! >>> >>> I need to write several Python web-services for local network that >>> will exchange with RPC commands with attached files with size 10-1000 >>> MB. I'm trying to use SOAP for message exchanging since XML/JSON RPC >>> can't handle big messages, and SOAP have few features that allows to >>> stream files over network (SwA, MTOM). >>> >>> I see some code related to MTOM in source code of rpclib, is it >>> possible to transfer big files with current version of rpclib? Is >>> there any examples of it? >>> >>> Currently I try to modify binary_soap.py [1] example to return >>> rpclib.model.binary.File object, but without any luck: >>> >>> @srpc(String, _returns=File) >>> def get(file_path): >>> return [File("test.txt", "/tmp/test.txt")] >>> >>> SUDS client receives just string: >>> [File(name='test.txt', path='/tmp/test.txt', >>> type='application/octet-stream', data=>> to_string_iterable at 0xb6a18644>)] >>> >>> Thanks in advance, >>> Vladimir Rutsky >>> >>> [1] >>> https://github.com/arskom/rpclib/blob/master/examples/binary_soap.py >>> _______________________________________________ >>> 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 > > -- > Vladimir Rutsky > From rutsky.vladimir at gmail.com Thu Apr 19 16:39:58 2012 From: rutsky.vladimir at gmail.com (Vladimir Rutsky) Date: Thu, 19 Apr 2012 18:39:58 +0400 Subject: [Soap-Python] Big file transfer with rpclib In-Reply-To: <4F900D7D.4010603@arskom.com.tr> References: <4F8F2854.8090000@arskom.com.tr> <4F900B5E.509@gmail.com> <4F900D7D.4010603@arskom.com.tr> Message-ID: <4F9023BE.50500@gmail.com> On 04/19/2012 05:05 PM, Burak Arslan wrote: > On 19/04/12 15:55, Vladimir Rutsky wrote: >> If I use plain HTTP in a REST-like way I need to manually implement >> RPC functionality, like parse GET query arguments and translate them >> into my function call, wrap files for upload in POST request and so >> on. In both solutions (SOAP or REST-like HTTP) actual data will be >> transferred over HTTP. > > > rpclib supports rpc via HTTP, have a look at the HttpRpc protocol. The > File object is supported and you can upload HUGE files using the > werkzeug's wsgi server and the file objects. I can put up a sample > code somewhere if you give me a few days. It would be great if you provide such example! Can you provide some tips how it should be implemented so that I tried it myself right now? I created playground [1] and managed to transfer rpclib.model.binary.File from Python server [2] to "wget" client [3] using HttpRpc, but failed to do so from rpclib.client.http.HttpClient [4]. Is HttpClient should work? Can I upload files from client (HttpClient) to server? [1] https://github.com/vrutsky/rpclib-playground [2] https://github.com/vrutsky/rpclib-playground/blob/master/binary_http.py [3] https://github.com/vrutsky/rpclib-playground/blob/master/http_get_client.sh [4] https://github.com/vrutsky/rpclib-playground/blob/master/rpclib_client.py > > best, > burak -- Vladimir Rutsky From rutsky.vladimir at gmail.com Thu Apr 19 16:48:40 2012 From: rutsky.vladimir at gmail.com (Vladimir Rutsky) Date: Thu, 19 Apr 2012 18:48:40 +0400 Subject: [Soap-Python] Big file transfer with rpclib In-Reply-To: References: <4F8F2854.8090000@arskom.com.tr> <4F900B5E.509@gmail.com> <4F900D7D.4010603@arskom.com.tr> Message-ID: <4F9025C8.6080100@gmail.com> On 04/19/2012 05:16 PM, Alexander Kolesnikov wrote: > To keep communication SOAP-like, you can use shared http resources. > 1) To send big arguments, upload them to share with WebDAV, and > replace them by urls of created resources. These resources can be > placed on the same server where SOAP-server works. > 2) To return big results, SOAP-server must publish them to this shared > storage and return their urls instead. Client can download them by HTTP. Thanks for advice about using WebDAV! Disadvantage of using separate server for storing files is that it complicates remote calls: calling part should upload, then send request, wait response and optionally remove uploaded files; called part receives request, then downloads file, then sends response. Since file uploading/downloading is done over HTTP I think better to embed transferring file into GET/POST request, so that it will be transmitted with request/response messages. > Alexander. > > On Thu, Apr 19, 2012 at 5:05 PM, Burak Arslan > > wrote: > > On 19/04/12 15:55, Vladimir Rutsky wrote: > > If I use plain HTTP in a REST-like way I need to manually > implement RPC functionality, like parse GET query arguments > and translate them into my function call, wrap files for > upload in POST request and so on. In both solutions (SOAP or > REST-like HTTP) actual data will be transferred over HTTP. > > > > rpclib supports rpc via HTTP, have a look at the HttpRpc protocol. > The File object is supported and you can upload HUGE files using > the werkzeug's wsgi server and the file objects. I can put up a > sample code somewhere if you give me a few days. > > best, > burak > > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap > > -- Vladimir Rutsky -------------- next part -------------- An HTML attachment was scrubbed... URL: From rutsky.vladimir at gmail.com Thu Apr 19 16:52:07 2012 From: rutsky.vladimir at gmail.com (Vladimir Rutsky) Date: Thu, 19 Apr 2012 18:52:07 +0400 Subject: [Soap-Python] Big file transfer with rpclib In-Reply-To: <4F9012D2.3060504@sysgroup.fr> References: <4F8FC850.6030207@sysgroup.fr> <4F900C9F.4090906@gmail.com> <4F9012D2.3060504@sysgroup.fr> Message-ID: <4F902697.10802@gmail.com> On 04/19/2012 05:27 PM, Remi Jolin wrote: > Le 19/04/2012 15:01, Vladimir Rutsky a ?crit : >> Hello! >> >> On 04/19/2012 12:09 PM, Remi Jolin wrote: >>> Hello, >>> >>> I made a test case to transfer files from the server to the client >>> with SOAP. I used ByteArray on the server side and I got a stream of >>> base64 encoded bytes on the client side. Very easy to decode in >>> python :-) >> Is data is streamed in socket or it first completely read into memory >> and then pushed in socket? > I suspect data is read into memory even if you use an iterator... I tried transferring rpclib.model.binary.File object over HttpRpc [1] and it successfully fed into socket without being completely read into memory at some point. [1] https://github.com/vrutsky/rpclib-playground/blob/master/binary_http.py > >> Latter case is not an option because it's quite hard to keep in >> memory 1 GB binary data. >> >> But if data is actually streamed, can you provide complete example? >> >>> >>> Best regards. >>> >>> Le 18/04/2012 18:34, Vladimir Rutsky a ?crit : >>>> Hello! >>>> >>>> I need to write several Python web-services for local network that >>>> will exchange with RPC commands with attached files with size 10-1000 >>>> MB. I'm trying to use SOAP for message exchanging since XML/JSON RPC >>>> can't handle big messages, and SOAP have few features that allows to >>>> stream files over network (SwA, MTOM). >>>> >>>> I see some code related to MTOM in source code of rpclib, is it >>>> possible to transfer big files with current version of rpclib? Is >>>> there any examples of it? >>>> >>>> Currently I try to modify binary_soap.py [1] example to return >>>> rpclib.model.binary.File object, but without any luck: >>>> >>>> @srpc(String, _returns=File) >>>> def get(file_path): >>>> return [File("test.txt", "/tmp/test.txt")] >>>> >>>> SUDS client receives just string: >>>> [File(name='test.txt', path='/tmp/test.txt', >>>> type='application/octet-stream', data=>>> to_string_iterable at 0xb6a18644>)] >>>> >>>> Thanks in advance, >>>> Vladimir Rutsky >>>> >>>> [1] >>>> https://github.com/arskom/rpclib/blob/master/examples/binary_soap.py >>>> _______________________________________________ >>>> 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 >> >> -- >> Vladimir Rutsky >> > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap From dieter at handshake.de Thu Apr 19 19:41:54 2012 From: dieter at handshake.de (Dieter Maurer) Date: Thu, 19 Apr 2012 19:41:54 +0200 Subject: [Soap-Python] Big file transfer with rpclib In-Reply-To: <4F900B5E.509@gmail.com> References: <4F900B5E.509@gmail.com> Message-ID: <20368.20066.750129.968385@localhost.localdomain> Vladimir Rutsky wrote at 2012-4-19 16:55 +0400: > ... >If I use plain HTTP in a REST-like way I need to manually implement RPC >functionality, like parse GET query arguments and translate them into my >function call, wrap files for upload in POST request and so on. In both >solutions (SOAP or REST-like HTTP) actual data will be transferred over >HTTP. An alternative would be to use a web application framework. I know well Zope: it automatically maps HTTP requests to method calls. But, other web application frameworks likely will support this also. -- Dieter From burak.arslan at arskom.com.tr Fri Apr 20 09:32:48 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Fri, 20 Apr 2012 10:32:48 +0300 Subject: [Soap-Python] Big file transfer with rpclib In-Reply-To: <4F9023BE.50500@gmail.com> References: <4F8F2854.8090000@arskom.com.tr> <4F900B5E.509@gmail.com> <4F900D7D.4010603@arskom.com.tr> <4F9023BE.50500@gmail.com> Message-ID: <4F911120.6000209@arskom.com.tr> On 04/19/12 17:39, Vladimir Rutsky wrote: > Is HttpClient should work? nope. I did not finish that because curl/wget work just fine for me. here's the example: https://github.com/plq/rpclib/tree/master/examples/file_manager note that it's 2012 and firefox can't upload files bigger than 2GB. https://bugzilla.mozilla.org/show_bug.cgi?id=215450 so it's best to test this with chrome. hth, burak From rutsky.vladimir at gmail.com Fri Apr 20 12:59:49 2012 From: rutsky.vladimir at gmail.com (Vladimir Rutsky) Date: Fri, 20 Apr 2012 14:59:49 +0400 Subject: [Soap-Python] Big file transfer with rpclib In-Reply-To: <20368.20066.750129.968385@localhost.localdomain> References: <4F900B5E.509@gmail.com> <20368.20066.750129.968385@localhost.localdomain> Message-ID: <4F9141A5.4020002@gmail.com> On 04/19/2012 09:41 PM, Dieter Maurer wrote: > Vladimir Rutsky wrote at 2012-4-19 16:55 +0400: >> ... >> If I use plain HTTP in a REST-like way I need to manually implement RPC >> functionality, like parse GET query arguments and translate them into my >> function call, wrap files for upload in POST request and so on. In both >> solutions (SOAP or REST-like HTTP) actual data will be transferred over >> HTTP. > An alternative would be to use a web application framework. > I know well Zope: it automatically maps HTTP requests to method calls. > But, other web application frameworks likely will support this also. Yes, since I doing now solution with plain HTTP, I decided to use Django framework. It's a bit big and overcomplicated for such small task, but it's well documented and has all that I need. > > > > -- > Dieter -- Vladimir Rutsky From rutsky.vladimir at gmail.com Fri Apr 20 14:56:31 2012 From: rutsky.vladimir at gmail.com (Vladimir Rutsky) Date: Fri, 20 Apr 2012 16:56:31 +0400 Subject: [Soap-Python] Big file transfer with rpclib In-Reply-To: <4F911120.6000209@arskom.com.tr> References: <4F8F2854.8090000@arskom.com.tr> <4F900B5E.509@gmail.com> <4F900D7D.4010603@arskom.com.tr> <4F9023BE.50500@gmail.com> <4F911120.6000209@arskom.com.tr> Message-ID: <4F915CFF.1070909@gmail.com> On 04/20/2012 11:32 AM, Burak Arslan wrote: > On 04/19/12 17:39, Vladimir Rutsky wrote: >> Is HttpClient should work? > > nope. I did not finish that because curl/wget work just fine for me. > > here's the example: > https://github.com/plq/rpclib/tree/master/examples/file_manager > > note that it's 2012 and firefox can't upload files bigger than 2GB. > https://bugzilla.mozilla.org/show_bug.cgi?id=215450 > > so it's best to test this with chrome. Thank you for this example! I decided to go with Django + upload/download files as more familiar solution, but I will look forward for SOAP MTOM/SwA support in rpclib. P.S. Provided example doesn't work in 2.7.0-beta, probably because differences in 2.7.0-beta and your branch: Traceback (most recent call last): File "./server.py", line 57, in class FileServices(ServiceBase): File "./server.py", line 58, in FileServices @rpc(Mandatory.Unicode, _returns=ByteArray) AttributeError: type object 'Mandatory' has no attribute 'Unicode' Best wishes, Vladimir Rutsky From burak.arslan at arskom.com.tr Fri Apr 20 15:06:41 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Fri, 20 Apr 2012 16:06:41 +0300 Subject: [Soap-Python] Big file transfer with rpclib In-Reply-To: <4F915CFF.1070909@gmail.com> References: <4F8F2854.8090000@arskom.com.tr> <4F900B5E.509@gmail.com> <4F900D7D.4010603@arskom.com.tr> <4F9023BE.50500@gmail.com> <4F911120.6000209@arskom.com.tr> <4F915CFF.1070909@gmail.com> Message-ID: <4F915F61.30803@arskom.com.tr> On 20/04/12 15:56, Vladimir Rutsky wrote: > On 04/20/2012 11:32 AM, Burak Arslan wrote: >> On 04/19/12 17:39, Vladimir Rutsky wrote: >>> Is HttpClient should work? >> >> nope. I did not finish that because curl/wget work just fine for me. >> >> here's the example: >> https://github.com/plq/rpclib/tree/master/examples/file_manager >> >> note that it's 2012 and firefox can't upload files bigger than 2GB. >> https://bugzilla.mozilla.org/show_bug.cgi?id=215450 >> >> so it's best to test this with chrome. > Thank you for this example! > > I decided to go with Django + upload/download files as more familiar > solution, but I will look forward for SOAP MTOM/SwA support in rpclib. > Oh well, I guess I can't blame you :) Yes the 2.8.0 branch has some huge additions, (see the diffstat in https://github.com/arskom/rpclib/pull/129) so I won't be surprised if that example works only with rpclib trunk. But that's how it is if you ask me to do something: You always need to get the latest trunk :) best, burak > P.S. Provided example doesn't work in 2.7.0-beta, probably because > differences in 2.7.0-beta and your branch: > Traceback (most recent call last): > File "./server.py", line 57, in > class FileServices(ServiceBase): > File "./server.py", line 58, in FileServices > @rpc(Mandatory.Unicode, _returns=ByteArray) > AttributeError: type object 'Mandatory' has no attribute 'Unicode' > > > Best wishes, > > Vladimir Rutsky > From KenWhitesell at comcast.net Thu Apr 26 18:37:14 2012 From: KenWhitesell at comcast.net (KenWhitesell at comcast.net) Date: Thu, 26 Apr 2012 16:37:14 +0000 (UTC) Subject: [Soap-Python] How to create ComplexModel data? In-Reply-To: <752358632.1962576.1335457834507.JavaMail.root@sz0095a.westchester.pa.mail.comcast.net> Message-ID: <1449789693.1962926.1335458234170.JavaMail.root@sz0095a.westchester.pa.mail.comcast.net> Newbie to SOAP / RPC / rpclib - trying to understand how the different pieces fit together to generate a response. I've been playing with the "User Manager" example, and I'm trying to extend it by adding a method that will randomly generate a User _on the server_, and add that to the user database. (I'm referring to the simple example, server_basic.py) In the code there is this object User, defined as: class User(ComplexModel): __namespace__ = 'rpclib.examples.user_manager' user_id = Integer user_name = String first_name = String last_name = String permissions = Array(Permission) Now, what _I_ want to do is create a server-side method (lets call it "make_user"), that will create an instance of User with a random data, and return it to the caller. (I know how to generate the random data, that's not the issue.) So far, I think I need to add a method to UserManagerService that would look something like this: @rpc(_returns=User) def make_user(ctx): return ????? What I can't see is how I create an instance of User _and_ populate the various fields with the data that I want in it - and the sample doesn't appear to me to cover that case - it assumes that all Users come to it from the client. Help please? Thanks, Ken From burak.arslan at arskom.com.tr Thu Apr 26 19:00:44 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 26 Apr 2012 20:00:44 +0300 Subject: [Soap-Python] How to create ComplexModel data? In-Reply-To: <1449789693.1962926.1335458234170.JavaMail.root@sz0095a.westchester.pa.mail.comcast.net> References: <1449789693.1962926.1335458234170.JavaMail.root@sz0095a.westchester.pa.mail.comcast.net> Message-ID: <4F997F3C.1090507@arskom.com.tr> On 26.04.2012 19:37, KenWhitesell at comcast.net wrote: > Now, what_I_ want to do is create a server-side method (lets call it "make_user"), that will create an instance of User with a random data, and return it to the caller. (I know how to generate the random data, that's not the issue.) > > So far, I think I need to add a method to UserManagerService that would look something like this: > @rpc(_returns=User) > def make_user(ctx): > return User(user_id=5, user_name="hey", permissions=["one", "two"]) Hi Ken, If I did not misunderstand your question, that's what you're looking for: @rpc(_returns=User) def make_user(ctx): return User(first_name="a", last_name="B", id=5, permissions=[Permission(application="app", operation="op")]) ComplexModel children are just like regular python objects. You can e.g. instantiate them. Does it help? Best, Burak From burak.arslan at arskom.com.tr Fri Apr 27 07:47:51 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Fri, 27 Apr 2012 08:47:51 +0300 Subject: [Soap-Python] How to create ComplexModel data? In-Reply-To: <1763573315.1965686.1335460785017.JavaMail.root@sz0095a.westchester.pa.mail.comcast.net> References: <1763573315.1965686.1335460785017.JavaMail.root@sz0095a.westchester.pa.mail.comcast.net> Message-ID: <4F9A3307.9030208@arskom.com.tr> On 26/04/12 20:19, KenWhitesell at comcast.net wrote: >> > Does it help? >> > > Absolutely! Thank you. I was making it a lot harder than it needed to be. > (I was trying to do things like create an __init__ method - among other > things that I'm too embarrassed to admit to in a public forum.:) No worries :) Fyi, here[1]'s the default ComplexModel ctor. It only accepts kwargs. You HAVE to call it if you override it, otherwise you'll get nasty surprises because of uninitialized variables. Best, Burak [1]: https://github.com/arskom/rpclib/blob/e15fcf7a0783451fb358454ec474f3c7f99286ee/src/rpclib/model/complex.py#L155 From burak.arslan at arskom.com.tr Fri Apr 27 13:45:03 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Fri, 27 Apr 2012 14:45:03 +0300 Subject: [Soap-Python] faq entry about rpclib's license (lgpl) Message-ID: <4F9A86BF.8000505@arskom.com.tr> hi there, I've just added a faq entry about rpclib license. does anybody has anything to add? Any rewordings etc. you suggest? https://github.com/plq/rpclib/commit/09a464455f29afa835d08fa15071bc9d82a184d8 best, burak From ralienpp at gmail.com Fri Apr 27 15:07:13 2012 From: ralienpp at gmail.com (Alex Railean) Date: Fri, 27 Apr 2012 16:07:13 +0300 Subject: [Soap-Python] faq entry about rpclib's license (lgpl) In-Reply-To: <4F9A86BF.8000505@arskom.com.tr> References: <4F9A86BF.8000505@arskom.com.tr> Message-ID: <1883636630.20120427160713@gmail.com> Hi, I think one part of the message is misleading: > +Due to the nature of LGPL, you're absolutely free to do whatever you want with > +Rpclib, as long as you don't distibute it (i.e. do on-site installs) to your > +clients. You can distribute it, and the next paragraph says that you can, as long as you give the source to the client. Is this 100% correct? What if the client doesn't give the source back to the community? I would rephrase that, I think that an easier way to express that is to use bullet points: - you *can change* the code - changes *must be shared* with the community - you *can* use it with commercial software or software of *any* license - as long as rpclib is *not tightly coupled* with the rest of the system A while ago I summarized the delta between various flavours of licenses, here's the result: http://railean.net/index.php/2011/11/22/simple-comparison-of-open-source-software-licenses Basically, I think it is important to answer the typical question "can I use it with my commercial program?" - this is what people are usually looking for. Alex p.s. IANAL, just a humble mortal :-) From burak.arslan at arskom.com.tr Fri Apr 27 15:44:52 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Fri, 27 Apr 2012 16:44:52 +0300 Subject: [Soap-Python] faq entry about rpclib's license (lgpl) In-Reply-To: <1883636630.20120427160713@gmail.com> References: <4F9A86BF.8000505@arskom.com.tr> <1883636630.20120427160713@gmail.com> Message-ID: <4F9AA2D4.2040902@arskom.com.tr> On 04/27/12 16:07, Alex Railean wrote: > Hi, > > > I think one part of the message is misleading: > >> +Due to the nature of LGPL, you're absolutely free to do whatever you want with >> +Rpclib, as long as you don't distibute it (i.e. do on-site installs) to your >> +clients. > You can distribute it, and the next paragraph says that you can, as > long as you give the source to the client. Is this 100% correct? What > if the client doesn't give the source back to the community? > Hi Alex, The client does not have to give the source to the community. You're obliged to pass source code only to the people who get your software. So in principle, you can sell source code that was licensed under any version of (L)GPL, but you can't prevent the buyer from doing the same, or putting it up somewhere for everybody to download etc. I rewrote the entry according to your other suggestions. What do you think? https://github.com/plq/rpclib/commit/434ea35a1b23a9c9a80616445ea30110018fd9ea Best, Burak From burak.arslan at arskom.com.tr Sat Apr 28 12:28:43 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Sat, 28 Apr 2012 13:28:43 +0300 Subject: [Soap-Python] fyi: sudsds Message-ID: <4F9BC65B.7000008@arskom.com.tr> hi there, this is to let you know that suds has a fork under the name of sudsds by the folks at nic.cz where they added some https-related features. its official page seems to be http://labs.nic.cz/page/969/ and is in czech. the git link there does not work but you can download it from here: http://www.nic.cz/public_media/datove_schranky/releases/datovka-2.0/src/sudsds-1.0.tar.gz the contents of its readme: =============== sudsds is a fork of the suds library (https://fedorahosted.org/suds) modified to meet the needs for interaction with the servers of Datov? schr?nky. The modifications are related to HTTPS proxy, server certificate validation and other SSL related functions. Same as suds, sudsds is distributed under the LGPL license. As sudsds contains only small changes compared to the original suds, almost all credits belong to the authors of suds. =============== best, burak From wsourdeau at inverse.ca Mon Apr 30 23:07:36 2012 From: wsourdeau at inverse.ca (Wolfgang Sourdeau) Date: Mon, 30 Apr 2012 17:07:36 -0400 Subject: [Soap-Python] rpclib/soaplib with WSDL parsing Message-ID: <4F9EFF18.9080401@inverse.ca> Hi everyone, I know the subject of WSDL parsing has come up many times in the past but something bothers me after some research I did today among the multiple forks of soaplib... These links: https://github.com/cuker/soaplib/commit/85bed2c98693451bcc2537f9e895d573ff7ece7b#diff-7 https://github.com/soaplib/soaplib/tree/0_8/soaplib/parsers (which seems to be related to the previous) ... show a script named " wsdlparse.py " which obviously aims at providing the famous WSDL-based services. Since rpclib, as I understand it, is the official successor of soaplib, how come this script has not been included (or was erased) between soaplib 0.8/1.0/2.0 and rpclib... Would it be possible to adapt it and reinclude it for a next release, or would this be complicated? Has this been considered? Thank you! Wolfgang -------------- next part -------------- An HTML attachment was scrubbed... URL: From burak.arslan at arskom.com.tr Mon Apr 30 23:51:35 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 01 May 2012 00:51:35 +0300 Subject: [Soap-Python] rpclib/soaplib with WSDL parsing In-Reply-To: <4F9EFF18.9080401@inverse.ca> References: <4F9EFF18.9080401@inverse.ca> Message-ID: <4F9F0967.8030203@arskom.com.tr> Hi Wolfgang, The real reason I got rid of wsdlparse was because it did things the java way -- it generated code. That's a fundamentally wrong approach when you're working with Python because, by the virtue of being a dynamic language, Python can parse wsdl and build required classes and interfaces on the fly. I also wanted to focus on making soaplib a proper soap server, because that's what was lacking then in the Python world. (There even was a time i'd entirely dumped client functionality in favor of suds.) Oh and wsdlparse did not work most of the time anyway. If suds wasn't already there, we'd probably have wsdl parsing in rpclib by now. (I already have a javascript soap client which also parses wsdl, here: http://github.com/arskom/qxsoap) But I did not think duplicating suds' functionality in rpclib would benefit anybody, so I didn't do it. I'd nevertheless encourage you to work on a wsdl parser for rpclib, because i feel it'd have a greater benefit outside of the SOAP world -- I've stumbled upon a few people in the lxml mailing list who might be interested working on an Xml Schema parser. They might want to give you a hand if you ask around. FWIW, I don't think you can easily adapt suds' wsdl parser to rpclib. Best, Burak On 01/05/12 00:07, Wolfgang Sourdeau wrote: > Hi everyone, > > > I know the subject of WSDL parsing has come up many times in the past > but something bothers me after some research I did today among the > multiple forks of soaplib... > > These links: > https://github.com/cuker/soaplib/commit/85bed2c98693451bcc2537f9e895d573ff7ece7b#diff-7 > https://github.com/soaplib/soaplib/tree/0_8/soaplib/parsers (which > seems to be related to the previous) > > ... show a script named " wsdlparse.py > " > which obviously aims at providing the famous WSDL-based services. > > Since rpclib, as I understand it, is the official successor of > soaplib, how come this script has not been included (or was erased) > between soaplib 0.8/1.0/2.0 and rpclib... > Would it be possible to adapt it and reinclude it for a next release, > or would this be complicated? Has this been considered? > > Thank you! > > > Wolfgang > > > > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap -------------- next part -------------- An HTML attachment was scrubbed... URL: