From destrero at imavis.com Wed Sep 1 18:39:35 2010 From: destrero at imavis.com (Augusto Destrero) Date: Wed, 1 Sep 2010 18:39:35 +0200 Subject: [Soap-Python] anyURI type in soaplib In-Reply-To: <4C7D0F50.2070507@arskom.com.tr> References: <201008311535.01055.destrero@imavis.com> <4C7D0F50.2070507@arskom.com.tr> Message-ID: <201009011839.35935.destrero@imavis.com> On Tuesday 31 August 2010 16:18:56 Burak Arslan wrote: > Why wouldn't the String type fit your purposes, you need extra > validation? I could be wrong but I think that's all you need to do: (in > primitive.py) > > class AnyUri(String): > __type_name__ = 'anyURI' > You were right. That simple class did the trick! Thank you very much! -- Augusto Destrero, PhD From alessandro.ronchi at soasi.com Tue Sep 7 12:49:37 2010 From: alessandro.ronchi at soasi.com (Alessandro Ronchi) Date: Tue, 7 Sep 2010 12:49:37 +0200 Subject: [Soap-Python] Django and soaplib Message-ID: Hi to all. I'm new for this list. I'm trying to make a soap service with soaplib and django, and I've no problem with soapui and suds client, but perl doesn't parse correctly my wsdl. I need to use it inside a webgui asset. my $soap = new SOAP::Lite->service(" http://192.168.0.146:8000/soap/service.wsdl"); my $return = $soap->get_product( SOAP::Data->name(object_id => '15'), SOAP::Data->name(language_code=>'it_IT') ); I'm using soaplib 0.8.2 alpha from http://github.com/arskom/soaplib/tree/0.8.2-alpha2/src/soaplib/test/interop/server I've used that version because I didn't find any documentation that explains how to use the 0.9.x alpha version, if it's possible. the call sends only the second parameter to my app. this is my WSDL: http://dpaste.com/239913/ do you know any solution? Thanks in advance, best regards. -- Alessandro Ronchi http://www.soasi.com Hobby & Giochi http://hobbygiochi.com http://www.facebook.com/hobbygiochi -------------- next part -------------- An HTML attachment was scrubbed... URL: From burak.arslan at arskom.com.tr Tue Sep 7 13:05:06 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 07 Sep 2010 14:05:06 +0300 Subject: [Soap-Python] Django and soaplib In-Reply-To: References: Message-ID: <4C861C62.30900@arskom.com.tr> On 09/07/10 13:49, Alessandro Ronchi wrote: > Hi to all. > I'm new for this list. > hi there :) > but perl doesn't parse correctly my wsdl. what error do you see? can you provide a minimal test case, like in here? http://github.com/arskom/soaplib/tree/master/src/soaplib/test/interop/ > > I've used that version because I didn't find any documentation that > explains how to use the 0.9.x alpha version, if it's possible. unfortunately, source code is currently the documentation. see http://github.com/arskom/soaplib/tree/master/src/soaplib/test/interop/server/ for an example that makes use of most of soaplib-0.9.x features. best, burak From luca.dariz at unife.it Tue Sep 7 13:12:17 2010 From: luca.dariz at unife.it (Luca Dariz) Date: Tue, 07 Sep 2010 13:12:17 +0200 Subject: [Soap-Python] Django and soaplib In-Reply-To: References: Message-ID: <4C861E11.10405@unife.it> On 07/09/2010 12:49, Alessandro Ronchi wrote: > Hi to all. > I'm new for this list. Hi, welcome to the list! > > the call sends only the second parameter to my app. > maybe it's because you are sending object_id like a string but in the wsdl is defined as an integer? Hope it helps Luca From luigi.balduzzi at imavis.com Wed Sep 8 11:22:13 2010 From: luigi.balduzzi at imavis.com (Luigi Balduzzi) Date: Wed, 08 Sep 2010 11:22:13 +0200 Subject: [Soap-Python] Multiple nodes with soaplib Message-ID: <20100908112213.144975nc70lrprd1@webmail.imavis.com> Hi. I'm using soaplib (cloned from github)and I have the following problem. I need to instantiate a node in a XML soap message with this schema: So I've written a class: class DNSInformation(ClassSerializer): __namespace__ = 'http://www.onvif.org/ver10/schema' _type_info = [ ("FromDHCP", Boolean.customize(min_occurs = 1, nillable = False)), ("SearchDomain", Token.customize(max_occurs = "unbounded", nillable = False)), # ... ] and a method: @rpc(_returns=DNSInformation, _out_variable_name="DNSInformation") def GetDNS(self): dnsInfo = DNSInformation() dnsInfo.FromDHCP = False dnsInfo.SearchDomain = "a.b.c" # ... return dnsInfo It works fine. But if I'd like more than one SearchDomain, e.g. to obtain a message like this: false a.b.c d.e.f how should I do? Is it possible to do this? Thank you very much! Luigi ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From burak.arslan at arskom.com.tr Thu Sep 9 08:33:48 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 09 Sep 2010 09:33:48 +0300 Subject: [Soap-Python] Multiple nodes with soaplib In-Reply-To: <20100908112213.144975nc70lrprd1@webmail.imavis.com> References: <20100908112213.144975nc70lrprd1@webmail.imavis.com> Message-ID: <4C887FCC.4010203@arskom.com.tr> On 09/08/10 12:22, Luigi Balduzzi wrote: > Hi. I'm using soaplib (cloned from github)and I have the following > problem. > I need to instantiate a node in a XML soap message with this schema: > > > > > maxOccurs="unbounded"/> > > > > > So I've written a class: > > class DNSInformation(ClassSerializer): > __namespace__ = 'http://www.onvif.org/ver10/schema' > _type_info = [ > ("FromDHCP", Boolean.customize(min_occurs = 1, nillable = > False)), > ("SearchDomain", Token.customize(max_occurs = "unbounded", > nillable = False)), > # ... > ] > > and a method: > > @rpc(_returns=DNSInformation, _out_variable_name="DNSInformation") > def GetDNS(self): > dnsInfo = DNSInformation() > dnsInfo.FromDHCP = False > dnsInfo.SearchDomain = "a.b.c" > # ... > return dnsInfo > > It works fine. great to hear. > But if I'd like more than one SearchDomain, e.g. to obtain a message > like this: > > > false > a.b.c > d.e.f > > > how should I do? Is it possible to do this? > i was already working on this :) try with the latest trunk and let me know. http://github.com/arskom/soaplib/commit/5177d64c254457daea8751c2ed927a996d03ba88 http://github.com/baxeico/soaplib/commit/c736898d2bca06a60dee5a8710f02d9d3e1db091 by the way, is this a hack or you have evidence that this is the expected behaviour? burak From burak.arslan at arskom.com.tr Thu Sep 9 08:45:13 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 09 Sep 2010 09:45:13 +0300 Subject: [Soap-Python] soaplib: token primitive Message-ID: <4C888279.5000404@arskom.com.tr> hi, fyi, in this commit: http://github.com/baxeico/soaplib/commit/b7c81c95e6f7a595a1e705136a9485b226d60420 the token primitive implementation is not complete. see here: http://www.w3schools.com/schema/schema_dtypes_string.asp best regards, burak From luigi.balduzzi at imavis.com Thu Sep 9 11:17:59 2010 From: luigi.balduzzi at imavis.com (luigi.balduzzi at imavis.com) Date: Thu, 09 Sep 2010 11:17:59 +0200 Subject: [Soap-Python] Multiple nodes with soaplib / Re: soaplib: token primitive Message-ID: <20100909111759.418452taynexcd3b@webmail.imavis.com> First of all thank you very much! Def. Quota "Burak Arslan" : > > i was already working on this :) try with the latest trunk and let me know. > > http://github.com/arskom/soaplib/commit/5177d64c254457daea8751c2ed927a996d03ba88 Now I'll try it (yesterday I tried to do something like this). > http://github.com/baxeico/soaplib/commit/c736898d2bca06a60dee5a8710f02d9d3e1db091 > > by the way, is this a hack or you have evidence that this is the > expected behaviour? My change was an attempt, but I think that this is the expected behaviour (at least, it works with Onvif). Anyway, I suppose that a XML node (not its type) is in the namespace of its father. Def. Quota "Burak Arslan" : > hi, > > fyi, in this commit: > http://github.com/baxeico/soaplib/commit/b7c81c95e6f7a595a1e705136a9485b226d60420 > > the token primitive implementation is not complete. see here: > http://www.w3schools.com/schema/schema_dtypes_string.asp I have to modify its from_xml() to remove extra spaces, right? > best regards, > burak Thanks again, Luigi ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From alessandro.ronchi at soasi.com Thu Sep 9 13:02:13 2010 From: alessandro.ronchi at soasi.com (Alessandro Ronchi) Date: Thu, 9 Sep 2010 13:02:13 +0200 Subject: [Soap-Python] return String Message-ID: I have a very simple soapmethod: http://dpaste.com/240921/ where I render a simple template. The html result is a SafeString Unicode (I'm using pydev to check) SafeUnicode:
  • Riduttori Motoriduttori a velocit? fissa
  • when I return it escapes "<": resp = ElementTree.tostring(envelope, encoding=string_encoding) returns: str: <li><a class='current category_tree' id='category_tree_3' href='/it/products/riduttori-motoriduttori-velocita-fissa/?oid=3'>Riduttori Motoriduttori a velocit? fissa </a></li> I've tried all sort of things in all combinations: - html.decode() - mark_safe - smart_str() - autoescape on, off - safe filter but nothing works. I simply need to output an html string, can you help me figure out it? thanks in advance, -- Alessandro Ronchi http://www.soasi.com Hobby & Giochi http://hobbygiochi.com http://www.facebook.com/hobbygiochi From luca.dariz at unife.it Thu Sep 9 14:12:32 2010 From: luca.dariz at unife.it (Luca Dariz) Date: Thu, 09 Sep 2010 14:12:32 +0200 Subject: [Soap-Python] return String In-Reply-To: References: Message-ID: <4C88CF30.2050102@unife.it> > I've tried all sort of things in all combinations: > - html.decode() > - mark_safe > - smart_str() > - autoescape on, off > - safe filter > > > which client are you using? If you try to unescape the string i guess your client doesn't do it, you can try suds or you can check at http://wiki.python.org/moin/EscapingXml Regards, Luca From luca.dariz at unife.it Fri Sep 10 08:39:49 2010 From: luca.dariz at unife.it (Luca Dariz) Date: Fri, 10 Sep 2010 08:39:49 +0200 Subject: [Soap-Python] return String In-Reply-To: References: <4C88CF30.2050102@unife.it> Message-ID: <4C89D2B5.1030000@unife.it> On 09/09/2010 20:01, Alessandro Ronchi wrote: > 2010/9/9 Luca Dariz: > > >> which client are you using? >> If you try to unescape the string i guess your client doesn't do it, you can >> try suds or you can check at http://wiki.python.org/moin/EscapingXml >> > I've added another
      to the template and now it's ok. Does it > check if it's html? > > no, it's just a normal string. Luca From dieter at handshake.de Sat Sep 11 08:02:45 2010 From: dieter at handshake.de (Dieter Maurer) Date: Sat, 11 Sep 2010 08:02:45 +0200 Subject: [Soap-Python] return String In-Reply-To: References: Message-ID: <19595.7045.106148.390923@gargle.gargle.HOWL> Alessandro Ronchi wrote at 2010-9-9 13:02 +0200: >I have a very simple soapmethod: > >http://dpaste.com/240921/ > >where I render a simple template. >The html result is a SafeString Unicode (I'm using pydev to check) > >SafeUnicode:
    • id='category_tree_3' >href='/it/products/riduttori-motoriduttori-velocita-fissa/?oid=3'>Riduttori >Motoriduttori a velocit? fissa
    • > > >when I return it escapes "<": > >resp = ElementTree.tostring(envelope, encoding=string_encoding) > >returns: >str: xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" >xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" >xmlns:xs="http://www.w3.org/2001/XMLSchema" >xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >xmlns="http://ws.studiopleiadi.com/bonfiglioli/prodotti">xsi:type="xs:string"> <li><a class='current category_tree' >id='category_tree_3' >href='/it/products/riduttori-motoriduttori-velocita-fissa/?oid=3'>Riduttori >Motoriduttori a velocit? fissa ></a></li> It must escape "<" and "&" -- otherwise, the result could not be garanteed valid xml. However, when the message is processed on the client side, the parser should undo the escapes and you will get back the original string (with its "<" and "&"). -- Dieter From burak.arslan at arskom.com.tr Mon Sep 13 18:45:00 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Mon, 13 Sep 2010 19:45:00 +0300 Subject: [Soap-Python] soaplib releases 0.9.4-alpha2 and 0.8.2-beta1 Message-ID: <4C8E550C.5080603@arskom.com.tr> hi, i've just released new versions of soaplib-0.9 and 0.8 branches. 0.8.2 is now in beta, as there was no negative feedback since the release of alpha more than a month ago. zope2 support from github.com/ridha was also merged into this release. see here for more info: http://github.com/arskom/soaplib/issues/closed#issue/4 0.9 is making steady progress, being quite close to beta. many bugs and annoyances are fixed since my last announcement. please help with issue 5: http://github.com/arskom/soaplib/issues#issue/5 i hope you find the newest soaplib packages useful. best regards, burak -------------------------------------------- http://pypi.python.org/pypi/soaplib http://github.com/arskom/soaplib/downloads From burak.arslan at arskom.com.tr Tue Sep 14 14:26:01 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 14 Sep 2010 15:26:01 +0300 Subject: [Soap-Python] soaplib releases 0.9.4-alpha2 and 0.8.2-beta1 In-Reply-To: References: <4C8E550C.5080603@arskom.com.tr> Message-ID: <4C8F69D9.5060103@arskom.com.tr> On 09/14/10 13:47, Roger Hansen wrote: > > Now I thought I might contribute a little by testing the 0.9.4-series > by correcting examples, help with doc, and maybe contribute with code. > > So I've made an account at github, username rogerha. At your > convenience you may consider to extend my privelidges. As for the > first example, I send you a patch by this email: Hello Roger, Thanks a lot for your time. Why not fork soaplib in github, commit your changes there, and make a pull request? with git, everybody has commit privileges. log in to github and click fork in here: http://github.com/arskom/soaplib best regards, burak From bradallen137 at gmail.com Tue Sep 14 14:53:56 2010 From: bradallen137 at gmail.com (Brad Allen) Date: Tue, 14 Sep 2010 07:53:56 -0500 Subject: [Soap-Python] soaplib releases 0.9.4-alpha2 and 0.8.2-beta1 In-Reply-To: <4C8E550C.5080603@arskom.com.tr> References: <4C8E550C.5080603@arskom.com.tr> Message-ID: Thanks for continuing work on soaplib, Burak. We'll be testing the 0.8.2beta at work (we're not yet ready for 0.9 but are planning to move that direction). On Mon, Sep 13, 2010 at 11:45 AM, Burak Arslan wrote: > ?hi, > > i've just released new versions of soaplib-0.9 and 0.8 branches. > > 0.8.2 is now in beta, as there was no negative feedback since the > release of alpha more than a month ago. > > zope2 support from github.com/ridha was also merged into this release. > see here for more info: > http://github.com/arskom/soaplib/issues/closed#issue/4 > > 0.9 is making steady progress, being quite close to beta. many bugs and > annoyances are fixed since my last announcement. > > please help with issue 5: http://github.com/arskom/soaplib/issues#issue/5 > > i hope you find the newest soaplib packages useful. > > best regards, > burak > > -------------------------------------------- > > http://pypi.python.org/pypi/soaplib > http://github.com/arskom/soaplib/downloads > > > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap > From venable.devin at gmail.com Tue Sep 14 22:32:15 2010 From: venable.devin at gmail.com (Devin Venable) Date: Tue, 14 Sep 2010 15:32:15 -0500 Subject: [Soap-Python] soaplib releases 0.9.4-alpha2 and 0.8.2-beta1 In-Reply-To: References: <4C8E550C.5080603@arskom.com.tr> Message-ID: Which is the "official" soaplib? I've been developing on Ubuntu using the packaged python-soaplib. It's not available as a nice package for RedHat (my target machine), so I went out to build it from here: http://github.com/arskom/soaplib But this is not the same library, or it has changed. There is no client.py or wsgi_soap.py. I found this fork: http://github.com/cuker/soaplib.git Which has the classes I expect present in it. Who's the official maintainer? I need a consistent implementation. Devin On Tue, Sep 14, 2010 at 7:53 AM, Brad Allen wrote: > Thanks for continuing work on soaplib, Burak. We'll be testing the > 0.8.2beta at work (we're not yet ready for 0.9 but are planning to > move that direction). > > On Mon, Sep 13, 2010 at 11:45 AM, Burak Arslan > wrote: > > hi, > > > > i've just released new versions of soaplib-0.9 and 0.8 branches. > > > > 0.8.2 is now in beta, as there was no negative feedback since the > > release of alpha more than a month ago. > > > > zope2 support from github.com/ridha was also merged into this release. > > see here for more info: > > http://github.com/arskom/soaplib/issues/closed#issue/4 > > > > 0.9 is making steady progress, being quite close to beta. many bugs and > > annoyances are fixed since my last announcement. > > > > please help with issue 5: > http://github.com/arskom/soaplib/issues#issue/5 > > > > i hope you find the newest soaplib packages useful. > > > > best regards, > > burak > > > > -------------------------------------------- > > > > http://pypi.python.org/pypi/soaplib > > http://github.com/arskom/soaplib/downloads > > > > > > _______________________________________________ > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From burak.arslan at arskom.com.tr Wed Sep 15 08:41:30 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Wed, 15 Sep 2010 09:41:30 +0300 Subject: [Soap-Python] soaplib releases 0.9.4-alpha2 and 0.8.2-beta1 In-Reply-To: References: <4C8E550C.5080603@arskom.com.tr> Message-ID: <4C906A9A.2030503@arskom.com.tr> On 09/14/10 23:32, Devin Venable wrote: > Who's the official maintainer? I need a consistent implementation. there are two soaplib branches, 0.8 and master (released as 0.9), both of which are available at the github.com/arskom/soaplib repo, and the downloads section there. (you'd see if you had looked closer) also, they're quite incompatible. choose whatever suits your needs. burak From rocker.yandex at gmail.com Sun Sep 19 22:19:03 2010 From: rocker.yandex at gmail.com (Alexander Kolesnikov) Date: Mon, 20 Sep 2010 00:19:03 +0400 Subject: [Soap-Python] soaplib and .net compatibility Message-ID: Hi! Are anybody interesting about?soaplib and .net compatibility? I added some changes here:?http://github.com/gt-rocker/soaplib/ My simple example with .net client and soaplib (& Django) service works, but I' not sure for other cases. I tried to return string[], custom type and custom type array. I'm interesting why the 'same' services on soaplib and .net generate different SOAP :) Best regards, Alexander. From burak.arslan at arskom.com.tr Sun Sep 19 22:42:00 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Sun, 19 Sep 2010 23:42:00 +0300 Subject: [Soap-Python] soaplib and .net compatibility In-Reply-To: References: Message-ID: <4C967598.3040209@arskom.com.tr> On 09/19/10 23:19, Alexander Kolesnikov wrote: > Hi! > Are anybody interesting about soaplib and .net compatibility? > I added some changes here: http://github.com/gt-rocker/soaplib/ > > My simple example with .net client and soaplib (& Django) service works, > but I' not sure for other cases. > I tried to return string[], custom type and custom type array. > > I'm interesting why the 'same' services on soaplib and .net generate > different SOAP :) > > Best regards, > Alexander. hello alexander, .net interoperability is of course important for soaplib. is it possible for you to contribute your .net test case, making sure it is similar to the ones in http://github.com/arskom/soaplib/tree/master/src/soaplib/test/interop/ ? a few comments about your patch: 1) it touches more than just .net interop. can you please: git reset --soft HEAD~1 and use git gui to separate that big commit into smaller chunks? you'll need to do git push --force after you do that. 2) your implementation of int type is incomplete. see here: http://www.w3.org/TR/xmlschema-2/#int . you must do proper range checks. i also don't see why the int type should default to nillable=False. 3) i'm not sure about your intentions in the rest of the patch. can you explain how hardcoding a namespace prefix ('emp0') or forcing the default namespace (xmlns="...") to be the target namespace or disabling the ns resolution for the array type helps .net interop? thanks burak From rocker.yandex at gmail.com Mon Sep 20 08:39:19 2010 From: rocker.yandex at gmail.com (Alexander Kolesnikov) Date: Mon, 20 Sep 2010 10:39:19 +0400 Subject: [Soap-Python] soaplib and .net compatibility In-Reply-To: <4C967598.3040209@arskom.com.tr> References: <4C967598.3040209@arskom.com.tr> Message-ID: Hello Burak! > hello alexander, > > .net interoperability is of course important for soaplib. is it possible > for you to contribute your .net test case, making sure it is similar to > the ones in > http://github.com/arskom/soaplib/tree/master/src/soaplib/test/interop/ ? I'll write test with pleasure but I want to ask you some questions before. > a few comments about your patch: > > 1) it touches more than just .net interop. can you please: > > git reset --soft HEAD~1 > > and use git gui to separate that big commit into smaller chunks? you'll > need to do git push --force after you do that. I'm new in git, so thanks for help with it > > 2) your implementation of int type is incomplete. see here: > http://www.w3.org/TR/xmlschema-2/#int . you must do proper range checks. > i also don't see why the int type should default to nillable=False. Yes, it is incomplete. It is possible to specify "nillable=False" in Integer(...), isn't it? I wrote it before understanding soaplib architecture. But I need type with name Int instead of Integer, because .net code generation tool use String to implement Integer. Have you plans to include other SOAP types in primitives? > > 3) i'm not sure about your intentions in the rest of the patch. can you > explain how hardcoding a namespace prefix ('emp0') or forcing the > default namespace (xmlns="...") ?to be the target namespace or disabling > the ns resolution for the array type helps .net interop? This is my cutted example for soaplib 0.9.4.7 (without my patch): from soaplib import service from soaplib.service import rpc from soaplib.serializers import primitive as soap_types, base as soap_base class BasicService(service.DefinitionBase): __tns__ = 'http://tempuri.org/' # of course can be any but this is by default in .net @rpc(soap_types.String, soap_types.Integer, _returns=soap_types.Array(soap_types.String)) def say_hello(self, name, times): results = [] for i in range(0, times): results.append('Hello, %s'%name) return results say_hello returns string array. This is SOAP from my service: Hello, rocker Hello, rocker And this is SOAP from same .net service: rocker rocker We can see defferences in namespace using. We need to fix it. .net service definition is: [ServiceContract] public interface IService1 { [OperationContract] [XmlSerializerFormat(Style = OperationFormatStyle.Rpc, Use = OperationFormatUse.Literal)] string[] say_hello(string name, int times); } It was the first problem I investigated. Do you know simple way to fix it? Sorry if my English not so good. Alexander. From burak.arslan at arskom.com.tr Mon Sep 20 10:30:16 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Mon, 20 Sep 2010 11:30:16 +0300 Subject: [Soap-Python] soaplib and .net compatibility In-Reply-To: References: <4C967598.3040209@arskom.com.tr> Message-ID: <4C971B98.1040305@arskom.com.tr> On 09/20/10 09:39, Alexander Kolesnikov wrote: > Have you plans to include other SOAP types in primitives? > sure, i will include anything that conforms to the specs. i will include your Int patch once you complete its implementation. >> 3) i'm not sure about your intentions in the rest of the patch. can you >> explain how hardcoding a namespace prefix ('emp0') or forcing the >> default namespace (xmlns="...") to be the target namespace or disabling >> the ns resolution for the array type helps .net interop? > This is my cutted example for soaplib 0.9.4.7 (without my patch): > > (...) > > We can see defferences in namespace using. We need to fix it. this xml Hello, rocker Hello, rocker is equivalent to this one: Hello, rocker Hello, rocker so apart from the empty default namespace declaration in .net's response () there's no difference between the two responses. also, in soaplib, it's not possible to have the *Response and *Result tags in different namespaces. but then, i don't see how that's a problem. if you provide a test case, we can work on that. best, burak From rocker.yandex at gmail.com Mon Sep 20 12:01:12 2010 From: rocker.yandex at gmail.com (Alexander Kolesnikov) Date: Mon, 20 Sep 2010 14:01:12 +0400 Subject: [Soap-Python] soaplib and .net compatibility In-Reply-To: <4C971B98.1040305@arskom.com.tr> References: <4C967598.3040209@arskom.com.tr> <4C971B98.1040305@arskom.com.tr> Message-ID: On Mon, Sep 20, 2010 at 12:30 PM, Burak Arslan wrote: > ?On 09/20/10 09:39, Alexander Kolesnikov wrote: >> Have you plans to include other SOAP types in primitives? >> > > sure, i will include anything that conforms to the specs. i will include > your Int patch once you complete its implementation. Is there example how to do checks? Should I do it like in DateTime? Why Decimal has not checks for non-digits? > > so apart from the empty default namespace declaration in .net's response > () there's no difference between the two > responses. > > also, in soaplib, it's not possible to have the *Response and *Result > tags in different namespaces. but then, i don't see how that's a problem. But without xmlns="" I receive empty string array in .net client. This is not clear for me. I'll work on a test case. I use Vusual Studio 2008. I can add entire solution to repository or only code. What is better for you? From burak.arslan at arskom.com.tr Mon Sep 20 12:16:02 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Mon, 20 Sep 2010 13:16:02 +0300 Subject: [Soap-Python] soaplib and .net compatibility In-Reply-To: References: <4C967598.3040209@arskom.com.tr> <4C971B98.1040305@arskom.com.tr> Message-ID: <4C973462.1020604@arskom.com.tr> On 09/20/10 13:01, Alexander Kolesnikov wrote: > On Mon, Sep 20, 2010 at 12:30 PM, Burak Arslan > wrote: >> On 09/20/10 09:39, Alexander Kolesnikov wrote: >>> Have you plans to include other SOAP types in primitives? >>> >> sure, i will include anything that conforms to the specs. i will include >> your Int patch once you complete its implementation. > Is there example how to do checks? Should I do it like in DateTime? whatever floats your boat. > Why Decimal has not checks for non-digits? > what should it check? decimal accepts any number. if it's an invalid one, the decimal constructor will raise an exception. >> so apart from the empty default namespace declaration in .net's response >> () there's no difference between the two >> responses. >> >> also, in soaplib, it's not possible to have the *Response and *Result >> tags in different namespaces. but then, i don't see how that's a problem. > But without xmlns="" I receive empty string array in .net client. > This is not clear for me. > > I'll work on a test case. I use Vusual Studio 2008. I can add entire > solution to repository or only code. > What is better for you? you should add the smallest possible amount of code enough to run the example. if that definition includes project files as well, you should add them inside its own directory: test_dotnet if it's just a single source file, just add test_dotnet.cs to the interop directory. thanks for your time. best regards, burak From rocker.yandex at gmail.com Mon Sep 20 23:52:05 2010 From: rocker.yandex at gmail.com (Alexander Kolesnikov) Date: Tue, 21 Sep 2010 01:52:05 +0400 Subject: [Soap-Python] soaplib and .net compatibility In-Reply-To: <4C973462.1020604@arskom.com.tr> References: <4C967598.3040209@arskom.com.tr> <4C971B98.1040305@arskom.com.tr> <4C973462.1020604@arskom.com.tr> Message-ID: Burak, does soaplib support only "Document / Literal" formatting? Alexander. From burak.arslan at arskom.com.tr Tue Sep 21 06:16:22 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 21 Sep 2010 07:16:22 +0300 Subject: [Soap-Python] soaplib and .net compatibility In-Reply-To: References: <4C967598.3040209@arskom.com.tr> <4C971B98.1040305@arskom.com.tr> <4C973462.1020604@arskom.com.tr> Message-ID: <1285042582.12399.11.camel@Nokia-N900> ----- Original message ----- > Burak, does soaplib support only "Document / Literal" formatting? > yes, the document/literal mode is hardcoded somewhere in the wsdl generation code. burak -------------- next part -------------- An HTML attachment was scrubbed... URL: From rocker.yandex at gmail.com Tue Sep 21 07:46:16 2010 From: rocker.yandex at gmail.com (Alexander Kolesnikov) Date: Tue, 21 Sep 2010 09:46:16 +0400 Subject: [Soap-Python] soaplib and .net compatibility In-Reply-To: References: <4C967598.3040209@arskom.com.tr> <4C971B98.1040305@arskom.com.tr> <4C973462.1020604@arskom.com.tr> <1285042582.12399.11.camel@Nokia-N900> Message-ID: Burak, I experimented yesterday and rewrote my service and client, and now they work without "strange" patching. However, I added Int and Long for further goals: auto-generate valid .net code by wsdl. I can suggest some recommendations for interaction between soaplib service and .net client. 1. Do not generate client contract code by svcutil (or VS built-in GUI, which use svcutil): generator adds redundant MessageContracts for input and output parameters and it doesn't work. 2. Use XmlSerializer instead of DataContractSerializer (which is by default). Add [XmlSerializerFormat] attribute to service contract (interface, marked with [ServiceContract] attribute). 3. Explicitly specify service namespace in [ServiceContract] attribute. 4. Do not change Style and Use in [XmlSerializerFormat] attribute (which are OperationFormatStyle.Document and OperationFormatUse.Literal by default). It works fine. Now contract code as simple as possible. My previous code was full of experimental tricks. I go on with implementing test case. Wrong code generation is the subject of investigation. svcutil haven't option to not use message contracts. May be WSDL can contain hint for code generation? Also I think specifying service name and default namespace for all service types will be usefull things. Thanks, Alexander. -------------- next part -------------- An HTML attachment was scrubbed... URL: From burak.arslan at arskom.com.tr Tue Sep 21 09:52:16 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 21 Sep 2010 10:52:16 +0300 Subject: [Soap-Python] soaplib and .net compatibility In-Reply-To: References: <4C967598.3040209@arskom.com.tr> <4C971B98.1040305@arskom.com.tr> <4C973462.1020604@arskom.com.tr> <1285042582.12399.11.camel@Nokia-N900> Message-ID: <4C986430.1040507@arskom.com.tr> On 09/21/10 08:46, Alexander Kolesnikov wrote: > Burak, I experimented yesterday and rewrote my service and client, and > now they work without "strange" patching. > However, I added Int and Long for further goals: auto-generate valid > .net code by wsdl. > Hello Alexander, I've incorporated your bool patch. However, you should check for long being between -(2**63) and 2**63 -1, and int between -(2**31) and 2**31-1 as per the specs. I will incorporate them as well once you do those checks. (I'd do it myself but I prefer to preserve the original author) > Wrong code generation is the subject of investigation. svcutil haven't > option to not use message contracts. May be WSDL can contain hint for > code generation? > what kind of hints do you think would be useful? i did not find much on, e.g., http://www.mssoapinterop.org/ > Also I think specifying service name and default namespace for all > service types will be usefull things. > I hear you :) I just implemented name customization. But tns can already be customized using the tns argument to the wsgi.Application constructor, maybe I misunderstand what you want to do ? best regards, burak From rocker.yandex at gmail.com Tue Sep 21 12:58:53 2010 From: rocker.yandex at gmail.com (Alexander Kolesnikov) Date: Tue, 21 Sep 2010 14:58:53 +0400 Subject: [Soap-Python] soaplib and .net compatibility In-Reply-To: <4C986430.1040507@arskom.com.tr> References: <4C967598.3040209@arskom.com.tr> <4C971B98.1040305@arskom.com.tr> <4C973462.1020604@arskom.com.tr> <1285042582.12399.11.camel@Nokia-N900> <4C986430.1040507@arskom.com.tr> Message-ID: > > > Also I think specifying service name and default namespace for all > > service types will be usefull things. > > > > I hear you :) I just implemented name customization. But tns can already > be customized using the tns argument to the wsgi.Application > constructor, maybe I misunderstand what you want to do ? I wrote something like #file service/views.py class BasicService(service.DefinitionBase): ... class CustomType(ClassSerializer): .... basic_service = wsgi.Application([BasicService,], 'http://tempuri.org/') BasicService uses 'http://tempuri.org/', but CustomType has namespace 'service.views' (module name). Is it right? And I has second question. How I can implement this (hierarchy): class CustomType(ClassSerializer): .... inner = CustomType # this cause compilation error, because CustomType is not created yet Thanks, Alexander. From burak.arslan at arskom.com.tr Tue Sep 21 13:57:17 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 21 Sep 2010 14:57:17 +0300 Subject: [Soap-Python] soaplib and .net compatibility In-Reply-To: References: <4C967598.3040209@arskom.com.tr> <4C971B98.1040305@arskom.com.tr> <4C973462.1020604@arskom.com.tr> <1285042582.12399.11.camel@Nokia-N900> <4C986430.1040507@arskom.com.tr> Message-ID: <4C989D9D.8030009@arskom.com.tr> On 09/21/10 13:58, Alexander Kolesnikov wrote: >>> Also I think specifying service name and default namespace for all >>> service types will be usefull things. >>> >> I hear you :) I just implemented name customization. But tns can already >> be customized using the tns argument to the wsgi.Application >> constructor, maybe I misunderstand what you want to do ? > I wrote something like > > #file service/views.py > > class BasicService(service.DefinitionBase): > ... > class CustomType(ClassSerializer): > .... > basic_service = wsgi.Application([BasicService,], 'http://tempuri.org/') > > > BasicService uses 'http://tempuri.org/', but CustomType has namespace > 'service.views' (module name). > Is it right? > yes, that's the expected behaviour. do you think it's a bug? you can customize the namespace like so: class CustomType(ClassSerializer): __namespace__ = 'http://example.com/soap' # (...) > And I has second question. How I can implement this (hierarchy): > class CustomType(ClassSerializer): > .... > inner = CustomType # this cause compilation error, because > CustomType is not created yet > try this: class CustomType(ClassSerializer): # (member declarations) # (...) CustomType._type_info['inner']=CustomType best regards, burak From rocker.yandex at gmail.com Tue Sep 21 14:04:42 2010 From: rocker.yandex at gmail.com (Alexander Kolesnikov) Date: Tue, 21 Sep 2010 16:04:42 +0400 Subject: [Soap-Python] soaplib and .net compatibility In-Reply-To: <4C989D9D.8030009@arskom.com.tr> References: <4C967598.3040209@arskom.com.tr> <4C971B98.1040305@arskom.com.tr> <4C973462.1020604@arskom.com.tr> <1285042582.12399.11.camel@Nokia-N900> <4C986430.1040507@arskom.com.tr> <4C989D9D.8030009@arskom.com.tr> Message-ID: >> #file service/views.py >> >> class BasicService(service.DefinitionBase): >> ? ? ... >> class CustomType(ClassSerializer): >> ? ? .... >> basic_service = wsgi.Application([BasicService,], 'http://tempuri.org/') >> >> >> BasicService uses 'http://tempuri.org/', but CustomType has namespace >> 'service.views' (module name). >> Is it right? >> > > yes, that's the expected behaviour. do you think it's a bug? > > you can customize the namespace like so: > > class CustomType(ClassSerializer): > ? ?__namespace__ = 'http://example.com/soap' > > ? ?# (...) I think it's inconvenient to specify default namespace for each type if no need to do this. Certainly it isn't a bug. From burak.arslan at arskom.com.tr Wed Sep 22 19:15:38 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Wed, 22 Sep 2010 20:15:38 +0300 Subject: [Soap-Python] soaplib-1.0.0-beta Message-ID: <4C9A39BA.5090505@arskom.com.tr> hi, judging soaplib to be mature enough after almost two months of testing, here's another release, that also comes with the 1.0 promise: it's useful for most of your basic expectations from soap, but it's also a first step towards implementing a complex protocol. the most notable change is: i moved the array class from primitive to clazz module, where it belongs. there will be no more api changes in the 1.0.x branch, available here: http://github.com/arskom/soaplib/tree/1_0 branch is stable now, and is only going to accept bug fixes and minor improvements. please test it and report your experience. best regards burak From robinp at snap.tv Mon Sep 27 11:46:43 2010 From: robinp at snap.tv (Robin Pedersen) Date: Mon, 27 Sep 2010 11:46:43 +0200 Subject: [Soap-Python] soaplib 0.9/1.0: repeating elements without a bounding element Message-ID: First of all, I'm in the middle of porting a project based on the old 0.8 API to the 0.9/1.0 API, and the new way of doing it is far better. Before, we had to write most of our custom SOAP types overriding to_xml and create the XML code manually, but not anymore. However, I have a problem with repeating elements without a bounding element. There used to be a class called "Repeating", but it was removed as part of the rewrite. What I want to have is basically something like this: # Python class BillItem: id = Integer name = String price = Double class Bill: charge = Double guestName = String billItems = Array(BillItem) # 0.8: Repeating(BillItem) # Generated SOAP 20.0 Mr. Soaplib 1 Kawa 10.0 1 Kawa 10.0 But with "Array", I get this instead: # Generated SOAP 20.0 Mr. Soaplib 1 Kawa 10.0 1 Kawa 10.0 -- Best regards, Robin Pedersen Software Engineer SnapTV AS From burak.arslan at arskom.com.tr Mon Sep 27 12:26:29 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Mon, 27 Sep 2010 13:26:29 +0300 Subject: [Soap-Python] soaplib 0.9/1.0: repeating elements without a bounding element In-Reply-To: References: Message-ID: <4CA07155.4030505@arskom.com.tr> On 09/27/10 12:46, Robin Pedersen wrote: > First of all, I'm in the middle of porting a project based on the old > 0.8 API to the 0.9/1.0 API, and the new way of doing it is far better. > Before, we had to write most of our custom SOAP types overriding > to_xml and create the XML code manually, but not anymore. > > However, I have a problem with repeating elements without a bounding > element. There used to be a class called "Repeating", but it was > removed as part of the rewrite. What I want to have is basically > something like this: > > # Python > class BillItem: > id = Integer > name = String > price = Double > > class Bill: > charge = Double > guestName = String > billItems = Array(BillItem) # 0.8: Repeating(BillItem) > billitems = Billitem.customize(max_occurs='unbounded') should do the job. you should pass an an iterable to it. let me know if it's working. best burak > # Generated SOAP > > 20.0 > Mr. Soaplib > > 1 > Kawa > 10.0 > > > 1 > Kawa > 10.0 > > > > But with "Array", I get this instead: > # Generated SOAP > > 20.0 > Mr. Soaplib > > > 1 > Kawa > 10.0 > > > 1 > Kawa > 10.0 > > > > > From robinp at snap.tv Mon Sep 27 12:43:32 2010 From: robinp at snap.tv (Robin Pedersen) Date: Mon, 27 Sep 2010 12:43:32 +0200 Subject: [Soap-Python] soaplib 0.9/1.0: repeating elements without a bounding element In-Reply-To: <4CA07155.4030505@arskom.com.tr> References: <4CA07155.4030505@arskom.com.tr> Message-ID: On Mon, 27 Sep 2010 12:26:29 +0200, Burak Arslan wrote: > billitems = Billitem.customize(max_occurs='unbounded') should do the > job. you should pass an an iterable to it. let me know if it's working. > Yes! Thank you -- Best regards, Robin Pedersen Software Engineer SnapTV AS From bradallen137 at gmail.com Mon Sep 27 17:57:13 2010 From: bradallen137 at gmail.com (Brad Allen) Date: Mon, 27 Sep 2010 10:57:13 -0500 Subject: [Soap-Python] XML Schema functionality separable? Message-ID: It might be beneficial to have the XML schema functionality of soaplib broken out to a separate package. The ability to define Python classes serializable to XML schemas, as well as the reverse, is generally useful beyond SOAP. Maybe that schema class serializer functionality should be a separate package, or maybe it should get added to an existing XML library such as lxml. Any thoughts? From burak.arslan at arskom.com.tr Mon Sep 27 18:31:31 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Mon, 27 Sep 2010 19:31:31 +0300 Subject: [Soap-Python] XML Schema functionality separable? In-Reply-To: References: Message-ID: <4CA0C6E3.8010208@arskom.com.tr> On 09/27/10 18:57, Brad Allen wrote: > It might be beneficial to have the XML schema functionality of soaplib > broken out to a separate package. > > The ability to define Python classes serializable to XML schemas, as > well as the reverse, is generally useful beyond SOAP. Maybe that > schema class serializer functionality should be a separate package, or > maybe it should get added to an existing XML library such as lxml. > > Any thoughts? why is lxml's objectify not good enough for you? From bradallen137 at gmail.com Mon Sep 27 19:01:37 2010 From: bradallen137 at gmail.com (Brad Allen) Date: Mon, 27 Sep 2010 12:01:37 -0500 Subject: [Soap-Python] XML Schema functionality separable? In-Reply-To: <4CA0C6E3.8010208@arskom.com.tr> References: <4CA0C6E3.8010208@arskom.com.tr> Message-ID: On Mon, Sep 27, 2010 at 11:31 AM, Burak Arslan wrote: > why is lxml's objectify not good enough for you? >From my cursory review of the lxml docs, I didn't see anything like soaplib's support for declarative style class definitions to represent XML schemas and data types. Did I miss something? From burak.arslan at arskom.com.tr Mon Sep 27 19:27:38 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Mon, 27 Sep 2010 20:27:38 +0300 Subject: [Soap-Python] XML Schema functionality separable? In-Reply-To: References: <4CA0C6E3.8010208@arskom.com.tr> Message-ID: <4CA0D40A.8020004@arskom.com.tr> On 09/27/10 20:01, Brad Allen wrote: > On Mon, Sep 27, 2010 at 11:31 AM, Burak Arslan > wrote: >> why is lxml's objectify not good enough for you? > From my cursory review of the lxml docs, I didn't see anything like > soaplib's support for declarative style class definitions to represent > XML schemas and data types. Did I miss something? oh now i get it. yes i think that's a great idea. a good first step is to file an issue about it maybe? best regards, burak From bradallen137 at gmail.com Mon Sep 27 19:43:26 2010 From: bradallen137 at gmail.com (Brad Allen) Date: Mon, 27 Sep 2010 12:43:26 -0500 Subject: [Soap-Python] XML Schema functionality separable? In-Reply-To: <4CA0D40A.8020004@arskom.com.tr> References: <4CA0C6E3.8010208@arskom.com.tr> <4CA0D40A.8020004@arskom.com.tr> Message-ID: The first step would be to separate that code from soaplib. After that, we could look at offering a patch to lxml if it is a good fit. We have some developers at work beginning to dive into the soaplib code, and we can work on that if you like. On Mon, Sep 27, 2010 at 12:27 PM, Burak Arslan wrote: > ?On 09/27/10 20:01, Brad Allen wrote: >> On Mon, Sep 27, 2010 at 11:31 AM, Burak Arslan >> wrote: >>> why is lxml's objectify not good enough for you? >> From my cursory review of the lxml docs, I didn't see anything like >> soaplib's support for declarative style class definitions to represent >> XML schemas and data types. Did I miss something? > > oh now i get it. yes i think that's a great idea. a good first step is > to file an issue about it maybe? > > best regards, > burak > > > From burak.arslan at arskom.com.tr Mon Sep 27 20:19:39 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Mon, 27 Sep 2010 21:19:39 +0300 Subject: [Soap-Python] XML Schema functionality separable? In-Reply-To: References: <4CA0C6E3.8010208@arskom.com.tr> <4CA0D40A.8020004@arskom.com.tr> Message-ID: <4CA0E03B.3090001@arskom.com.tr> On 09/27/10 20:43, Brad Allen wrote: > The first step would be to separate that code from soaplib. After > that, we could look at offering a patch to lxml if it is a good fit. > > We have some developers at work beginning to dive into the soaplib > code, and we can work on that if you like. > i think a work to modularize soaplib should start by separating wsgi logic from soap parsing logic. after that, you can of course work on separating xml schema logic as well. i'm filing issues at github page in case anyone who's looking to contribute to soaplib are looking for a place to start. best, burak > On Mon, Sep 27, 2010 at 12:27 PM, Burak Arslan > wrote: >> On 09/27/10 20:01, Brad Allen wrote: >>> On Mon, Sep 27, 2010 at 11:31 AM, Burak Arslan >>> wrote: >>>> why is lxml's objectify not good enough for you? >>> From my cursory review of the lxml docs, I didn't see anything like >>> soaplib's support for declarative style class definitions to represent >>> XML schemas and data types. Did I miss something? >> oh now i get it. yes i think that's a great idea. a good first step is >> to file an issue about it maybe? >> >> best regards, >> burak >> >> >> From dieter at handshake.de Mon Sep 27 20:00:02 2010 From: dieter at handshake.de (Dieter Maurer) Date: Mon, 27 Sep 2010 20:00:02 +0200 Subject: [Soap-Python] XML Schema functionality separable? In-Reply-To: References: Message-ID: <19616.56226.702508.903070@gargle.gargle.HOWL> Brad Allen wrote at 2010-9-27 10:57 -0500: >It might be beneficial to have the XML schema functionality of soaplib >broken out to a separate package. > >The ability to define Python classes serializable to XML schemas, as >well as the reverse, is generally useful beyond SOAP. Maybe that >schema class serializer functionality should be a separate package, or >maybe it should get added to an existing XML library such as lxml. > >Any thoughts? I will soon start work on SAML2 support for python/Zope. Of course, schema based object serialization/deserialization is important for this task as well. Thus, I find it a great idea. -- Dieter From arbitraryuser at gmail.com Tue Sep 28 08:35:14 2010 From: arbitraryuser at gmail.com (Jonathan Endersby) Date: Tue, 28 Sep 2010 08:35:14 +0200 Subject: [Soap-Python] Soaplib serializing sqlalchemy after disconnect Message-ID: Hi This is a bit of a stab in the dark but I'm hoping that someone has run into this problem too and has a suggestion on how best to handle it. Using soaplib, I have a @soapmethod decorated method (this is the pypi release version of soaplib). Using SQLAlchemy I do a whole bunch of work and return some records to arrays in the response message. I then explicitly close my SA db connection and return, at which point the decorator does all the serialization magic. But, I get a "InvalidRequestError: This Connection is closed" error thrown... I suspect that the objects that are ending up in the serializer are lazy loaded and require the connection to be open in order to be serialized... but I _need_ to explicitly close my connection. Does anyone have any ideas on how to solve this? (I could be doing something totally idiotic, so feel free to question the basics) thanks, j. -- Jonathan Endersby Connect. Share. Trust. www.trustfabric.com? +27 82 414 3129 www.arbitraryuser.com tfid: arbitraryuser You have brains in your head. You have feet in your shoes. You can steer yourself any direction you choose.? - Dr Seuss From burak.arslan at arskom.com.tr Tue Sep 28 10:05:56 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 28 Sep 2010 11:05:56 +0300 Subject: [Soap-Python] Soaplib serializing sqlalchemy after disconnect In-Reply-To: References: Message-ID: <4CA1A1E4.7070105@arskom.com.tr> On 09/28/10 09:35, Jonathan Endersby wrote: > Hi > > This is a bit of a stab in the dark but I'm hoping that someone has > run into this problem too and has a suggestion on how best to handle > it. > > Using soaplib, I have a @soapmethod decorated method (this is the pypi > release version of soaplib). Using SQLAlchemy I do a whole bunch of > work and return some records to arrays in the response message. I > then explicitly close my SA db connection and return, at which point > the decorator does all the serialization magic. > > But, I get a "InvalidRequestError: This Connection is closed" error thrown... > > I suspect that the objects that are ending up in the serializer are > lazy loaded and require the connection to be open in order to be > serialized... but I _need_ to explicitly close my connection. > > Does anyone have any ideas on how to solve this? (I could be doing > something totally idiotic, so feel free to question the basics) > hi, you should only run into this using the orm part of sqlalchemy. did you try the expunge call? it might work in your case (it doesn't always work) 0.5: http://www.sqlalchemy.org/docs/05/reference/orm/sessions.html#sqlalchemy.orm.session.Session.expunge 0.6: http://www.sqlalchemy.org/docs/reference/orm/sessions.html#sqlalchemy.orm.session.Session.expunge the bad news is that it is messy to deal with this using a legacy soaplib version, and actually one of the reasons why i separated applications and service definitions for the newest soaplib. you can extend service.DefinitionBase from the latest beta to close the session in its destructor. this will also save you from the hassle of manually closing sessions at the end of each request. but then, you'll have to deal with api changes, which may or may not be worth the trouble for you. there's also an experimental, totally undocumented sqlalchemy table serializer in the latest soaplib that you might want to give a try. i hope that helps. best regards burak From burak.arslan at arskom.com.tr Tue Sep 28 10:57:38 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 28 Sep 2010 11:57:38 +0300 Subject: [Soap-Python] soaplib 1.0.0-beta4 Message-ID: <4CA1AE02.8040604@arskom.com.tr> hi, better tests, better examples, better source code documentation and one important fix, (http://github.com/arskom/soaplib/issues/closed#issue/8) all in the newest soaplib release. have fun! best, burak http://pypi.python.org/pypi/soaplib/1.0.0-beta4 http://github.com/arskom/soaplib/downloads From burak.arslan at arskom.com.tr Tue Sep 28 22:22:49 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 28 Sep 2010 23:22:49 +0300 Subject: [Soap-Python] tests & documentation Message-ID: <4CA24E99.1090009@arskom.com.tr> hello, as of now, i think the biggest issue with the soaplib-1.0 branch seems to be its lack of documentation, and issues with the test suite. i have started spending time on documenting the source code, but i think i need some insight from someone who's read my code: what are the places you found most obscure? where should i add clarifications? did you have any wtf moments? i added docstrings to most functions in soaplib.wsgi module. hooks and overridable functions (i.e. most of the public api) seem to be documented. any other general advice you could give me about documenting soaplib? as for the tests, i'm currently adding some documents for running tests. please help with fixing failing tests. we shouldn't do a stable release without all tests passing! see also docs issue: http://github.com/arskom/soaplib/issues#issue/19 tests issue: http://github.com/arskom/soaplib/issues#issue/20 thanks all for your time. best regards, burak From burak.arslan at arskom.com.tr Wed Sep 29 14:57:52 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Wed, 29 Sep 2010 15:57:52 +0300 Subject: [Soap-Python] XML Schema functionality separable? In-Reply-To: References: Message-ID: <4CA337D0.3030100@arskom.com.tr> On 09/27/10 18:57, Brad Allen wrote: > It might be beneficial to have the XML schema functionality of soaplib > broken out to a separate package. > > The ability to define Python classes serializable to XML schemas, as > well as the reverse, is generally useful beyond SOAP. Maybe that > schema class serializer functionality should be a separate package, or > maybe it should get added to an existing XML library such as lxml. > > Any thoughts? > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap fwiw, see the first paragraph here: http://codespeak.net/pipermail/lxml-dev/2010-July/005555.html it looks like the lxml maintainer has similar things in his mind. best, burak From dieter at handshake.de Thu Sep 30 08:54:42 2010 From: dieter at handshake.de (Dieter Maurer) Date: Thu, 30 Sep 2010 08:54:42 +0200 Subject: [Soap-Python] XML Schema functionality separable? In-Reply-To: <19616.56226.702508.903070@gargle.gargle.HOWL> References: <19616.56226.702508.903070@gargle.gargle.HOWL> Message-ID: <19620.13362.393468.246115@gargle.gargle.HOWL> Dieter Maurer wrote at 2010-9-27 20:00 +0200: >Brad Allen wrote at 2010-9-27 10:57 -0500: >>It might be beneficial to have the XML schema functionality of soaplib >>broken out to a separate package. >> >>The ability to define Python classes serializable to XML schemas, as >>well as the reverse, is generally useful beyond SOAP. Maybe that >>schema class serializer functionality should be a separate package, or >>maybe it should get added to an existing XML library such as lxml. >> >>Any thoughts? > >I will soon start work on SAML2 support for python/Zope. >Of course, schema based object serialization/deserialization >is important for this task as well. > >Thus, I find it a great idea. I have found "http://pypi.python.org/pypi/PyXB/1.1.0" which seems to provide extensive xml schema support. More precisely, it takes an XML schema and generates associated Python classes whose instances represent schema instances. It provides serialization and deserialization for class/schema instances. Looks promising for the schema related part of my task. However, I have not yet have a deep look at the package. -- Dieter From burak.arslan at arskom.com.tr Thu Sep 30 09:42:50 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 30 Sep 2010 10:42:50 +0300 Subject: [Soap-Python] XML Schema functionality separable? In-Reply-To: <19620.13362.393468.246115@gargle.gargle.HOWL> References: <19616.56226.702508.903070@gargle.gargle.HOWL> <19620.13362.393468.246115@gargle.gargle.HOWL> Message-ID: <4CA43F7A.7070707@arskom.com.tr> On 09/30/10 09:54, Dieter Maurer wrote: > Dieter Maurer wrote at 2010-9-27 20:00 +0200: >> Brad Allen wrote at 2010-9-27 10:57 -0500: >>> It might be beneficial to have the XML schema functionality of soaplib >>> broken out to a separate package. >>> >>> The ability to define Python classes serializable to XML schemas, as >>> well as the reverse, is generally useful beyond SOAP. Maybe that >>> schema class serializer functionality should be a separate package, or >>> maybe it should get added to an existing XML library such as lxml. >>> >>> Any thoughts? >> I will soon start work on SAML2 support for python/Zope. >> Of course, schema based object serialization/deserialization >> is important for this task as well. >> >> Thus, I find it a great idea. > I have found "http://pypi.python.org/pypi/PyXB/1.1.0" > which seems to provide extensive xml schema support. > > More precisely, it takes an XML schema and generates associated > Python classes whose instances represent schema instances. It provides > serialization and deserialization for class/schema instances. > > Looks promising for the schema related part of my task. > However, I have not yet have a deep look at the package. > it looks like the effort to extract xml schema code from soaplib will not be necessary. can you share your experience if you look at this package deeper? i also would like to note that wsdl has extensions to xml schema types, like native arrays. so if you need strict xml schema support, the code inside soaplib may not turn out to be what you want in the future. best regards, burak From dieter at handshake.de Thu Sep 30 13:41:14 2010 From: dieter at handshake.de (Dieter Maurer) Date: Thu, 30 Sep 2010 13:41:14 +0200 Subject: [Soap-Python] XML Schema functionality separable? In-Reply-To: <4CA43F7A.7070707@arskom.com.tr> References: <4CA43F7A.7070707@arskom.com.tr> Message-ID: <19620.30554.120494.114918@gargle.gargle.HOWL> Burak Arslan wrote at 2010-9-30 10:42 +0300: > ... "http://pypi.python.org/pypi/PyXB/1.1.0" ... >it looks like the effort to extract xml schema code from soaplib will >not be necessary. can you share your experience if you look at this >package deeper? Sure. I have meanwhile had a deeper look at the documentation available on SourceForge. Looks very good: high quality documentation and a flexible product. >i also would like to note that wsdl has extensions to xml schema types, >like native arrays. so if you need strict xml schema support, the code >inside soaplib may not turn out to be what you want in the future. I think that extensions of this kind will not pose big problems for "PyXB": one defines the new "BindingClass" for the extension and registers it. Maybe, I have found one limitation: binding customization appears to be global. One can easily customize the binding (between types and Python classes) but it works apparently by changing the original binding class (or some global registry indirectly be a call of a class method). One cannot customize differently within a single application. -- Dieter From venable.devin at gmail.com Thu Sep 30 17:18:12 2010 From: venable.devin at gmail.com (Devin Venable) Date: Thu, 30 Sep 2010 10:18:12 -0500 Subject: [Soap-Python] Migrating from 0_8 to 1_0 Message-ID: Looking through the trunk, I find a few references to SimpleWSGIApp, but it's not in the source. $ grep -R SimpleWSGI . ./examples/hooks.py:from soaplib.wsgi_soap import SimpleWSGIApp ./examples/hooks.py:class HelloWorldService(SimpleWSGIApp): ./doc/source/pages/helloworld.rst: class HelloWorldService(SimpleWSGISoapApp): I thought Application might be the replacement, but the method names are very different. What's the upgrade path and what major changes should I look for when upgrading? Also, I know that the 0_8 library is in the Debian/Ubuntu repositories. Folks like me who have been writing code on the old library would expect a backwards-compatibility layer when upgrading. Without one I'm not sure the package maintainers will upgrade to 1_0. I'm not sure of this, but just wanted to raise the issue. Devin -------------- next part -------------- An HTML attachment was scrubbed... URL: From burak.arslan at arskom.com.tr Thu Sep 30 19:32:19 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 30 Sep 2010 20:32:19 +0300 Subject: [Soap-Python] Migrating from 0_8 to 1_0 In-Reply-To: References: Message-ID: <4CA4C9A3.9030308@arskom.com.tr> On 09/30/10 18:18, Devin Venable wrote: > Looking through the trunk, I find a few references to SimpleWSGIApp, > but it's not in the source. > > $ grep -R SimpleWSGI . > ./examples/hooks.py:from soaplib.wsgi_soap import SimpleWSGIApp > ./examples/hooks.py:class HelloWorldService(SimpleWSGIApp): > ./doc/source/pages/helloworld.rst: class > HelloWorldService(SimpleWSGISoapApp): > > I thought Application might be the replacement, but the method names > are very different. What's the upgrade path and what major changes > should I look for when upgrading? > hi, soaplib was almost re-written. (i even thought about changing the name of the package.) you won't find much in common, nor a complete one-to-one mapping between the old and new way of doing things. For example, @soapmethod was renamed to @rpc, and that's all you need to change for that, but SimpleWSGISoapApp was split in two (soon to be three) classes, namely DefinitionBase and Application. The reason for that was to let Application serve many DefinitionBase children. you've stumbled upon the outdated parts of the examples and the documentation. please help by improving them. > Also, I know that the 0_8 library is in the Debian/Ubuntu > repositories. Folks like me who have been writing code on the old > library would expect a backwards-compatibility layer when upgrading. unless you're willing to do that yourself, the best you can do is to file an issue and hope someone to pick up and do it. > Without one I'm not sure the package maintainers will upgrade to 1_0. > I'm not sure of this, but just wanted to raise the issue. > > to be honest, i prefer they'd drop the soaplib package. i also recommend you to remove debian-supplied soaplib package from your system and get the latest 0.8.x or 1.0.x using your favorite interface to pypi. best regards burak