From joni.kivinen at simosol.fi Wed Nov 14 16:04:37 2012 From: joni.kivinen at simosol.fi (Joni Kivinen) Date: Wed, 14 Nov 2012 17:04:37 +0200 Subject: [Soap-Python] Spyne: Dealing with schema reference namespaces OR how to return raw xml to client? Message-ID: Hey, I'm trying to get the response from spyne to match up with a set of fixed schemas, and I'm running to a wall trying to deal with referenced elements. As an example, using these two schema files: base.xsd: addon.xsd: the result should be something like: Value0 1 but whatever I try, I can't figure out how to change the namespace of immediate children with the spyne classes (while in this case I'm dealing with enumerations, I can't seem to change it for any other types either, complex or not). As a quick example of one way I'm trying to solve this: addon = Enum('1', '2', type_name='Addon') addon.__namespace__ = 'http://xml.test.org/addon' class Test(ComplexModel): __namespace__ = 'http://xml.test.org/base' Value = String Addon = addon test = Test(Value='1', Addon='2') print lxml.etree.tostring(get_object_as_xml(test), pretty_print=True) results in: 1 2 That all said, if there is a way to just return raw xml to the client, that'd work as a workaround for me just fine. - Joni From burak.arslan at arskom.com.tr Wed Nov 14 16:17:39 2012 From: burak.arslan at arskom.com.tr (burak.arslan at arskom.com.tr) Date: Wed, 14 Nov 2012 15:17:39 +0000 Subject: [Soap-Python] Spyne: Dealing with schema reference namespaces OR how to return raw xml to client? In-Reply-To: References: Message-ID: Hi, I will have a look at the namespace issue, but you have two options to work around this problem: 1) use the XmlDocument output protocol. That will let you return arbitrary ComplexModel subclasses as raw Xml. 2) Keep using the soap protocol but use an event to alter the return document after the function returns but before the xml is serialized to string. Best, Burak -- Sent from my mobile. Pardon the brevity. On 14.11.2012 17:04 Joni Kivinen wrote: Hey, I'm trying to get the response from spyne to match up with a set of fixed schemas, and I'm running to a wall trying to deal with referenced elements. As an example, using these two schema files: base.xsd: addon.xsd: the result should be something like: Value0 1 but whatever I try, I can't figure out how to change the namespace of immediate children with the spyne classes (while in this case I'm dealing with enumerations, I can't seem to change it for any other types either, complex or not). As a quick example of one way I'm trying to solve this: addon = Enum('1', '2', type_name='Addon') addon.__namespace__ = 'http://xml.test.org/base' class Test(ComplexModel): __namespace__ = 'http://xml.test.org/base' Value = String Addon = addon test = Test(Value='1', Addon='2') print lxml.etree.tostring(get_object_as_xml(test), pretty_print=True) results in: 1 2 That all said, if there is a way to just return raw xml to the client, that'd work as a workaround for me just fine. - Joni _______________________________________________ Soap mailing list Soap at python.org http://xml.test.org/base -------------- next part -------------- An HTML attachment was scrubbed... URL: From burak.arslan at arskom.com.tr Fri Nov 16 11:45:55 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Fri, 16 Nov 2012 12:45:55 +0200 Subject: [Soap-Python] SOAP Fault In-Reply-To: References: <506AABCC.4010103@arskom.com.tr> <506DAAD3.7010907@arskom.com.tr> <506DBD72.4050300@arskom.com.tr> <506EC2DC.2080302@arskom.com.tr> <507B2566.30106@arskom.com.tr> <5093B5B2.2020808@arskom.com.tr> Message-ID: <50A61963.6070703@arskom.com.tr> Hi Stefan, I undertook the work of bringing your branch up-to-date with mine. So far so good: https://github.com/plq/spyne/tree/to_string_reorg I changed your update to ValidationError as it broke backwards compatibility and updated the rest of the code accordingly. I also re-read spyne.protocol._model comparing it with my spyne.model.primitive in order not to miss any update done after you moved the functions out and reflected a few changes to your branch. I have a suggestion: You might remember this concern of yours regarding the Option 1 that we're working on: > Cons: Harder to follow the code when you don't have the > {to,from}_string function in there respective classes. Maybe we should make prot.to_string call cls.to_string for SimpleModel (and ModelBase) to make it easier to implement user-defined types, instead of blindly calling str(value). This will address your concern above and make it possible to implement custom types without overriding __str__ in the native type. What do you think? We can also move DateTime.default_parse and Date.default_parse calls to spyne.protocol.soap. That's the only place where those calls are used anyway. This will let you throw ValidationError from those functions as well. Now as for your original questions: On 10/29/12 21:08, Stefan Andersson wrote: >>> model/complex.py in ComplexModelBase >>> to_dict -> get_members_pairs -> v.to_string Let's move the to_dict logic ProtocolBase as well. >>> xml_schema/model.py in Tget_range_restriction_tag calls cls.to_string >>> and from what I can see ProtocolBase is not available XmlSchema. >>> Just call to_string from own ProtocolBase: a265c5f We can merge as soon as the test suite is happy: https://travis-ci.org/plq/spyne/builds/3225525 I don't think it's as bad as it looks :) Best, Burak -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas.akakpo at gmail.com Tue Nov 20 15:43:33 2012 From: thomas.akakpo at gmail.com (Thomas AYIH-AKAKPO) Date: Tue, 20 Nov 2012 17:43:33 +0300 Subject: [Soap-Python] Encoding issues on docstrings Message-ID: Hi all, I've started to use spyne 2.9.3 and stumbled upon this: when I use French characters in the docstring of a function, I get an "AssertionError" when I try to connect to the service[0]: >>> from suds.client import Client >>> c = Client('http://localhost:7789/?wsdl') ERROR:spyne.server.wsgi:All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/spyne/server/wsgi.py", line 214, in __handle_wsdl_request self.doc.wsdl11.build_interface_document(url) File "/usr/local/lib/python2.7/dist-packages/spyne/interface/wsdl/wsdl11.py", line 237, in build_interface_document self.add_port_type(s, root, service_name, types, self.url) File "/usr/local/lib/python2.7/dist-packages/spyne/interface/wsdl/wsdl11.py", line 346, in add_port_type documentation.text = method.doc File "lxml.etree.pyx", line 904, in lxml.etree._Element.text.__set__ (src/lxml/lxml.etree.c:37197) File "apihelpers.pxi", line 721, in lxml.etree._setNodeText (src/lxml/lxml.etree.c:16865) File "apihelpers.pxi", line 1369, in lxml.etree._utf8 (src/lxml/lxml.etree.c:22147) ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters Traceback (most recent call last): File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run self.result = application(self.environ, self.start_response) File "/usr/local/lib/python2.7/dist-packages/spyne/server/wsgi.py", line 172, in __call__ return self.__handle_wsdl_request(req_env, start_response, url) File "/usr/local/lib/python2.7/dist-packages/spyne/server/wsgi.py", line 224, in __handle_wsdl_request start_response(HTTP_500, ctx.transport.resp_headers.items()) File "/usr/lib/python2.7/wsgiref/handlers.py", line 178, in start_response assert type(val) is StringType,"Header values must be strings" AssertionError: Header values must be strings 127.0.0.1 - - [20/Nov/2012 17:21:24] "GET /?wsdl HTTP/1.1" 500 59 As far as I am concerned, I produce a lot of code intended for French speaking maintainers; therefore my docstrings will contain quite a lot of specific characters like '?' , '?', '?', ... In order to make it work, I modified spyne/interface/wsdl/wsdl11.py like this: import sys reload(sys) sys.setdefaultencoding('utf-8') (line 346) documentation.text = unicode(method.doc) Of course, the result is the same when just surrounding the docstring with unicode(). But it felt wrong to me. Have you got any idea why I get this encoding issue? Regards, -- Thomas [0] I use the example at https://github.com/arskom/spyne/blob/master/examples/helloworld_soap.py ; just added a special French character in the docstring -------------- next part -------------- An HTML attachment was scrubbed... URL: From kulapard at gmail.com Tue Nov 20 16:39:27 2012 From: kulapard at gmail.com (KulaPard) Date: Tue, 20 Nov 2012 19:39:27 +0400 Subject: [Soap-Python] Problem with simpleContent Message-ID: Hello Can you please help me? I need to realise this part of web-service: ---------------------------------------- ---------------------------------------- to recieve message like this: ---------------------------------------- Blabla Blabovich 20 ---------------------------------------- I tried to use Spyne with XmlAttribute, but it do not support primitive types yet. Any ideas how to realise this functionality? Maybe you can advise me other libraries? Maybe some hacks or tricks with Spyne? Sorry for bad english :) Taras -------------- next part -------------- An HTML attachment was scrubbed... URL: From eduardo.lujan.p at gmail.com Sat Nov 17 17:44:01 2012 From: eduardo.lujan.p at gmail.com (Eduardo Lujan) Date: Sat, 17 Nov 2012 10:44:01 -0600 Subject: [Soap-Python] Hi . WSSE question Message-ID: Hi , WSSE authentication methos is possible with spyne ? Best Regards Eduardo Lujan -------------- next part -------------- An HTML attachment was scrubbed... URL: From szimszon at oregpreshaz.eu Thu Nov 1 20:20:01 2012 From: szimszon at oregpreshaz.eu (Gyuris Szabolcs) Date: Thu, 01 Nov 2012 19:20:01 -0000 Subject: [Soap-Python] problem with non-ascii charts in SOAP call Message-ID: <5092C9B9.1040803@oregpreshaz.eu> Hello, I wonder if somebody could help me. *What steps will reproduce the problem?* 1. try something like: res=client.RegisterShipment(request={u'ShipmentId':u'kett?'}) *What is the expected output? What do you see instead?* res=client.RegisterShipment(request={u'ShipmentId':u'kett?'}) File "/home/szimszon/fejlesztes/sajat/web2py/gluon/contrib/pysimplesoap/client.py", line 147, in return lambda *args, **kwargs: self.wsdl_call(attr,*args,**kwargs) File "/home/szimszon/fejlesztes/sajat/web2py/gluon/contrib/pysimplesoap/client.py", line 326, in wsdl_call response = self.call(method, *params) File "/home/szimszon/fejlesztes/sajat/web2py/gluon/contrib/pysimplesoap/client.py", line 211, in call self.xml_response = self.send(method, self.xml_request) File "/home/szimszon/fejlesztes/sajat/web2py/gluon/contrib/pysimplesoap/client.py", line 245, in send location, "POST", body=xml, headers=headers) File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1444, in request (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey) File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1196, in _request (response, content) = self._conn_request(conn, request_uri, method, body, headers) File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1133, in _conn_request conn.request(method, request_uri, body, headers) File "/usr/lib/python2.7/httplib.py", line 958, in request self._send_request(method, url, body, headers) File "/usr/lib/python2.7/httplib.py", line 992, in _send_request self.endheaders(body) File "/usr/lib/python2.7/httplib.py", line 954, in endheaders self._send_output(message_body) File "/usr/lib/python2.7/httplib.py", line 812, in _send_output msg += message_body UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 348: ordinal not in range(128) http://code.google.com/p/pysimplesoap/issues/detail?id=83 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4447 bytes Desc: S/MIME kriptogr??fiai al????r??s URL: From dieter at handshake.de Tue Nov 20 19:31:14 2012 From: dieter at handshake.de (Dieter Maurer) Date: Tue, 20 Nov 2012 19:31:14 +0100 Subject: [Soap-Python] Encoding issues on docstrings In-Reply-To: References: Message-ID: <20651.52338.861405.562589@localhost.localdomain> Thomas AYIH-AKAKPO wrote at 2012-11-20 17:43 +0300: >I've started to use spyne 2.9.3 and stumbled upon this: when I use French >characters in the docstring of a function, I get an "AssertionError" when I >try to connect to the service[0]: > >>>> from suds.client import Client >>>> c = Client('http://localhost:7789/?wsdl') > > >ERROR:spyne.server.wsgi:All strings must be XML compatible: Unicode or >ASCII, no NULL bytes or control characters Try to use unicode docstrings, i.e. def f(...): u"""""" rather than def f(...): """""" -- Dieter From israel at eraalaska.net Tue Nov 20 19:11:13 2012 From: israel at eraalaska.net (Israel Brewster) Date: Tue, 20 Nov 2012 09:11:13 -0900 Subject: [Soap-Python] WS-Security with certificates? In-Reply-To: References: Message-ID: <4F9C0ACC-D34F-40B7-915A-6D88386EEAEC@eraalaska.net> Sorry about the long delay on this thread - I think at least one response got lost in my junk mail filter, and in the meantime we got a java based solution working. However, the Java based solution doesn't work on the latest mac os (I'm running Mac OS X 10.8.2), and I don't know Java at all, so I'm back to trying to figure out a python solution. As far as custom headers go, that's not really the problem. I can get the headers into the soap envelope, but I don't have a clue how to generate the proper headers and encrypted body in the first place. According to google, Andr?s Veres-Szentkir?lyi posted a response that looked promising (I never got the message, unless it got lost in my junk mail filter), however I am having problems with that as well. I was able to build the pyxmlsec module with only minimal difficulty, but when I try to import xmlsec I get the following error: >>> import xmlsec Traceback (most recent call last): File "", line 1, in File "/Library/Python/2.7/site-packages/xmlsec.py", line 46, in import xmlsecmod ImportError: dlopen(/Library/Python/2.7/site-packages/xmlsecmod.so, 2): Symbol not found: _xmlSecOpenSSLAppGetDefaultPwdCallback Referenced from: /Library/Python/2.7/site-packages/xmlsecmod.so Expected in: flat namespace in /Library/Python/2.7/site-packages/xmlsecmod.so so that's not working either. Any other thoughts/solutions to this particular issue? Thanks. ----------------------------------------------- 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 18, 2012, at 10:02 AM, Mariano Reingart wrote: > 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 dsuch at gefira.pl Tue Nov 20 20:30:35 2012 From: dsuch at gefira.pl (Dariusz Suchojad) Date: Tue, 20 Nov 2012 20:30:35 +0100 Subject: [Soap-Python] WS-Security with certificates? In-Reply-To: <4F9C0ACC-D34F-40B7-915A-6D88386EEAEC@eraalaska.net> References: <4F9C0ACC-D34F-40B7-915A-6D88386EEAEC@eraalaska.net> Message-ID: <50ABDA5B.3060307@gefira.pl> Israel Brewster wrote: > Any other thoughts/solutions to this particular issue? In one project, I worked around all the issues related to various xmlsec bindings by simply invoking xmlsec1 in a subprocess whenever it was needed, which meant signature verification and decryption in that case. Wrapped in a convenient API the whole thing simply exposed two methods, think def verify(self, xml) and def decrypt(self, xml). I wasn't particularly concerned about the performance penalty of an additional one tenth of a second because it was part of a bigger SAML2 exchange which already took some 10 or 12 seconds to complete due to a sleepy IdP. Besides, it wasn't invoked more than several hundred times a day. I can't say I was overly happy that I had to do it that way but having spent several days on various other cleaner approaches, I did welcome the only working one without further complaints. cheers, -- Dariusz Suchojad From dsuch at gefira.pl Tue Nov 20 20:35:23 2012 From: dsuch at gefira.pl (Dariusz Suchojad) Date: Tue, 20 Nov 2012 20:35:23 +0100 Subject: [Soap-Python] Hi . WSSE question In-Reply-To: References: Message-ID: <50ABDB7B.5050305@gefira.pl> Eduardo Lujan wrote: > WSSE authentication methos is possible with spyne ? Hi Eduardo, this is a plug, but please have a look at sec-wall in case Spyne isn't the thing - actually I'm not sure if Spyne supports WSSE or not. http://www.sec-wall.gefira.pl/documentation/usage-examples/index.html cheers, -- Dariusz Suchojad From burak.arslan at arskom.com.tr Tue Nov 20 23:33:31 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Wed, 21 Nov 2012 00:33:31 +0200 Subject: [Soap-Python] Hi . WSSE question In-Reply-To: <50ABDB7B.5050305@gefira.pl> References: <50ABDB7B.5050305@gefira.pl> Message-ID: <50AC053B.5060208@arskom.com.tr> On 11/20/12 21:35, Dariusz Suchojad wrote: > Eduardo Lujan wrote: > >> WSSE authentication methos is possible with spyne ? > > Hi Eduardo, > > this is a plug, but please have a look at sec-wall in case Spyne isn't > the thing - actually I'm not sure if Spyne supports WSSE or not. Hi, Spyne has no WSSE Support. Maybe we should integrate sec-wall into Spyne so that they integrate via method calls instead of tcp sockets. How easy would that be? Best, Burak From dsuch at gefira.pl Tue Nov 20 23:45:10 2012 From: dsuch at gefira.pl (Dariusz Suchojad) Date: Tue, 20 Nov 2012 23:45:10 +0100 Subject: [Soap-Python] Hi . WSSE question In-Reply-To: <50AC053B.5060208@arskom.com.tr> References: <50ABDB7B.5050305@gefira.pl> <50AC053B.5060208@arskom.com.tr> Message-ID: <50AC07F6.5060503@gefira.pl> Burak Arslan wrote: > Spyne has no WSSE Support. Maybe we should integrate sec-wall into Spyne > so that they integrate via method calls instead of tcp sockets. How easy > would that be? Hm, not sure really how much much work it is because I've never used Spyne. sec-wall's WSSE feature is abstracted out into a separate module so it can be re-used outside the project. https://github.com/dsuch/sec-wall/blob/master/code/src/secwall/wsse.py See here for an API usage example https://github.com/dsuch/sec-wall/blob/master/code/src/secwall/server.py#L78 BTW. I'm 100% willing to re-license the necessary code under a more permissive license. cheers, -- Dariusz Suchojad From burak.arslan at arskom.com.tr Wed Nov 21 01:01:18 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Wed, 21 Nov 2012 02:01:18 +0200 Subject: [Soap-Python] Hi . WSSE question In-Reply-To: <50AC07F6.5060503@gefira.pl> References: <50ABDB7B.5050305@gefira.pl> <50AC053B.5060208@arskom.com.tr> <50AC07F6.5060503@gefira.pl> Message-ID: <50AC19CE.1060803@arskom.com.tr> On 11/21/12 00:45, Dariusz Suchojad wrote: > Burak Arslan wrote: >> Spyne has no WSSE Support. Maybe we should integrate sec-wall into Spyne >> so that they integrate via method calls instead of tcp sockets. How easy >> would that be? > > Hm, not sure really how much much work it is because I've never used > Spyne. sec-wall's WSSE feature is abstracted out into a separate > module so it can be re-used outside the project. Well, It's easy to take over after Spyne parses the Xml string into an element tree. (you should not use vanilla parser in etree.fromstring because comments in SOAP messages would get in your way) You can just add a 'method_call' event to a ServiceBase subclass (let's call it WsseServiceBase) and make WSSE validation/decryption there, just like you do it in the example you sent me. You can do the reverse operation in a method_return_document event. The new ServiceBase subclass does not have to be in Spyne repo, so I don't think there'd be a need for a license change. Otherwise, just send a pull request and we can talk there. Best, Burak From ugurcanergn at gmail.com Wed Nov 21 01:31:25 2012 From: ugurcanergn at gmail.com (=?ISO-8859-1?Q?Ugurcan_Erg=FCn?=) Date: Wed, 21 Nov 2012 02:31:25 +0200 Subject: [Soap-Python] Problem with simpleContent In-Reply-To: References: Message-ID: We created an XmlAttribute parameter called attribute_of for providing primitive type support. For example when you want to recieve a mesaage like this foo A model service pair like that will do the trick (This example is taken from the test case of this feature ) class a(ComplexModel): b = Unicode c = XmlAttribute(Unicode, ns="spam", attribute_of="b") class SomeService(ServiceBase): @srpc(_returns=a) def some_call(): return a(b="foo",c="bar") For source code of this feature you can see https://github.com/arskom/spyne/pull/161 2012/11/20 KulaPard > Hello > Can you please help me? > > I need to realise this part of web-service: > ---------------------------------------- > > > > > > > > > > > > > > > > ---------------------------------------- > to recieve message like this: > ---------------------------------------- > > Blabla > Blabovich > 20 > > ---------------------------------------- > I tried to use Spyne with XmlAttribute, but it do not support primitive > types yet. > Any ideas how to realise this functionality? Maybe you can advise me other > libraries? > Maybe some hacks or tricks with Spyne? > > Sorry for bad english :) > Taras > > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dsuch at gefira.pl Wed Nov 21 01:56:39 2012 From: dsuch at gefira.pl (Dariusz Suchojad) Date: Wed, 21 Nov 2012 01:56:39 +0100 Subject: [Soap-Python] Hi . WSSE question In-Reply-To: <50AC19CE.1060803@arskom.com.tr> References: <50ABDB7B.5050305@gefira.pl> <50AC053B.5060208@arskom.com.tr> <50AC07F6.5060503@gefira.pl> <50AC19CE.1060803@arskom.com.tr> Message-ID: <50AC26C7.4070806@gefira.pl> On 11/21/2012 01:01 AM, Burak Arslan wrote: > Well, It's easy to take over after Spyne parses the Xml string into an > element tree. (you should not use vanilla parser in etree.fromstring > because comments in SOAP messages would get in your way) > > You can just add a 'method_call' event to a ServiceBase subclass (let's > call it WsseServiceBase) and make WSSE validation/decryption there, just > like you do it in the example you sent me. > > You can do the reverse operation in a method_return_document event. > > The new ServiceBase subclass does not have to be in Spyne repo, so I > don't think there'd be a need for a license change. Otherwise, just send > a pull request and we can talk there. Right. So I'm not interested in the feature and I'm not going to implement it but if someone else is then please feel free to add it to either project :-) cheers, -- Dariusz Suchojad From kulapard at gmail.com Wed Nov 21 02:39:44 2012 From: kulapard at gmail.com (KulaPard) Date: Wed, 21 Nov 2012 05:39:44 +0400 Subject: [Soap-Python] Problem with simpleContent In-Reply-To: References: Message-ID: Thanks for reply! Unfortunately it does not work as expecting. Send this using SUDS: bar1 bar2 but on server side got this: bar1 bar2 My code: class Params(ComplexModel): __namespace__ = APP_NAMESPACE Param = Unicode.customize(min_occurs=0, max_occurs='unbounded') name = XmlAttribute(Unicode, attribute_of='Param') and scheme looks not correctly: How can I get "param" attributes? Thanks Taras 2012/11/21 Ugurcan Erg?n > We created an XmlAttribute parameter called attribute_of for providing > primitive type support. > For example when you want to recieve a mesaage like this > > > > foo > > > > A model service pair like that will do the trick > (This example is taken from the test case of this feature ) > > class a(ComplexModel): > b = Unicode > c = XmlAttribute(Unicode, ns="spam", attribute_of="b") > > class SomeService(ServiceBase): > @srpc(_returns=a) > def some_call(): > return a(b="foo",c="bar") > > For source code of this feature you can see > https://github.com/arskom/spyne/pull/161 > > > 2012/11/20 KulaPard > >> Hello >> Can you please help me? >> >> I need to realise this part of web-service: >> ---------------------------------------- >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> ---------------------------------------- >> to recieve message like this: >> ---------------------------------------- >> >> Blabla >> Blabovich >> 20 >> >> ---------------------------------------- >> I tried to use Spyne with XmlAttribute, but it do not support primitive >> types yet. >> Any ideas how to realise this functionality? Maybe you can advise me >> other libraries? >> Maybe some hacks or tricks with Spyne? >> >> Sorry for bad english :) >> Taras >> >> _______________________________________________ >> Soap mailing list >> Soap at python.org >> http://mail.python.org/mailman/listinfo/soap >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dieter at handshake.de Wed Nov 21 07:46:08 2012 From: dieter at handshake.de (Dieter Maurer) Date: Wed, 21 Nov 2012 07:46:08 +0100 Subject: [Soap-Python] WS-Security with certificates? In-Reply-To: <4F9C0ACC-D34F-40B7-915A-6D88386EEAEC@eraalaska.net> References: <4F9C0ACC-D34F-40B7-915A-6D88386EEAEC@eraalaska.net> Message-ID: <20652.30896.875628.226404@localhost.localdomain> Israel Brewster wrote at 2012-11-20 09:11 -0900: > ... >As far as custom headers go, that's not really the problem. I can get the headers into the soap envelope, but I don't have a clue how to generate the proper headers and encrypted body in the first place. According to google, Andr?s Veres-Szentkir?lyi posted a response that looked promising (I never got the message, unless it got lost in my junk mail filter), however I am having problems with that as well. I was able to build the pyxmlsec module with only minimal difficulty, but when I try to import xmlsec I get the following error: Dariusz suggested to call the "xmlsec" command line interface directly. This may be indeed the most easy solution. If you are ready to try another "xmlsec" Python binding, you could give "dm.xmlsec.binding" a try. It is based on "libxmlsec" (the XML security library -- you should read its documentation to get a basic understanding of XML encryption and how it is supported by "libxmlsec") and "lxml". Reports have shown that the installation of "dm.xmlsec.binding" is not always easy: it requires a not too old "libxmlsec1" installation and an "lxml" installation which exposes the "cython" interface of "lxml" (these parts are often stripped for "lxml" operating system packages; in those case, you need a source "lxml" installation and make it known via an envvar). From thomas.akakpo at gmail.com Wed Nov 21 12:18:59 2012 From: thomas.akakpo at gmail.com (Thomas AYIH-AKAKPO) Date: Wed, 21 Nov 2012 14:18:59 +0300 Subject: [Soap-Python] Encoding issues on docstrings In-Reply-To: <20651.52338.861405.562589@localhost.localdomain> References: <20651.52338.861405.562589@localhost.localdomain> Message-ID: 2012/11/20 Dieter Maurer > Try to use unicode docstrings, i.e. > > def f(...): > u"""""" > > rather than > > def f(...): > """""" > > > > -- > Dieter > Thanks for the reply Dieter, It sure does work :D (as I mentioned it in my email before). But actually I was wondering if I could go around this (e.g. not explicitly mention u"""""") without modifying the source code on my installation as I did. -- Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From ugurcanergn at gmail.com Wed Nov 21 12:25:54 2012 From: ugurcanergn at gmail.com (=?ISO-8859-1?Q?Ugurcan_Erg=FCn?=) Date: Wed, 21 Nov 2012 13:25:54 +0200 Subject: [Soap-Python] Problem with simpleContent In-Reply-To: References: Message-ID: As far as i understand It sends the message correctly but it's still wrong on the server. I could test (Could you send it via gist or something) your if it will work on me. Unfortunely I dont know much about schemes Perhaps Burak could give a more solid answer about the wrong scheme. 2012/11/21 KulaPard > Thanks for reply! > > Unfortunately it does not work as expecting. > > Send this using SUDS: > > > bar1 > bar2 > > > but on server side got this: > > > bar1 > bar2 > > > My code: > > class Params(ComplexModel): > __namespace__ = APP_NAMESPACE > Param = Unicode.customize(min_occurs=0, max_occurs='unbounded') > name = XmlAttribute(Unicode, attribute_of='Param') > > and scheme looks not correctly: > > > > maxOccurs="unbounded" nillable="true"/> > > > > > > How can I get "param" attributes? > > Thanks > Taras > > 2012/11/21 Ugurcan Erg?n > >> We created an XmlAttribute parameter called attribute_of for providing >> primitive type support. >> For example when you want to recieve a mesaage like this >> >> >> >> foo >> >> >> >> A model service pair like that will do the trick >> (This example is taken from the test case of this feature ) >> >> class a(ComplexModel): >> b = Unicode >> c = XmlAttribute(Unicode, ns="spam", attribute_of="b") >> >> class SomeService(ServiceBase): >> @srpc(_returns=a) >> def some_call(): >> return a(b="foo",c="bar") >> >> For source code of this feature you can see >> https://github.com/arskom/spyne/pull/161 >> >> >> 2012/11/20 KulaPard >> >>> Hello >>> Can you please help me? >>> >>> I need to realise this part of web-service: >>> ---------------------------------------- >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> ---------------------------------------- >>> to recieve message like this: >>> ---------------------------------------- >>> >>> Blabla >>> Blabovich >>> 20 >>> >>> ---------------------------------------- >>> I tried to use Spyne with XmlAttribute, but it do not support primitive >>> types yet. >>> Any ideas how to realise this functionality? Maybe you can advise me >>> other libraries? >>> Maybe some hacks or tricks with Spyne? >>> >>> Sorry for bad english :) >>> Taras >>> >>> _______________________________________________ >>> 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 Nov 21 12:28:59 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Wed, 21 Nov 2012 13:28:59 +0200 Subject: [Soap-Python] Encoding issues on docstrings In-Reply-To: References: <20651.52338.861405.562589@localhost.localdomain> Message-ID: <50ACBAFB.2080604@arskom.com.tr> On 11/21/12 13:18, Thomas AYIH-AKAKPO wrote: > But actually I was wondering if I could go around this (e.g. not > explicitly mention u"""""") without modifying the source > code on my installation as I did. You shouldn't. To understand what encoding a str docstring has, one has to parse the source file and find the # encoding: blah line to .decode() the str to unicode. You can try it yourself: #encoding: utf8 print len("?") # 2 print len(u"?") # 1 #encoding: iso8859-9 print len("?") # 1 print len(u"?") # 1 you must make sure to save the files in noted encodings or use iconv to convert them to get the same result. Best, Burak From thomas.akakpo at gmail.com Wed Nov 21 13:25:48 2012 From: thomas.akakpo at gmail.com (Thomas AYIH-AKAKPO) Date: Wed, 21 Nov 2012 15:25:48 +0300 Subject: [Soap-Python] Encoding issues on docstrings In-Reply-To: <50ACBAFB.2080604@arskom.com.tr> References: <20651.52338.861405.562589@localhost.localdomain> <50ACBAFB.2080604@arskom.com.tr> Message-ID: 2012/11/21 Burak Arslan > On 11/21/12 13:18, Thomas AYIH-AKAKPO wrote: > >> But actually I was wondering if I could go around this (e.g. not >> explicitly mention u"""""") without modifying the source code on >> my installation as I did. >> > > You shouldn't. To understand what encoding a str docstring has, one has to > parse the source file and find the # encoding: blah line to .decode() the > str to unicode. > > You can try it yourself: > > #encoding: utf8 > print len("?") # 2 > print len(u"?") # 1 > > #encoding: iso8859-9 > print len("?") # 1 > print len(u"?") # 1 > > you must make sure to save the files in noted encodings or use iconv to > convert them to get the same result. > > Best, > Burak > > Ok, thanks all :) -- Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From kulapard at gmail.com Wed Nov 21 14:14:49 2012 From: kulapard at gmail.com (KulaPard) Date: Wed, 21 Nov 2012 17:14:49 +0400 Subject: [Soap-Python] Problem with simpleContent In-Reply-To: References: Message-ID: Sends but not as expected. I don't know how to generate multiple "param" elements with it's own attribute "name". Please look at my code: https://gist.github.com/4124694 Thanks Taras 2012/11/21 Ugurcan Erg?n > As far as i understand It sends the message correctly but it's still wrong > on the server. I could test (Could you send it via gist or something) your > if it will work on me. > Unfortunely I dont know much about schemes Perhaps Burak could give a more > solid answer about the wrong scheme. > > > 2012/11/21 KulaPard > >> Thanks for reply! >> >> Unfortunately it does not work as expecting. >> >> Send this using SUDS: >> >> >> bar1 >> bar2 >> >> >> but on server side got this: >> >> >> bar1 >> bar2 >> >> >> My code: >> >> class Params(ComplexModel): >> __namespace__ = APP_NAMESPACE >> Param = Unicode.customize(min_occurs=0, max_occurs='unbounded') >> name = XmlAttribute(Unicode, attribute_of='Param') >> >> and scheme looks not correctly: >> >> >> >> > maxOccurs="unbounded" nillable="true"/> >> >> >> >> >> >> How can I get "param" attributes? >> >> Thanks >> Taras >> >> 2012/11/21 Ugurcan Erg?n >> >>> We created an XmlAttribute parameter called attribute_of for providing >>> primitive type support. >>> For example when you want to recieve a mesaage like this >>> >>> >>> >>> foo >>> >>> >>> >>> A model service pair like that will do the trick >>> (This example is taken from the test case of this feature ) >>> >>> class a(ComplexModel): >>> b = Unicode >>> c = XmlAttribute(Unicode, ns="spam", attribute_of="b") >>> >>> class SomeService(ServiceBase): >>> @srpc(_returns=a) >>> def some_call(): >>> return a(b="foo",c="bar") >>> >>> For source code of this feature you can see >>> https://github.com/arskom/spyne/pull/161 >>> >>> >>> 2012/11/20 KulaPard >>> >>>> Hello >>>> Can you please help me? >>>> >>>> I need to realise this part of web-service: >>>> ---------------------------------------- >>>> >>>> >>>> >>>> >>> name="Param"> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> ---------------------------------------- >>>> to recieve message like this: >>>> ---------------------------------------- >>>> >>>> Blabla >>>> Blabovich >>>> 20 >>>> >>>> ---------------------------------------- >>>> I tried to use Spyne with XmlAttribute, but it do not support primitive >>>> types yet. >>>> Any ideas how to realise this functionality? Maybe you can advise me >>>> other libraries? >>>> Maybe some hacks or tricks with Spyne? >>>> >>>> Sorry for bad english :) >>>> Taras >>>> >>>> _______________________________________________ >>>> 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 Nov 21 14:30:54 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Wed, 21 Nov 2012 15:30:54 +0200 Subject: [Soap-Python] Problem with simpleContent In-Reply-To: References: Message-ID: <50ACD78E.5010501@arskom.com.tr> Hi, Can you test with the latest spyne from my fork? https://github.com/plq/spyne/commit/28dca53440fcf5e407c4b6fc477f8dbb29302127#L1R208 Best, Burak On 11/21/12 15:14, KulaPard wrote: > Sends but not as expected. I don't know how to generate multiple > "param" elements with it's own attribute "name". > Please look at my code: > https://gist.github.com/4124694 > > Thanks > > Taras > > 2012/11/21 Ugurcan Erg?n > > > As far as i understand It sends the message correctly but it's > still wrong on the server. I could test (Could you send it via > gist or something) your if it will work on me. > Unfortunely I dont know much about schemes Perhaps Burak could > give a more solid answer about the wrong scheme. > > > 2012/11/21 KulaPard > > > Thanks for reply! > > Unfortunately it does not work as expecting. > > Send this using SUDS: > > > bar1 > bar2 > > > but on server side got this: > > > bar1 > bar2 > > > My code: > > class Params(ComplexModel): > __namespace__ = APP_NAMESPACE > Param = Unicode.customize(min_occurs=0, > max_occurs='unbounded') > name = XmlAttribute(Unicode, attribute_of='Param') > > and scheme looks not correctly: > > > > maxOccurs="unbounded" nillable="true"/> > > > > > > How can I get "param" attributes? > > Thanks > Taras > > 2012/11/21 Ugurcan Erg?n > > > We created an XmlAttribute parameter called attribute_of > for providing primitive type support. > For example when you want to recieve a mesaage like this > > > > foo > > > > A model service pair like that will do the trick > (This example is taken from the test case of this feature ) > > class a(ComplexModel): > b = Unicode > c = XmlAttribute(Unicode, ns="spam", attribute_of="b") > > class SomeService(ServiceBase): > @srpc(_returns=a) > def some_call(): > return a(b="foo",c="bar") > > For source code of this feature you can see > https://github.com/arskom/spyne/pull/161 > > > 2012/11/20 KulaPard > > > Hello > Can you please help me? > > I need to realise this part of web-service: > ---------------------------------------- > > > > name="Param"> > > > > > > > > > > > > ---------------------------------------- > to recieve message like this: > ---------------------------------------- > > Blabla > Blabovich > 20 > > ---------------------------------------- > I tried to use Spyne with XmlAttribute, but it do not > support primitive types yet. > Any ideas how to realise this functionality? Maybe you > can advise me other libraries? > Maybe some hacks or tricks with Spyne? > > Sorry for bad english :) > Taras > > _______________________________________________ > 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 szybalski at gmail.com Wed Nov 21 21:47:31 2012 From: szybalski at gmail.com (Lukasz Szybalski) Date: Wed, 21 Nov 2012 14:47:31 -0600 Subject: [Soap-Python] [help wanted] Interface with .net soap service using python soap client -paid Message-ID: Hello, I need somebody's help me get my program to connect and interact with .net soap services in a short amount of time (week or two). I've tried both suds (got stuck on infinite recursion https://fedorahosted.org/suds/ticket/239 ) and ZSI (got stuck on how to pass complex types/create requestData object that contains username and password. The request data is not defined in code generated by wsdl2py. I need somebody familiar with either suds or ZSI to get my soap project started. Objective: 1. Successfully Authentication to my .net service. (either fix suds ticket #239, or look at wdl and use import doctor to fix what ever is broken in it) (or use wsld2py and figure out how to build complex data objects) (10hours max at $20 an hour paid upon successful authentication and receiving appropriate security tokens from the service. ) 2. When you complete #1, part 2 is to connect to couple more service using the security token. (I will pay for building that code 10hours max at $20 an hour, paid when the required information is received from all services. ) Is anybody familiar with python soap client libraries. At the end this code would be sitting behind a website and called by multithread/multiprocess web application (or maybe even within it served by modwsgi) Please email me if you are interested, with a brief description on some soap project you worked on/done, and what are your ideas on what is the problem I'm having. See below. Reference: https://lists.fedoraproject.org/pipermail/suds/2012-October/001760.html http://mail.python.org/pipermail//soap/2012-July/000902.html http://lists.fedoraproject.org/pipermail/suds/2012-August/001728.html http://sourceforge.net/mailarchive/message.php?msg_id=29720217 Thanks, Lucas -------------- next part -------------- An HTML attachment was scrubbed... URL: From kulapard at gmail.com Thu Nov 22 07:40:15 2012 From: kulapard at gmail.com (KulaPard) Date: Thu, 22 Nov 2012 10:40:15 +0400 Subject: [Soap-Python] Problem with simpleContent Message-ID: Hi, Burak Yes, scheme is looks correct now. Thanks. But there is an error when I'm calling my web-service method: ../spyne/protocol/xml/model.py", line 240, in complex_from_element value = member._typ.from_string(element.attrib[key]) AttributeError: type object 'XmlAttribute' has no attribute '_typ' Thanks Taras -------------- next part -------------- An HTML attachment was scrubbed... URL: From burak.arslan at arskom.com.tr Thu Nov 22 10:25:42 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 22 Nov 2012 11:25:42 +0200 Subject: [Soap-Python] Problem with simpleContent In-Reply-To: References: Message-ID: <50ADEF96.4000002@arskom.com.tr> On 11/22/12 08:40, KulaPard wrote: > Hi, Burak > Yes, scheme is looks correct now. Thanks. > But there is an error when I'm calling my web-service method: > > ../spyne/protocol/xml/model.py", line 240, in complex_from_element > value = member._typ.from_string(element.attrib[key]) > AttributeError: type object 'XmlAttribute' has no attribute '_typ' > Whoops, sorry about that. Fixed. Best, Burak From kulapard at gmail.com Thu Nov 22 19:37:45 2012 From: kulapard at gmail.com (KulaPard) Date: Thu, 22 Nov 2012 22:37:45 +0400 Subject: [Soap-Python] Problem with simpleContent Message-ID: Super! Great job! Thanks, Burak. But I still don't understand how get access to this attributes in received messages? How to generate messages with multiple elements? Maybe you can give me some examples? I'll be very grateful. Taras ---------- ???????????? ????????? ---------- > From: KulaPard > To: burak.arslan at arskom.com.tr > Cc: soap at python.org > Date: Thu, 22 Nov 2012 10:40:15 +0400 > Subject: [Soap-Python] Problem with simpleContent > Hi, Burak > Yes, scheme is looks correct now. Thanks. > But there is an error when I'm calling my web-service method: > > ../spyne/protocol/xml/model.py", line 240, in complex_from_element > value = member._typ.from_string(element.attrib[key]) > AttributeError: type object 'XmlAttribute' has no attribute '_typ' > > Thanks > > Taras > > > ---------- ???????????? ????????? ---------- > From: Burak Arslan > To: KulaPard > Cc: soap at python.org > Date: Thu, 22 Nov 2012 11:25:42 +0200 > Subject: Re: [Soap-Python] Problem with simpleContent > On 11/22/12 08:40, KulaPard wrote: > >> Hi, Burak >> Yes, scheme is looks correct now. Thanks. >> But there is an error when I'm calling my web-service method: >> >> ../spyne/protocol/xml/model.**py", line 240, in complex_from_element >> value = member._typ.from_string(**element.attrib[key]) >> AttributeError: type object 'XmlAttribute' has no attribute '_typ' >> >> > Whoops, sorry about that. Fixed. > > Best, > Burak > > > > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From reingart at gmail.com Fri Nov 23 21:01:24 2012 From: reingart at gmail.com (Mariano Reingart) Date: Fri, 23 Nov 2012 17:01:24 -0300 Subject: [Soap-Python] [help wanted] Interface with .net soap service using python soap client -paid In-Reply-To: References: Message-ID: Hello Lukasz: I could help you, but not with suds, as I've developed a easier approach: http://pysimplesoap.googlecode.com// Let me know if you're interested, I'd worked with other similar issues like this in the past. (in fact, the library was developed to consume Argentina "IRS" .net webservices) Best regards, Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com On Wed, Nov 21, 2012 at 5:47 PM, Lukasz Szybalski wrote: > Hello, > > I need somebody's help me get my program to connect and interact with .net > soap services in a short amount of time (week or two). > > I've tried both suds (got stuck on infinite recursion > https://fedorahosted.org/suds/ticket/239 ) and ZSI (got stuck on how to pass > complex types/create requestData object that contains username and password. > The request data is not defined in code generated by wsdl2py. > > I need somebody familiar with either suds or ZSI to get my soap project > started. > > Objective: > 1. Successfully Authentication to my .net service. (either fix suds ticket > #239, or look at wdl and use import doctor to fix what ever is broken in it) > (or use wsld2py and figure out how to build complex data objects) (10hours > max at $20 an hour paid upon successful authentication and receiving > appropriate security tokens from the service. ) > > 2. When you complete #1, part 2 is to connect to couple more service using > the security token. (I will pay for building that code 10hours max at $20 an > hour, paid when the required information is received from all services. ) > > Is anybody familiar with python soap client libraries. At the end this code > would be sitting behind a website and called by multithread/multiprocess web > application (or maybe even within it served by modwsgi) > > Please email me if you are interested, with a brief description on some soap > project you worked on/done, and what are your ideas on what is the problem > I'm having. See below. > > > Reference: > https://lists.fedoraproject.org/pipermail/suds/2012-October/001760.html > http://mail.python.org/pipermail//soap/2012-July/000902.html > http://lists.fedoraproject.org/pipermail/suds/2012-August/001728.html > http://sourceforge.net/mailarchive/message.php?msg_id=29720217 > > Thanks, > Lucas > > > > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap > From kulapard at gmail.com Sat Nov 24 11:06:20 2012 From: kulapard at gmail.com (KulaPard) Date: Sat, 24 Nov 2012 14:06:20 +0400 Subject: [Soap-Python] Problem with simpleContent Message-ID: Hi Could you please help me. It's very important for me! Any ideas how to generate and receive this kind of messages using Spyne? https://gist.github.com/4132551 Thanks Taras -------------- next part -------------- An HTML attachment was scrubbed... URL: From israel at eraalaska.net Mon Nov 26 18:22:00 2012 From: israel at eraalaska.net (Israel Brewster) Date: Mon, 26 Nov 2012 08:22:00 -0900 Subject: [Soap-Python] WS-Security with certificates? In-Reply-To: <20652.30896.875628.226404@localhost.localdomain> References: <4F9C0ACC-D34F-40B7-915A-6D88386EEAEC@eraalaska.net> <20652.30896.875628.226404@localhost.localdomain> Message-ID: <5CAF0B93-205F-4D0A-BCFF-162DD46790EA@eraalaska.net> -------------- 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 Nov 20, 2012, at 9:46 PM, "Dieter Maurer" wrote: > Israel Brewster wrote at 2012-11-20 09:11 -0900: >> ... >> As far as custom headers go, that's not really the problem. I can get the headers into the soap envelope, but I don't have a clue how to generate the proper headers and encrypted body in the first place. According to google, Andr?s Veres-Szentkir?lyi posted a response that looked promising (I never got the message, unless it got lost in my junk mail filter), however I am having problems with that as well. I was able to build the pyxmlsec module with only minimal difficulty, but when I try to import xmlsec I get the following error: > > Dariusz suggested to call the "xmlsec" command line interface > directly. This may be indeed the most easy solution. > > If you are ready to try another "xmlsec" Python binding, you > could give "dm.xmlsec.binding" a try. It is based on "libxmlsec" > (the XML security library -- you should read its documentation to > get a basic understanding of XML encryption and how it is > supported by "libxmlsec") and "lxml". > > Reports have shown that the installation of "dm.xmlsec.binding" > is not always easy: it requires a not too old "libxmlsec1" installation > and an "lxml" installation which exposes the "cython" interface of "lxml" > (these parts are often stripped for "lxml" operating system packages; > in those case, you need a source "lxml" installation and make it > known via an envvar). Thanks, I'll look into that. ----------------------------------------------- Israel Brewster Computer Support Technician II Era Alaska 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7250 x7293 ----------------------------------------------- From svenn.grindhaug at uni.no Wed Nov 28 14:41:22 2012 From: svenn.grindhaug at uni.no (Svenn Helge Grindhaug) Date: Wed, 28 Nov 2012 14:41:22 +0100 Subject: [Soap-Python] xsd question Message-ID: <5354373.KudOalZOMN@13thstar> Hi, I'm trying spyne and have a question about howto use xsds. I would like to use bioxsd (http://bioxsd.org/BioXSD-1.1.xsd) and use BiosequenceRecord as a return type in one of my methods. Would I need to redefine the BiosequenceRecord type as a ComplexModel or is there some other way of doing it (I have tried different ways without any luck). Or is this out of scope for Spyne? Best regards, Svenn. From burak.arslan at arskom.com.tr Wed Nov 28 14:59:55 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Wed, 28 Nov 2012 15:59:55 +0200 Subject: [Soap-Python] xsd question In-Reply-To: <5354373.KudOalZOMN@13thstar> References: <5354373.KudOalZOMN@13thstar> Message-ID: <50B618DB.9040701@arskom.com.tr> On 11/28/12 15:41, Svenn Helge Grindhaug wrote: > Hi, > > I'm trying spyne and have a question about howto use xsds. I would like to use > bioxsd (http://bioxsd.org/BioXSD-1.1.xsd) and use BiosequenceRecord as a > return type in one of my methods. > > Would I need to redefine the BiosequenceRecord type as a ComplexModel or is > there some other way of doing it (I have tried different ways without any > luck). Or is this out of scope for Spyne? > Hi, See here: http://lxml.de/objectify.html#asserting-a-schema Does it help? Best, Burak From burak.arslan at arskom.com.tr Wed Nov 28 15:22:16 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Wed, 28 Nov 2012 16:22:16 +0200 Subject: [Soap-Python] xsd question In-Reply-To: <50B618DB.9040701@arskom.com.tr> References: <5354373.KudOalZOMN@13thstar> <50B618DB.9040701@arskom.com.tr> Message-ID: <50B61E18.5000808@arskom.com.tr> Sorry, I sent the mail too soon by mistake. On 11/28/12 15:59, Burak Arslan wrote: > On 11/28/12 15:41, Svenn Helge Grindhaug wrote: >> Hi, >> >> I'm trying spyne and have a question about howto use xsds. I would >> like to use >> bioxsd (http://bioxsd.org/BioXSD-1.1.xsd) and use BiosequenceRecord as a >> return type in one of my methods. >> >> Would I need to redefine the BiosequenceRecord type as a ComplexModel >> or is >> there some other way of doing it (I have tried different ways without >> any >> luck). Unfortunately yes. Spyne does not parse existing schemas. You can use lxml.objectify to manually parse incoming data from ctx.in_document and return it by setting ctx.out_document in relevant events. But it'd be a big big hack. >> Or is this out of scope for Spyne? >> Not really, XML Schema / WSDL parser patches are welcome. Best, Burak