From burak.arslan at arskom.com.tr Sat Sep 1 13:00:51 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Sat, 01 Sep 2012 14:00:51 +0300 Subject: [Soap-Python] Spyne-2.8.x-rc Message-ID: <5041EAE3.3010001@arskom.com.tr> All, Lo and behold: http://travis-ci.org/#!/arskom/spyne The test coverage is not that great, but this is already a good start. Please contribute tests! They are tremendously helpful, and especially so now that this integration is done. Also, to those who made travis-ci.org happen: You guys rock. You've made the world a better place. Thanks a bunch. Cheers, Burak -------------- next part -------------- An HTML attachment was scrubbed... URL: From israel at eraalaska.net Thu Sep 6 23:39:56 2012 From: israel at eraalaska.net (Israel Brewster) Date: Thu, 6 Sep 2012 13:39:56 -0800 Subject: [Soap-Python] WS-Security with certificates? Message-ID: I am trying to figure out how to create a SOAP client for a service that requires WS-Security and uses certificates for authentication. Looking at the sample request they provided, it looks as though the wise security header contains the key, certificate, and some sort of signature. However, in looking online, all I can seem to find are examples of using WS-Security with a username and password. Are there any SAOP libraries available that provide support for WS-Security with certificates and signatures? Thanks. ----------------------------------------------- Israel Brewster Computer Support Technician II Era Alaska 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7250 x7293 ----------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Israel Brewster.vcf Type: text/directory Size: 417 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From reingart at gmail.com Fri Sep 7 17:14:45 2012 From: reingart at gmail.com (Mariano Reingart) Date: Fri, 7 Sep 2012 12:14:45 -0300 Subject: [Soap-Python] WS-Security with certificates? In-Reply-To: References: Message-ID: Hello Israel: Do you have any example of a WS-Security with certificate data. And XML request message would be useful. Best regards, Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com On Thu, Sep 6, 2012 at 6:39 PM, Israel Brewster wrote: > I am trying to figure out how to create a SOAP client for a service that > requires WS-Security and uses certificates for authentication. Looking at > the sample request they provided, it looks as though the wise security > header contains the key, certificate, and some sort of signature. However, > in looking online, all I can seem to find are examples of using WS-Security > with a username and password. Are there any SAOP libraries available that > provide support for WS-Security with certificates and signatures? Thanks. > > ----------------------------------------------- > Israel Brewster > Computer Support Technician II > Era Alaska > 5245 Airport Industrial Rd > Fairbanks, AK 99709 > (907) 450-7250 x7293 > ----------------------------------------------- > > > > > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap > From raphael.barrois at polyconseil.fr Fri Sep 7 17:21:12 2012 From: raphael.barrois at polyconseil.fr (=?iso-8859-1?Q?Rapha=EBl_Barrois?=) Date: Fri, 7 Sep 2012 17:21:12 +0200 Subject: [Soap-Python] Soap client: is suds abandoned? Message-ID: Hi there, I'm running into more and more issues with suds (issue with recursive WSDLs, no support for timezone-aware datetimes, ?) ; there are patches on the suds tracker[1] for those issues but no release since october 2010, no accepted patches, ? Thus, my questions are: - Is suds still maintained on another support (not https://fedorahosted.org/suds/) ? - Is there an active, main fork of suds somewhere (github, bitbucket, other?) - Are there other actively maintained python client libraries with comparable functionalities? Thanks, -- Rapha?l Barrois [1]: https://fedorahosted.org/suds/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From azurit at pobox.sk Fri Sep 7 17:30:10 2012 From: azurit at pobox.sk (azurIt) Date: Fri, 07 Sep 2012 17:30:10 +0200 Subject: [Soap-Python] Soap client: is suds abandoned? In-Reply-To: References: Message-ID: <20120907173010.5A2CE5C8@pobox.sk> Hi, i don't know if it's still under development but it's author is still doing support on suds's IRC channel (check out suds's homepage). azur ______________________________________________________________ > Od: "Rapha?l Barrois" > Komu: > D?tum: 07.09.2012 17:21 > Predmet: [Soap-Python] Soap client: is suds abandoned? > >Hi there, > >I'm running into more and more issues with suds (issue with recursive WSDLs, no support for timezone-aware datetimes, ?) ; there are patches on the suds tracker[1] for those issues but no release since october 2010, no accepted patches, ? > >Thus, my questions are: >- Is suds still maintained on another support (not https://fedorahosted.org/suds/) ? >- Is there an active, main fork of suds somewhere (github, bitbucket, other?) >- Are there other actively maintained python client libraries with comparable functionalities? > >Thanks, > >-- >Rapha?l Barrois > > >[1]: https://fedorahosted.org/suds/ > >---------- > >_______________________________________________ >Soap mailing list >Soap at python.org >http://mail.python.org/mailman/listinfo/soap > From israel at eraalaska.net Fri Sep 7 19:33:37 2012 From: israel at eraalaska.net (Israel Brewster) Date: Fri, 7 Sep 2012 09:33:37 -0800 Subject: [Soap-Python] WS-Security with certificates? In-Reply-To: References: Message-ID: Yep. Here you go - the sample request provided by the company I'm trying to work with. It's kinda ugly, but hopefully helpful in finding a solution. As this is the public example they post on their website, I figure it should be fairly safe to share 2012-08-02T15:38:14.062Z 2012-08-02T15:43:14.062Z aU53M6ufa/yIi/8Cf0SYnDqFNxg= Ra4sTc78C9XUm1Fr/PnCF8GzLKcQsvp4zU0AZIcsh4N9LfczMKmfGAHWiYi7uATIAcAHs1t6diqhrzndLB9q0j1fjRowCNszQ4cgCIuKKeqzAXVA1ZkT7h63hZu0Je6mhXD00VCK40FG8p+VumZw8sVASSj1lPrrTqTQR6mZMsM= [x509 encoded certificate goes here] CcedwmiGz5BM/IMhSiHt8yVSIU8= ITjzmx37JQs/8E+TdSXfApXCU96hLF/t2U6V7B39ZIc6y7oQpWDU4Xpqib63WUZEvoMtOWMeK/vl bJLoHVgwV/zkcBguEMGOTRSbJwQ7kfl15samDKXLy7I2/pN8hpV7b+AqM1xnM6xmhbljl7Xu0ou0 /PbebqE+GciDO6IVvSs= http://int2.myidtravel.com/ws/services/UploadService urn:uuid:13C80BD4B1F84AE17F1343921893115 urn:StaffProfilesUpload rSpEJkpoaveOKLvNV2EdY38XcwXMMdqRyVHL0+x0x8Pn9jW0oiNr54AP/I5k4OX7kPTisoD1ZccT agFspo8zKeNZZmEMJcecjV5m7AdeCtpKrhJ6thTM6GC//7bzw5AlRwtqHmnpiI2qMXE5hZDoeCGm umyqfxNy0gvNKaYAHKsTe92PDWo96oKgcBEtiToP5vpEYvfxjGjXQYjAsX/i2Ni9KSr0aFZvTDio 89lZJF1nQkcb237pjStKXF7w6uqLzgckDPVtbx4eTg28pPim6u/pLBjGIFGOR8KFOyNJ6UZC1Atw SXmdFGzD2pySmoAxm1Ue9G9ohK34SR+0bRWoATPrEMXqKJ3M63mgbF4xcyDulLAkuJt5Z8Myeljh sPJKfWWpjaUCTn3ynlU5fXwYMA/WdTDlq4ddq7NprfNf2gP7eCz7E1sPNrC9b5DcMiqrkQgK61y2 TTVGAozhb4plrawDithPjiVLERuJkL7ce4JbDGFyGkF4Bl5Tkwsf7NYOk46jR1LYM5XhAxqDJpI6 bb+t3f+7P7cqN7PUqYGFEGrZWtizZkDS6Wk7v0y6N3xHFTrswcQcwCu/qqxF+yUaCtw4UInkMkLA cjCgRNzPzqPWocvrgBWu18PjEW1nW3lMqqFWu8DvBcjXyN/QqnJpMIuGA/9++Rp3rHl2+IS0BVpV FaFn8bA6ju151ZaIttfktss7HfHZZ5mMDXmA33trekcgtZCmdL4mjMpAGcMVYpAWT5eCNVbfJpa9 mr6c+Ir514uq6S38o/eOHrUx49UTEXhN0IET288yhMdTp58ztAAvGuwbQA0qPX5CcnEbDP0Sm/OF EDLHJz+CCVWPrzJZh7+s8/kMGZkTmk7q8qTXG5tV3+zWGiHTW5aoA2xOT8jvcx30Cjp+HTECURKw rZF+m7x9dFrtAOnAPpiD8zmkDY+1+eLMnmQ4Dp94bJHi3ekKJ0xpplK5cV+MuvKfmYGkOAI+VaWJ WCriZfI88dh6+CneVUJHKMkNJxN5CJj2aY7868fOQdC0ZZzN4ujuSnrBeDDeJh26JuAziL5UZQ1E yJqpjv8VxBQDJUe8aEg6jMYF6kfE56yx+rR3qjzwiVQSSBRSQ3dQRG7/KIs+dhOg9N0k6nB3wA9E 11xcekz8Vt7I7GZH/Ye4/9xM21ATtHsdJ8mJB7Sy7Sxs0JgKE53B6FzAG+WD5OOYOcN2ZifXymTn JAR0jH0Ue58gx2pTV4pwxcZ+68i/194gWGcFezFiFGccy8KP2XsmZIdBRJjbrN+PZP2T5d6Dht56 eJkzDCB+PNwc26rFVFBp2ZyZNLWmbq5qJ9cYpqhsi6qHGll7VWkTP8G2U2S1Uxq5u8Thf7D6K5Te rSiHJiVTIdbYUIJ75TmnRhoitYQj3NbDGPIz6/TZfVCeLFA1WG9+6yunRO/N5VhUp0oec0kxe7p9 SdXK76v7BbkLoLotddXLUI4lidj0ejzB955bW9oUqh3ILH6gd6OJHDM8OHu29Cza79ZE2OURBhG9 6Jr26MAlKLQ2+yLUzEFfZAR+iwmGsAWppEXHFXFybKxtslegePxFmZ7TXmel7eE3VsNSX0kx6oYT 64c0 ----------------------------------------------- Israel Brewster Computer Support Technician II Era Alaska 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7250 x7293 ----------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: Israel Brewster.vcf Type: text/directory Size: 417 bytes Desc: not available URL: -------------- next part -------------- On Sep 7, 2012, at 7:14 AM, Mariano Reingart wrote: > Hello Israel: > > Do you have any example of a WS-Security with certificate data. > And XML request message would be useful. > > Best regards, > > Mariano Reingart > http://www.sistemasagiles.com.ar > http://reingart.blogspot.com > > > On Thu, Sep 6, 2012 at 6:39 PM, Israel Brewster wrote: >> I am trying to figure out how to create a SOAP client for a service that >> requires WS-Security and uses certificates for authentication. Looking at >> the sample request they provided, it looks as though the wise security >> header contains the key, certificate, and some sort of signature. However, >> in looking online, all I can seem to find are examples of using WS-Security >> with a username and password. Are there any SAOP libraries available that >> provide support for WS-Security with certificates and signatures? Thanks. >> >> ----------------------------------------------- >> Israel Brewster >> Computer Support Technician II >> Era Alaska >> 5245 Airport Industrial Rd >> Fairbanks, AK 99709 >> (907) 450-7250 x7293 >> ----------------------------------------------- >> >> >> >> >> _______________________________________________ >> Soap mailing list >> Soap at python.org >> http://mail.python.org/mailman/listinfo/soap >> From vsza at vsza.hu Mon Sep 10 10:53:22 2012 From: vsza at vsza.hu (Veres-Szentkiralyi Andras) Date: Mon, 10 Sep 2012 10:53:22 +0200 Subject: [Soap-Python] WS-Security with certificates? In-Reply-To: References: Message-ID: <201209101053.22780.vsza@vsza.hu> Hi, I managed to solve this with SUDS as my masters thesis, the code is available here: https://github.com/dnet/SudsSigner https://github.com/dnet/pyxmlsec Usage and internals are described in my thesis: http://vsza.hu/thesis-beta.pdf If you have any problems, tell me and I'll try to help. Regards, Andr?s Veres-Szentkir?lyi 2012. szeptember 6. cs?t?rt?k 23:39:56 d?tummal Israel Brewster ezt ?rta: > I am trying to figure out how to create a SOAP client for a service that > requires WS-Security and uses certificates for authentication. Looking at > the sample request they provided, it looks as though the wise security > header contains the key, certificate, and some sort of signature. However, > in looking online, all I can seem to find are examples of using > WS-Security with a username and password. Are there any SAOP libraries > available that provide support for WS-Security with certificates and > signatures? Thanks. > > ----------------------------------------------- > Israel Brewster > Computer Support Technician II > Era Alaska > 5245 Airport Industrial Rd > Fairbanks, AK 99709 > (907) 450-7250 x7293 > ----------------------------------------------- From fdemmer at gmail.com Mon Sep 17 16:01:48 2012 From: fdemmer at gmail.com (Florian Demmer) Date: Mon, 17 Sep 2012 16:01:48 +0200 Subject: [Soap-Python] exclude docstrings from wsdl? Message-ID: <50572D4C.1040705@demmer.org> hi! is there an option to not have tags with the even if there are docstrings in the @rpc decorated functions? br, Florian From burak.arslan at arskom.com.tr Mon Sep 17 21:52:13 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Mon, 17 Sep 2012 22:52:13 +0300 Subject: [Soap-Python] exclude docstrings from wsdl? In-Reply-To: <50572D4C.1040705@demmer.org> References: <50572D4C.1040705@demmer.org> Message-ID: <50577F6D.8050802@arskom.com.tr> hello, On 17/09/12 17:01, Florian Demmer wrote: > hi! > > is there an option to not have tags with the > even if there are docstrings in the @rpc decorated > functions? > not in spyne. but you can remove them with some xpath magic in a wsdl event. burak From fdemmer at gmail.com Tue Sep 18 11:38:57 2012 From: fdemmer at gmail.com (Florian Demmer) Date: Tue, 18 Sep 2012 11:38:57 +0200 Subject: [Soap-Python] exclude docstrings from wsdl? In-Reply-To: <50577F6D.8050802@arskom.com.tr> References: <50572D4C.1040705@demmer.org> <50577F6D.8050802@arskom.com.tr> Message-ID: <50584131.9070101@gmail.com> On 09/17/2012 09:52 PM, Burak Arslan wrote: > hello, > > On 17/09/12 17:01, Florian Demmer wrote: >> hi! >> >> is there an option to not have tags with the >> even if there are docstrings in the @rpc decorated >> functions? >> > not in spyne. but you can remove them with some xpath magic in a wsdl > event. > > burak so this works now: def _remove_docstrings(ctx): #log.debug('_remove_docstrings') from lxml import etree root = etree.XML(ctx.transport.wsdl) for element in root.findall('.//{%s}documentation' % NS_WSDL): element.getparent().remove(element) ctx.transport.wsdl = etree.tostring(root, xml_declaration=True, encoding="UTF-8") app.event_manager.add_listener('wsdl', _remove_docstrings) but it requires reading the xml string into an etree, changing the etree, writing xml again to the context. i tried using the 'document_built' event of the wsdl11 interface, but there for some reason i did not get the complete wsdl, but only the "xs" parts. is there another event i missed, where i get the etree before it is made tostring? thanks, Florian -------------- next part -------------- An HTML attachment was scrubbed... URL: From reingart at gmail.com Tue Sep 18 20:02:31 2012 From: reingart at gmail.com (Mariano Reingart) Date: Tue, 18 Sep 2012 15:02:31 -0300 Subject: [Soap-Python] WS-Security with certificates? In-Reply-To: References: Message-ID: Hello Israel: There is a new patch to allow arbitrary xml headers made by remco.boerma (cc'd) http://code.google.com/p/pysimplesoap/issues/detail?id=78 Does it address your problem? Sorry, I didn't have enought time to see this in detail, but as AFAIK it should be doable with pysimplesoap (including the encription part if required), Best regards, Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com On Fri, Sep 7, 2012 at 2:33 PM, Israel Brewster wrote: > Yep. Here you go - the sample request provided by the company I'm trying to work with. It's kinda ugly, but hopefully helpful in finding a solution. As this is the public example they post on their website, I figure it should be fairly safe to share > > > > > > > 2012-08-02T15:38:14.062Z > 2012-08-02T15:43:14.062Z > > > > > > aU53M6ufa/yIi/8Cf0SYnDqFNxg= > > > > Ra4sTc78C9XUm1Fr/PnCF8GzLKcQsvp4zU0AZIcsh4N9LfczMKmfGAHWiYi7uATIAcAHs1t6diqhrzndLB9q0j1fjRowCNszQ4cgCIuKKeqzAXVA1ZkT7h63hZu0Je6mhXD00VCK40FG8p+VumZw8sVASSj1lPrrTqTQR6mZMsM= > > > > > > [x509 encoded certificate goes here] > > > > > > > > > > CcedwmiGz5BM/IMhSiHt8yVSIU8= > > > ITjzmx37JQs/8E+TdSXfApXCU96hLF/t2U6V7B39ZIc6y7oQpWDU4Xpqib63WUZEvoMtOWMeK/vl bJLoHVgwV/zkcBguEMGOTRSbJwQ7kfl15samDKXLy7I2/pN8hpV7b+AqM1xnM6xmhbljl7Xu0ou0 /PbebqE+GciDO6IVvSs= > > > > > > > > http://int2.myidtravel.com/ws/services/UploadService > urn:uuid:13C80BD4B1F84AE17F1343921893115 > urn:StaffProfilesUpload > > > > > > > > > > > rSpEJkpoaveOKLvNV2EdY38XcwXMMdqRyVHL0+x0x8Pn9jW0oiNr54AP/I5k4OX7kPTisoD1ZccT agFspo8zKeNZZmEMJcecjV5m7AdeCtpKrhJ6thTM6GC//7bzw5AlRwtqHmnpiI2qMXE5hZDoeCGm umyqfxNy0gvNKaYAHKsTe92PDWo96oKgcBEtiToP5vpEYvfxjGjXQYjAsX/i2Ni9KSr0aFZvTDio 89lZJF1nQkcb237pjStKXF7w6uqLzgckDPVtbx4eTg28pPim6u/pLBjGIFGOR8KFOyNJ6UZC1Atw SXmdFGzD2pySmoAxm1Ue9G9ohK34SR+0bRWoATPrEMXqKJ3M63mgbF4xcyDulLAkuJt5Z8Myeljh sPJKfWWpjaUCTn3ynlU5fXwYMA/WdTDlq4ddq7NprfNf2gP7eCz7E1sPNrC9b5DcMiqrkQgK61y2 TTVGAozhb4plrawDithPjiVLERuJkL7ce4JbDGFyGkF4Bl5Tkwsf7NYOk46jR1LYM5XhAxqDJpI6 bb+t3f+7P7cqN7PUqYGFEGrZWtizZkDS6Wk7v0y6N3xHFTrswcQcwCu/qqxF+yUaCtw4UInkMkLA cjCgRNzPzqPWocvrgBWu18PjEW1nW3lMqqFWu8DvBcjXyN/QqnJpMIuGA/9++Rp3rHl2+IS0BVpV FaFn8bA6ju151ZaIttfktss7HfHZZ5mMDXmA33trekcgtZCmdL4mjMpAGcMVYpAWT5eCNVbfJpa9 mr6c+Ir514uq6S38o/eOHrUx49UTEXhN0IET288yhMdTp58ztAAvGuwbQA0qPX5CcnEbDP0Sm/OF EDLHJz+CCVWPrzJZh7+s8/kMGZkTmk7q8qTXG5tV3+zWGiHTW5aoA2xOT8jvcx30Cjp+HTECURKw rZF+m7x9dFrtAOnAPpiD8zmkDY+1+eLMnmQ4Dp94bJHi3ekKJ0xpplK5cV+MuvKfmYGkOAI+VaWJ WCriZfI88dh6+CneVUJHKMkNJxN5CJj2aY7868fOQdC0ZZzN4ujuSnrBeDDeJh26JuAziL5UZQ1E yJqpjv8VxBQDJUe8aEg6jMYF6kfE56yx+rR3qjzwiVQSSBRSQ3dQRG7/KIs+dhOg9N0k6nB3wA9E 11xcekz8Vt7I7GZH/Ye4/9xM21ATtHsdJ8mJB7Sy7Sxs0JgKE53B6FzAG+WD5OOYOcN2ZifXymTn JAR0jH0Ue58gx2pTV4pwxcZ+68i/194gWGcFezFiFGccy8KP2XsmZIdBRJjbrN+PZP2T5d6Dht56 eJkzDCB+PNwc26rFVFBp2ZyZNLWmbq5qJ9cYpqhsi6qHGll7VWkTP8G2U2S1Uxq5u8Thf7D6K5Te rSiHJiVTIdbYUIJ75TmnRhoitYQj3NbDGPIz6/TZfVCeLFA1WG9+6yunRO/N5VhUp0oec0kxe7p9 SdXK76v7BbkLoLotddXLUI4lidj0ejzB955bW9oUqh3ILH6gd6OJHDM8OHu29Cza79ZE2OURBhG9 6Jr26MAlKLQ2+yLUzEFfZAR+iwmGsAWppEXHFXFybKxtslegePxFmZ7TXmel7eE3VsNSX0kx6oYT 64c0 > > > > > ----------------------------------------------- > Israel Brewster > Computer Support Technician II > Era Alaska > 5245 Airport Industrial Rd > Fairbanks, AK 99709 > (907) 450-7250 x7293 > ----------------------------------------------- > > > > On Sep 7, 2012, at 7:14 AM, Mariano Reingart wrote: > >> Hello Israel: >> >> Do you have any example of a WS-Security with certificate data. >> And XML request message would be useful. >> >> Best regards, >> >> Mariano Reingart >> http://www.sistemasagiles.com.ar >> http://reingart.blogspot.com >> >> >> On Thu, Sep 6, 2012 at 6:39 PM, Israel Brewster wrote: >>> I am trying to figure out how to create a SOAP client for a service that >>> requires WS-Security and uses certificates for authentication. Looking at >>> the sample request they provided, it looks as though the wise security >>> header contains the key, certificate, and some sort of signature. However, >>> in looking online, all I can seem to find are examples of using WS-Security >>> with a username and password. Are there any SAOP libraries available that >>> provide support for WS-Security with certificates and signatures? Thanks. >>> >>> ----------------------------------------------- >>> Israel Brewster >>> Computer Support Technician II >>> Era Alaska >>> 5245 Airport Industrial Rd >>> Fairbanks, AK 99709 >>> (907) 450-7250 x7293 >>> ----------------------------------------------- >>> >>> >>> >>> >>> _______________________________________________ >>> Soap mailing list >>> Soap at python.org >>> http://mail.python.org/mailman/listinfo/soap >>> > > From burak.arslan at arskom.com.tr Wed Sep 19 00:31:50 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Wed, 19 Sep 2012 01:31:50 +0300 Subject: [Soap-Python] exclude docstrings from wsdl? In-Reply-To: <50584131.9070101@gmail.com> References: <50572D4C.1040705@demmer.org> <50577F6D.8050802@arskom.com.tr> <50584131.9070101@gmail.com> Message-ID: <5058F656.7060703@arskom.com.tr> On 18/09/12 12:38, Florian Demmer wrote: > > so this works now: > > > > but it requires reading the xml string into an etree, changing the > etree, writing xml again to the context. > Hi Florian, I will fix this in the next Spyne release, I was not aware that the document_built events were not working. In the mean time you can use this hack: app = Application(...) wsgi_app = WsgiApplication(app) wsdl = Wsdl11(app.interface) wsdl.build_interface_document("https://example.com/some_app/?wsdl") for element in wsdl.root_elt.findall('.//{%s}documentation' % NS_WSDL): element.getparent().remove(element)wsdl.root_elt.xpath() wsgi_app._wsdl = wsdl.get_interface_document() Does it work? Best, Burak -------------- next part -------------- An HTML attachment was scrubbed... URL: From fdemmer at gmail.com Wed Sep 19 02:04:26 2012 From: fdemmer at gmail.com (Florian Demmer) Date: Wed, 19 Sep 2012 02:04:26 +0200 Subject: [Soap-Python] exclude docstrings from wsdl? In-Reply-To: <5058F656.7060703@arskom.com.tr> References: <50572D4C.1040705@demmer.org> <50577F6D.8050802@arskom.com.tr> <50584131.9070101@gmail.com> <5058F656.7060703@arskom.com.tr> Message-ID: <50590C0A.6020305@gmail.com> On 09/19/2012 12:31 AM, Burak Arslan wrote: > On 18/09/12 12:38, Florian Demmer wrote: >> >> so this works now: >> >> >> >> but it requires reading the xml string into an etree, changing the >> etree, writing xml again to the context. >> > > Hi Florian, > > I will fix this in the next Spyne release, I was not aware that the > document_built events were not working. > > In the mean time you can use this hack: > > app = Application(...) > wsgi_app = WsgiApplication(app) > wsdl = Wsdl11(app.interface) > wsdl.build_interface_document("https://example.com/some_app/?wsdl") > for element in wsdl.root_elt.findall('.//{%s}documentation' % NS_WSDL): > element.getparent().remove(element)wsdl.root_elt.xpath() > wsgi_app._wsdl = wsdl.get_interface_document() > > Does it work? nope does not... added a linebreak after the remove(), the xpath was an oversight, right? maybe it's because my wsgi_app is actually the djangoapp? wsdl = Wsdl11(app.interface) wsdl.build_interface_document("https://example.com/some_app/?wsdl") for element in wsdl.root_elt.findall('.//{%s}documentation' % NS_WSDL): element.getparent().remove(element) #wsdl.root_elt.xpath() wsgi_app._wsdl = wsdl.get_interface_document() but anyway!... ... i do not expect too much load on the wsdl and i think i can live with the read-xml/etree/write-xml with the "wsdl" callback. can improve with a later spyne release. thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From burak.arslan at arskom.com.tr Thu Sep 20 09:44:42 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 20 Sep 2012 10:44:42 +0300 Subject: [Soap-Python] exclude docstrings from wsdl? In-Reply-To: <50590C0A.6020305@gmail.com> References: <50572D4C.1040705@demmer.org> <50577F6D.8050802@arskom.com.tr> <50584131.9070101@gmail.com> <5058F656.7060703@arskom.com.tr> <50590C0A.6020305@gmail.com> Message-ID: <505AC96A.5020608@arskom.com.tr> Hello Florian, The fix is in the trunk now. Here's how it's supposed to work: https://github.com/arskom/spyne/blob/ab4d5da372a6a8345685e6fb999cbef4e93273a4/spyne/test/interface/test_wsgi.py#L58 Best, Burak On 19/09/12 03:04, Florian Demmer wrote: > On 09/19/2012 12:31 AM, Burak Arslan wrote: >> On 18/09/12 12:38, Florian Demmer wrote: >>> >>> so this works now: >>> >>> >>> >>> but it requires reading the xml string into an etree, changing the >>> etree, writing xml again to the context. >>> >> >> Hi Florian, >> >> I will fix this in the next Spyne release, I was not aware that the >> document_built events were not working. >> >> In the mean time you can use this hack: >> >> app = Application(...) >> wsgi_app = WsgiApplication(app) >> wsdl = Wsdl11(app.interface) >> wsdl.build_interface_document("https://example.com/some_app/?wsdl") >> for element in wsdl.root_elt.findall('.//{%s}documentation' % NS_WSDL): >> element.getparent().remove(element)wsdl.root_elt.xpath() >> wsgi_app._wsdl = wsdl.get_interface_document() >> >> Does it work? > > nope does not... added a linebreak after the remove(), the xpath was > an oversight, right? > maybe it's because my wsgi_app is actually the djangoapp? > > wsdl = Wsdl11(app.interface) > wsdl.build_interface_document("https://example.com/some_app/?wsdl") > for element in wsdl.root_elt.findall('.//{%s}documentation' % > NS_WSDL): > element.getparent().remove(element) > #wsdl.root_elt.xpath() > wsgi_app._wsdl = wsdl.get_interface_document() > > but anyway!... > ... i do not expect too much load on the wsdl and i think i can live > with the read-xml/etree/write-xml with the "wsdl" callback. can > improve with a later spyne release. > > thanks! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jaakko.rytkonen at gmail.com Sat Sep 22 02:13:30 2012 From: jaakko.rytkonen at gmail.com (=?ISO-8859-1?Q?Jaakko_Rytk=F6nen?=) Date: Sat, 22 Sep 2012 03:13:30 +0300 Subject: [Soap-Python] deserialize without MethodContext in spyne Message-ID: <505D02AA.5020107@gmail.com> Hi, I'm using spyne for prototyping application and looking a simple way to deserialize a soap string into python objects without using MethodContext. I have writtten quite a lot handlers whitch are bound to python instances and would like to be able to reuse those. Maybe a simplified example is more describing: =================================== # In a django view class ProcessorService( ServiceBase ): @rpc( StatusMessage, _returns = StatusResponse ) def set_statusmsg( ctx, srmsg ): try: result = processCommonPart(srmsg.common) except ProcessingError: raise try: result = processIndividuals(srmsg.indvidual) except ProcessingError: raise return result theservice = csrf_exempt( DjangoApplication( Application( [ProcessorService], tns = "the.process.service", interface = Wsdl11(), in_protocol = Soap11(), out_protocol = Soap11(), name = "ProcessorService", ) ) ) =============================================== # elsewhere # retry processing caught (and saved) faulty soaprequests def reprocess(soapstring): # here I need the magic soapobj = deserialize_soap(soapstring) srmsg = soapobj.path.to.correct.elemnt.srmsg # Use the same methods without hickups try: result = processCommonPart(srmsg.common) except ProcessingError: raise try: result = processIndividuals(srmsg.indvidual) except ProcessingError: raise =============================================== From burak.arslan at arskom.com.tr Sat Sep 22 14:30:12 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Sat, 22 Sep 2012 15:30:12 +0300 Subject: [Soap-Python] deserialize without MethodContext in spyne In-Reply-To: <505D02AA.5020107@gmail.com> References: <505D02AA.5020107@gmail.com> Message-ID: <505DAF54.8080806@arskom.com.tr> Hello, The "right" way to do this is to implement a queue client/server transport pair like in https://github.com/plq/spyne/blob/08eb5137b948d1ba6c4526e1f2b3402f693d090a/examples/queue.py The quick and dirty way would be to use ServerBase directly instead of subclassing it, like here: https://github.com/plq/spyne/blob/8a096fb1a32298b5375a1e3e0c8e93987c58958b/spyne/util/protocol.py#L26 Here's how you're supposed to use it: https://github.com/plq/spyne/blob/8a096fb1a32298b5375a1e3e0c8e93987c58958b/spyne/test/test_util.py#L53 Does it help? Best, Burak On 22/09/12 03:13, Jaakko Rytk?nen wrote: > Hi, > > I'm using spyne for prototyping application and looking a simple way > to deserialize a soap string into python objects without using > MethodContext. > I have writtten quite a lot handlers whitch are bound to python > instances and would like to be able to reuse those. > > Maybe a simplified example is more describing: > > =================================== > # In a django view > class ProcessorService( ServiceBase ): > @rpc( StatusMessage, _returns = StatusResponse ) > def set_statusmsg( ctx, srmsg ): > > try: > result = processCommonPart(srmsg.common) > except ProcessingError: > raise > > try: > result = processIndividuals(srmsg.indvidual) > except ProcessingError: > raise > > return result > > theservice = csrf_exempt( DjangoApplication( Application( > [ProcessorService], > tns = "the.process.service", > interface = Wsdl11(), > in_protocol = Soap11(), > out_protocol = Soap11(), > name = "ProcessorService", > > ) ) ) > > =============================================== > > # elsewhere > # retry processing caught (and saved) faulty soaprequests > def reprocess(soapstring): > > # here I need the magic > soapobj = deserialize_soap(soapstring) > srmsg = soapobj.path.to.correct.elemnt.srmsg > > # Use the same methods without hickups > try: > result = processCommonPart(srmsg.common) > except ProcessingError: > raise > > try: > result = processIndividuals(srmsg.indvidual) > except ProcessingError: > raise > > =============================================== > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap From jaakko.rytkonen at gmail.com Sat Sep 22 17:47:11 2012 From: jaakko.rytkonen at gmail.com (=?ISO-8859-1?Q?Jaakko_Rytk=F6nen?=) Date: Sat, 22 Sep 2012 18:47:11 +0300 Subject: [Soap-Python] deserialize without MethodContext in spyne In-Reply-To: <505DAF54.8080806@arskom.com.tr> References: <505D02AA.5020107@gmail.com> <505DAF54.8080806@arskom.com.tr> Message-ID: <505DDD7F.8020508@gmail.com> 22.09.2012 15:30, Burak Arslan kirjoitti: > Hello, > > The "right" way to do this is to implement a queue client/server > transport pair like in > https://github.com/plq/spyne/blob/08eb5137b948d1ba6c4526e1f2b3402f693d090a/examples/queue.py > > The quick and dirty way would be to use ServerBase directly instead of > subclassing it, like here: > > https://github.com/plq/spyne/blob/8a096fb1a32298b5375a1e3e0c8e93987c58958b/spyne/util/protocol.py#L26 > > > Here's how you're supposed to use it: > https://github.com/plq/spyne/blob/8a096fb1a32298b5375a1e3e0c8e93987c58958b/spyne/test/test_util.py#L53 > > > Does it help? Thank you. It did, although I managed to confuse @rpc and @srpc usage (again). Thanks again for providing example for more sustainable solution in the future. > > Best, > Burak > > On 22/09/12 03:13, Jaakko Rytk?nen wrote: >> Hi, >> >> I'm using spyne for prototyping application and looking a simple way >> to deserialize a soap string into python objects without using >> MethodContext. >> I have writtten quite a lot handlers whitch are bound to python >> instances and would like to be able to reuse those. >> >> Maybe a simplified example is more describing: >> >> =================================== >> # In a django view >> class ProcessorService( ServiceBase ): >> @rpc( StatusMessage, _returns = StatusResponse ) >> def set_statusmsg( ctx, srmsg ): >> >> try: >> result = processCommonPart(srmsg.common) >> except ProcessingError: >> raise >> >> try: >> result = processIndividuals(srmsg.indvidual) >> except ProcessingError: >> raise >> >> return result >> >> theservice = csrf_exempt( DjangoApplication( Application( >> [ProcessorService], >> tns = "the.process.service", >> interface = Wsdl11(), >> in_protocol = Soap11(), >> out_protocol = Soap11(), >> name = "ProcessorService", >> >> ) ) ) >> >> =============================================== >> >> # elsewhere >> # retry processing caught (and saved) faulty soaprequests >> def reprocess(soapstring): >> >> # here I need the magic >> soapobj = deserialize_soap(soapstring) >> srmsg = soapobj.path.to.correct.elemnt.srmsg >> >> # Use the same methods without hickups >> try: >> result = processCommonPart(srmsg.common) >> except ProcessingError: >> raise >> >> try: >> result = processIndividuals(srmsg.indvidual) >> except ProcessingError: >> raise >> >> =============================================== >> _______________________________________________ >> Soap mailing list >> Soap at python.org >> http://mail.python.org/mailman/listinfo/soap > -------------- next part -------------- An HTML attachment was scrubbed... URL: