From wsourdeau at inverse.ca Tue May 1 17:14:43 2012 From: wsourdeau at inverse.ca (Wolfgang Sourdeau) Date: Tue, 01 May 2012 11:14:43 -0400 Subject: [Soap-Python] rpclib/soaplib with WSDL parsing In-Reply-To: <4F9F0967.8030203@arskom.com.tr> References: <4F9EFF18.9080401@inverse.ca> <4F9F0967.8030203@arskom.com.tr> Message-ID: <4F9FFDE3.7000706@inverse.ca> Hi Burak! Thank you for your response! I only have a few things to add... > The real reason I got rid of wsdlparse was because it did things the > java way -- it generated code. That's a fundamentally wrong approach > when you're working with Python because, by the virtue of being a > dynamic language, Python can parse wsdl and build required classes and > interfaces on the fly. It makes sense (except for one thing explained below) to make this all automatic. Actually I think it would actually even make more sense to remove the @soapmethod modifier altogether to make things look even more like regular method calls. This would require other programmatic utilities to declare datatypes but in my opinion it makes sense too since this part pertains more to the data representation than to the implementation. Regarding the fact that you removed the script, please note that except of generating the code automatically, this has just the effect of forcing the developer to do it manually. So as long as the wsdl "class builder" is not in place, it's a bit useless since the effect is the same... > > I also wanted to focus on making soaplib a proper soap server, because > that's what was lacking then in the Python world. (There even was a > time i'd entirely dumped client functionality in favor of suds.) Oh > and wsdlparse did not work most of the time anyway. > > If suds wasn't already there, we'd probably have wsdl parsing in > rpclib by now. (I already have a javascript soap client which also > parses wsdl, here: http://github.com/arskom/qxsoap) But I did not > think duplicating suds' functionality in rpclib would benefit anybody, > so I didn't do it. What do you mean by the "suds functionality" ? The fact that it's a client interface library? > > I'd nevertheless encourage you to work on a wsdl parser for rpclib, > because i feel it'd have a greater benefit outside of the SOAP world > -- I've stumbled upon a few people in the lxml mailing list who might > be interested working on an Xml Schema parser. They might want to give > you a hand if you ask around. I would very like to, but I won't be allowed the time to do so. There is another similar subproject (for the OpenChange project) that I would ideally like to implement where the structure definitions are encoded as an IDL and I don't think I will ever have time for this either. Thank you! Wolfgang From burak.arslan at arskom.com.tr Tue May 1 18:13:43 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 01 May 2012 19:13:43 +0300 Subject: [Soap-Python] rpclib/soaplib with WSDL parsing In-Reply-To: <4F9FFDE3.7000706@inverse.ca> References: <4F9EFF18.9080401@inverse.ca> <4F9F0967.8030203@arskom.com.tr> <4F9FFDE3.7000706@inverse.ca> Message-ID: <4FA00BB7.5070903@arskom.com.tr> Hi There, On 05/01/12 18:14, Wolfgang Sourdeau wrote: > Hi Burak! > > Regarding the fact that you removed the script, please note that > except of generating the code automatically, this has just the effect > of forcing the developer to do it manually. So as long as the wsdl > "class builder" is not in place, it's a bit useless since the effect > is the same... > If you need a soap client, just use suds. Rpclib's client functionality could be preferred only when: 1) You need faster xml parsing. 2) You can import server code from client. (Yes, that means you're making calls to an rpclib server) (If speed is a concern, you shouldn't be using soap anyway, but that's another matter) >> >> I also wanted to focus on making soaplib a proper soap server, >> because that's what was lacking then in the Python world. (There even >> was a time i'd entirely dumped client functionality in favor of >> suds.) Oh and wsdlparse did not work most of the time anyway. >> >> If suds wasn't already there, we'd probably have wsdl parsing in >> rpclib by now. (I already have a javascript soap client which also >> parses wsdl, here: http://github.com/arskom/qxsoap) But I did not >> think duplicating suds' functionality in rpclib would benefit >> anybody, so I didn't do it. > What do you mean by the "suds functionality" ? The fact that it's a > client interface library? > I mean I did not implement wsdl parsing in rpclib because suds already had it. if you dig up the archives of this mailing list from 2010-11ish, you'll see the discussions. best, burak From wsourdeau at inverse.ca Tue May 1 18:16:34 2012 From: wsourdeau at inverse.ca (Wolfgang Sourdeau) Date: Tue, 01 May 2012 12:16:34 -0400 Subject: [Soap-Python] rpclib/soaplib with WSDL parsing In-Reply-To: <4FA00BB7.5070903@arskom.com.tr> References: <4F9EFF18.9080401@inverse.ca> <4F9F0967.8030203@arskom.com.tr> <4F9FFDE3.7000706@inverse.ca> <4FA00BB7.5070903@arskom.com.tr> Message-ID: <4FA00C62.1080400@inverse.ca> > > If you need a soap client, just use suds. Rpclib's client > functionality could be preferred only when: > > 1) You need faster xml parsing. > 2) You can import server code from client. (Yes, that means you're > making calls to an rpclib server) > > (If speed is a concern, you shouldn't be using soap anyway, but that's > another matter) Ah, I didn't know it was made to create client code. Actually what I need is server code. I understand now. Thanks! Wolfgang From wsourdeau at inverse.ca Wed May 2 19:29:18 2012 From: wsourdeau at inverse.ca (Wolfgang Sourdeau) Date: Wed, 02 May 2012 13:29:18 -0400 Subject: [Soap-Python] bug with generation of header elements (+ patch) Message-ID: <4FA16EEE.4080803@inverse.ca> Hi, One of my soap method needs to generate a header and here is what my code looks like: EWS_T_NS = "http://schemas.microsoft.com/exchange/services/2006/types" class ServerVersionInfo(ComplexModel): __namespace__ = EWS_T_NS _type_info = {"MajorVersion": XmlAttribute(Integer), "MinorVersion": XmlAttribute(Integer), "MajorBuildNumber": XmlAttribute(Integer), "MinorBuildNumber": XmlAttribute(Integer)} class ExchangeService(ServiceBase): @rpc(SerializableTimeZone,ArrayOfMailboxData,FreeBusyViewOptions,SuggestionsViewOptions, _in_message_name="GetUserAvailabilityRequest", _out_header=ServerVersionInfo, _returns=(ArrayOfFreeBusyResponse,SuggestionsResponseType), _out_variable_names=("FreeBusyResponseArray", "SuggestionsResponse"), .... However, this systematically outputs: where "xmlns:tns="http://schemas.microsoft.com/exchange/services/2006/messages". After deep inspection, it seems the bug is in soap11.py, where the default application tns is always requested. Here is a patch that fixes it and request the namespace from the header element class instead. --- soap11.py~ 2012-05-01 14:23:54.000000000 -0400 +++ soap11.py 2012-05-02 12:54:57.445587367 -0400 @@ -277,14 +277,14 @@ out_headers): self.to_parent_element(header_class, out_header, - self.app.interface.get_tns(), + header_class.get_namespace(), soap_header_elt, header_class.get_type_name(), ) else: self.to_parent_element(header_message_class, ctx.out_header, - self.app.interface.get_tns(), + header_message_class.get_namespace(), soap_header_elt, header_message_class.get_type_name() ) This indeed fixes my output. Does this seem reasonable? Wolfgang From wsourdeau at inverse.ca Wed May 2 19:32:05 2012 From: wsourdeau at inverse.ca (Wolfgang Sourdeau) Date: Wed, 02 May 2012 13:32:05 -0400 Subject: [Soap-Python] bug with generation of header elements (+ patch) In-Reply-To: <4FA16EEE.4080803@inverse.ca> References: <4FA16EEE.4080803@inverse.ca> Message-ID: <4FA16F95.9090200@inverse.ca> > > This indeed fixes my output. Does this seem reasonable? > The only downturn I see is that the default tns is not fallen back on when __namespace__ is not defined. So this is likely to be wrong in the general case. I don't know how to reconcile this though, since __namespace__ will always return something and I would think comparing this to the class's module name would be rather hackish. Wolfgang From burak.arslan at arskom.com.tr Thu May 3 02:31:29 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 03 May 2012 03:31:29 +0300 Subject: [Soap-Python] bug with generation of header elements (+ patch) In-Reply-To: <4FA16F95.9090200@inverse.ca> References: <4FA16EEE.4080803@inverse.ca> <4FA16F95.9090200@inverse.ca> Message-ID: <4FA1D1E1.8050200@arskom.com.tr> On 05/02/12 20:32, Wolfgang Sourdeau wrote: > >> >> This indeed fixes my output. Does this seem reasonable? >> > The only downturn I see is that the default tns is not fallen back on > when __namespace__ is not defined. So this is likely to be wrong in > the general case. I don't know how to reconcile this though, since > __namespace__ will always return something and I would think comparing > this to the class's module name would be rather hackish. > No need to worry about non-defined namespaces, they're substituted with the module name. This commit fixes the issue: https://github.com/plq/rpclib/commit/215b8cf1502eb8f390d595a4cb6c3e4f9285ffdd Start tags are now in the same namespace as the definitions themselves. intermediate tags are in the parent's namespace, just as before. In the below example; SomeObject here is the direct child of a senv: child, so i call it a start tag. Its namespace is the namespace defined in rpclib model definition. SomeChild is in the s1: namespace in rpclib.model definition. But its start tag is in its parent namespace, and its child tag is in SomeChild's own namespace. blah With the previous behaviour, start tags were always in the tns: prefix, like the SomeObject case here: blah I think this is an important change. Please let me know if you think this is wrong. Best, Burak -------------- next part -------------- An HTML attachment was scrubbed... URL: From burak.arslan at arskom.com.tr Thu May 3 02:33:29 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 03 May 2012 03:33:29 +0300 Subject: [Soap-Python] bug with generation of header elements (+ patch) In-Reply-To: <4FA16F95.9090200@inverse.ca> References: <4FA16EEE.4080803@inverse.ca> <4FA16F95.9090200@inverse.ca> Message-ID: <4FA1D259.8090209@arskom.com.tr> On 05/02/12 20:32, Wolfgang Sourdeau wrote: > >> >> This indeed fixes my output. Does this seem reasonable? >> > The only downturn I see is that the default tns is not fallen back on > when __namespace__ is not defined. So this is likely to be wrong in > the general case. I don't know how to reconcile this though, since > __namespace__ will always return something and I would think comparing > this to the class's module name would be rather hackish. > No need to worry about non-defined namespaces, they're substituted with the module name. This commit fixes the issue: https://github.com/plq/rpclib/commit/215b8cf1502eb8f390d595a4cb6c3e4f9285ffdd Start tags are now in the same namespace as the definitions themselves. intermediate tags are in the parent's namespace, just as before. In the below example; SomeObject here is the direct child of a senv: child, so i call it a start tag. Its namespace is the namespace defined in rpclib model definition. SomeChild is in the s1: namespace in rpclib.model definition. But its start tag is in its parent namespace, and its child tag is in SomeChild's own namespace. blah With the previous behaviour, start tags were always in the tns: prefix, like the SomeObject case here: blah I think this is an important change. Please let me know if you think this is wrong. Best, Burak -------------- next part -------------- An HTML attachment was scrubbed... URL: From wsourdeau at inverse.ca Thu May 3 04:16:30 2012 From: wsourdeau at inverse.ca (Wolfgang Sourdeau) Date: Wed, 02 May 2012 22:16:30 -0400 Subject: [Soap-Python] bug with generation of header elements (+ patch) In-Reply-To: <4FA1D259.8090209@arskom.com.tr> References: <4FA16EEE.4080803@inverse.ca> <4FA16F95.9090200@inverse.ca> <4FA1D259.8090209@arskom.com.tr> Message-ID: <4FA1EA7E.9010902@inverse.ca> > > > I think this is an important change. Please let me know if you think > this is wrong. > Quite the contrary. At first sight I would have thought that the previous inheritance behaviour would be nice. But then I remembered that each element must be in its own namespace because the namespace is part of the element identity. To make this simple, let's say you have a simple type {ns1}foo and a complex type {ns2}bar which includes one or more {ns1}foo, you cannot just obtain a {ns2}foo, because it does not exist. It might make sense to make operations default to their service's namespace or whatnot, but since an operation definition is just basically a type, this would not be possible either. Thanks! Wolfgang From wsourdeau at inverse.ca Tue May 8 15:46:25 2012 From: wsourdeau at inverse.ca (Wolfgang Sourdeau) Date: Tue, 08 May 2012 09:46:25 -0400 Subject: [Soap-Python] license clarification Message-ID: <4FA923B1.4080002@inverse.ca> Hi, I am currently packaging rpclib for certain Debian-based distros. On page http://pypi.python.org/pypi/rpclib and in the provided PKG-INFO, the copyright information is seriously lacking information. What is the complete list of copyright owners? And what is the version of the LGPL in use? Thanks Wolfgang From wsourdeau at inverse.ca Tue May 8 15:50:24 2012 From: wsourdeau at inverse.ca (Wolfgang Sourdeau) Date: Tue, 08 May 2012 09:50:24 -0400 Subject: [Soap-Python] license clarification In-Reply-To: <4FA923B1.4080002@inverse.ca> References: <4FA923B1.4080002@inverse.ca> Message-ID: <4FA924A0.1030305@inverse.ca> By searching in the code, I found those infos: Copyright (C) Rpclib contributors. (in all the .py files) And the license cited is the LGPL-2.1, is that correct? Regarding the "Rpclib contributors", I don't think it's a valid claim, because it does not name anyone explicitly. Wolfgang From burak.arslan at arskom.com.tr Tue May 8 17:07:02 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 08 May 2012 18:07:02 +0300 Subject: [Soap-Python] license clarification In-Reply-To: <4FA924A0.1030305@inverse.ca> References: <4FA923B1.4080002@inverse.ca> <4FA924A0.1030305@inverse.ca> Message-ID: <4FA93696.90300@arskom.com.tr> On 08/05/12 16:50, Wolfgang Sourdeau wrote: > By searching in the code, I found those infos: > > Copyright (C) Rpclib contributors. (in all the .py files) > And the license cited is the LGPL-2.1, is that correct? > > > Regarding the "Rpclib contributors", I don't think it's a valid claim, > because it does not name anyone explicitly. > Hi Wolfgang, There's a CONTRIBUTORS file in the repository root. I thought that'd be enough. It got tedious to add everybody's name to every source file, so I moved the copyright clauses to that file. Rpclib itself is LGPL-2.1 as said in the LICENSE file in the repo root. The examples are mostly under the three-clause bsd license. I've just clarified the license entry in setup.py Best, Burak > > Wolfgang > > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap From phrrngtn at panix.com Wed May 9 06:29:01 2012 From: phrrngtn at panix.com (Paul Harrington) Date: Wed, 9 May 2012 00:29:01 -0400 (EDT) Subject: [Soap-Python] rpclib and Microsoft Office Research Service Message-ID: Hi, I am attempting to implement a stub Microsoft Office Research Service using rpclib on Python 2.6. I have no prior experience with SOAP and little with XML so it may be the case that I am doing something very sill. My ultimate goal is to have a Python-based service that can be used with the Office research pane. My proximate goal is to fiddle around with the namespaces used for soap responses so that I can come up with a SOAP response that is digestable by Excel. regards, pjjH As per http://office.microsoft.com/Research/query.asmx?op=Registration, this is what the registration should look like. note the within the soap body HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length string However, when I try and register my service from Excel, I get the following interaction as reported by fiddler. Note the which use prefixes which are defined in the soap envelope. HTTP/1.1 200 OK Content-Length: 1648 Content-Type: text/xml; charset=utf-8 Date: Wed, 09 May 2012 03:59:38 GMT Server: SPACESHIP <ProviderUpdate xmlns="urn:Microsoft.Search.Registration.Response"><Status>SUCCESS</Status><Providers><Provider><Id>{f656bd32-8aac-476d-b705-54677ed14b05}</Id><Name>Microsoft Search Server 2010</Name><QueryPath>http://some.sharepoint.site.com/test/_vti_bin/search.asmx</QueryPath><Type>SOAP</Type><Services><Service><Id>{f656bd32-8aac-476d-b705-54677ed14b05}</Id><Name>Hackalot</Name><Category>INTRANET_GENERAL</Category><Description>This service allows you to search the site : Banana</Description><Copyright>Microsoft Search Server 2010</Copyright><Display>On</Display></Service></Services></Provider></Providers></ProviderUpdate> From burak.arslan at arskom.com.tr Thu May 17 10:49:10 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 17 May 2012 11:49:10 +0300 Subject: [Soap-Python] rpclib and Microsoft Office Research Service In-Reply-To: References: Message-ID: <4FB4BB86.6030808@arskom.com.tr> Hi Paul, Sorry, I've missed your message for some reason. 1) and are equivalent, so I don't think there's an issue there. 2) The response you get is this: SUCCESS {f656bd32-8aac-476d-b705-54677ed14b05} Microsoft Search Server 2010 http://some.sharepoint.site.com/test/_vti_bin/search.asmx SOAP {f656bd32-8aac-476d-b705-54677ed14b05} Hackalot INTRANET_GENERAL This service allows you to search the site : Banana Microsoft Search Server 2010 On which says SUCCESS in capital letters no less, so it doesn't look so bad to me :) it is formatted the right way considering it's a string. if you want to get it as xml, you should use the AnyXml type. or in your user code, you can use lxml.etree.{from,to}string to convert it back to an xml representation. does this help? best, burak On 05/09/12 07:29, Paul Harrington wrote: > Hi, > I am attempting to implement a stub Microsoft Office Research Service > using rpclib on Python 2.6. I have no prior experience with SOAP and > little with XML so it may be the case that I am doing something very > sill. My ultimate goal is to have a Python-based service that can be > used with the Office research pane. My proximate goal is to fiddle > around with the namespaces used for soap responses so that I can come > up with a SOAP response that is digestable by Excel. > > regards, > > pjjH > > > As per > http://office.microsoft.com/Research/query.asmx?op=Registration, this > is what the registration should look like. note the > within the soap body > > > HTTP/1.1 200 OK > Content-Type: text/xml; charset=utf-8 > Content-Length: length > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> > > > string > > > > > > However, when I try and register my service from Excel, I get the > following interaction as reported by fiddler. Note the > which use > prefixes which are defined in the soap envelope. > > > HTTP/1.1 200 OK > Content-Length: 1648 > Content-Type: text/xml; charset=utf-8 > Date: Wed, 09 May 2012 03:59:38 GMT > Server: SPACESHIP > > > xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing" > xmlns:tns="urn:Microsoft.Search" > xmlns:plink="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" > xmlns:xop="http://www.w3.org/2004/08/xop/include" > xmlns:senc="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:s12env="http://www.w3.org/2003/05/soap-envelope/" > xmlns:s12enc="http://www.w3.org/2003/05/soap-encoding/" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:senv="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> > <ProviderUpdate > xmlns="urn:Microsoft.Search.Registration.Response"><Status>SUCCESS</Status><Providers><Provider><Id>{f656bd32-8aac-476d-b705-54677ed14b05}</Id><Name>Microsoft > Search Server > 2010</Name><QueryPath>http://some.sharepoint.site.com/test/_vti_bin/search.asmx</QueryPath><Type>SOAP</Type><Services><Service><Id>{f656bd32-8aac-476d-b705-54677ed14b05}</Id><Name>Hackalot</Name><Category>INTRANET_GENERAL</Category><Description>This > service allows you to search the site : > Banana</Description><Copyright>Microsoft Search Server > 2010</Copyright><Display>On</Display></Service></Services></Provider></Providers></ProviderUpdate> > > > > > > > > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap From suraj at barkale.com Thu May 17 13:49:17 2012 From: suraj at barkale.com (Suraj Barkale) Date: Thu, 17 May 2012 11:49:17 +0000 (UTC) Subject: [Soap-Python] Using rpclib with wsdl containing namespaced messages Message-ID: Hi All, Please take a look at the code at https://gist.github.com/2718336 In the WSDL that I have, every element is referred using a namespace. The naive soap server that I have created fails to find the correct method for suds client. I tried giving _in_message_name argument with fully qualified name. However this chokes on the generated wsdl. Can somebody on this list please help me out in getting this to work? Thanks & Regards, Suraj From burak.arslan at arskom.com.tr Thu May 17 18:45:26 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 17 May 2012 19:45:26 +0300 Subject: [Soap-Python] Using rpclib with wsdl containing namespaced messages In-Reply-To: References: Message-ID: <4FB52B26.2090901@arskom.com.tr> On 05/17/12 14:49, Suraj Barkale wrote: > Hi All, > > Please take a look at the code at https://gist.github.com/2718336 Where does that wsdl come from? This is working fine with the latest rpclib, if you feed the auto-generated wsdl to suds. https://gist.github.com/2718747 does it help? best, burak From suraj at barkale.com Thu May 17 18:59:35 2012 From: suraj at barkale.com (Suraj Barkale) Date: Thu, 17 May 2012 16:59:35 +0000 (UTC) Subject: [Soap-Python] Using rpclib with wsdl containing namespaced messages References: <4FB52B26.2090901@arskom.com.tr> Message-ID: Burak Arslan writes: > > On 05/17/12 14:49, Suraj Barkale wrote: > > Hi All, > > > > Please take a look at the code at https://gist.github.com/2718336 > > Where does that wsdl come from? It is from http://www.gamingstandards.com site. They made the documents private about 6 months ago. So I just cooked up an example which exhibited the same problems. > This is working fine with the latest rpclib, if you feed the > auto-generated wsdl to suds. > > https://gist.github.com/2718747 > > does it help? I can not use the auto-generated wsdl since there are other clients out there that follow the wsdl. Other clients create SOAP envelops similar to suds. I shall try to provide a patch that either ignores namespaces or adds extra namespace support. Thanks & Regards, Suraj From burak.arslan at arskom.com.tr Thu May 17 20:46:28 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 17 May 2012 21:46:28 +0300 Subject: [Soap-Python] Using rpclib with wsdl containing namespaced messages In-Reply-To: References: <4FB52B26.2090901@arskom.com.tr> Message-ID: <4FB54784.2020705@arskom.com.tr> On 05/17/12 19:59, Suraj Barkale wrote: > I can not use the auto-generated wsdl since there are other clients out there > that > follow the wsdl. Other clients create SOAP envelops similar to suds. ah. you should've said that earlier. check this again, it's working now. https://gist.github.com/2718747 > I shall try to provide a patch that either ignores namespaces or adds extra > namespace support. > patch the docs instead :) best, burak From burak.arslan at arskom.com.tr Thu May 17 20:55:51 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 17 May 2012 21:55:51 +0300 Subject: [Soap-Python] rpclib and Microsoft Office Research Service In-Reply-To: References: <4FB4BB86.6030808@arskom.com.tr> Message-ID: <4FB549B7.9010502@arskom.com.tr> On 05/17/12 21:12, Paul Harrington wrote: > So my question boils down to is there an easy way to get my Python > SOAP server to omit the tns qualifier in the response. you'd think microsoft would care enough to respect the protocol it created.... sigh. please try this: app = Application(...) app.interface.nsmap[None] = app.interface.nsmap['tns'] app.interface.prefmap[app.interface.nsmap['tns']] = None del app.interface.nsmap['tns'] does it work? best, burak From phrrngtn at panix.com Thu May 17 21:20:59 2012 From: phrrngtn at panix.com (Paul Harrington) Date: Thu, 17 May 2012 15:20:59 -0400 (EDT) Subject: [Soap-Python] rpclib and Microsoft Office Research Service In-Reply-To: <4FB549B7.9010502@arskom.com.tr> References: <4FB4BB86.6030808@arskom.com.tr> <4FB549B7.9010502@arskom.com.tr> Message-ID: On Thu, 17 May 2012, Burak Arslan wrote: > On 05/17/12 21:12, Paul Harrington wrote: >> So my question boils down to is there an easy way to get my Python SOAP >> server to omit the tns qualifier in the response. > > you'd think microsoft would care enough to respect the protocol it > created.... sigh. > > please try this: > > app = Application(...) > app.interface.nsmap[None] = app.interface.nsmap['tns'] > app.interface.prefmap[app.interface.nsmap['tns']] = None > del app.interface.nsmap['tns'] > > does it work? Yes! It does. Perfectly. That is pretty impressive. > > best, > burak > > Thanks very much! pjjH From suraj at barkale.com Fri May 18 12:06:43 2012 From: suraj at barkale.com (Suraj Barkale) Date: Fri, 18 May 2012 10:06:43 +0000 (UTC) Subject: [Soap-Python] =?utf-8?q?Using_rpclib_with_wsdl_containing_namespa?= =?utf-8?q?ced=09messages?= References: <4FB52B26.2090901@arskom.com.tr> <4FB54784.2020705@arskom.com.tr> Message-ID: Burak Arslan writes: > > On 05/17/12 19:59, Suraj Barkale wrote: > > I can not use the auto-generated wsdl since there are other clients out there > > that > > follow the wsdl. Other clients create SOAP envelops similar to suds. > > ah. you should've said that earlier. check this again, it's working now. > > https://gist.github.com/2718747 I got an exception (suds.TypeNotFound: Type not found: 'tns:SendCalcMessageResult') in suds client. It turned out suds was expecting a bare xml and rpclib was adding an extra element. Actual: 3 Expected: 3 I added _body_style='bare' and _soap_body_style='document' to SendCalcMessage() decorator. However, it caused a crash as ComplexModelBase.alias contains undefined 'ClassAlias'. Replacing ClassAlias by something that works has proved beyond my abilities. :( > > I shall try to provide a patch that either ignores namespaces or adds extra > > namespace support. > > > > patch the docs instead :) I shall certainly provide some once I wrap my head around the code. Thanks & Regards, Suraj From burak.arslan at arskom.com.tr Sat May 19 00:53:02 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Sat, 19 May 2012 01:53:02 +0300 Subject: [Soap-Python] Using rpclib with wsdl containing namespaced messages In-Reply-To: References: <4FB52B26.2090901@arskom.com.tr> <4FB54784.2020705@arskom.com.tr> Message-ID: <4FB6D2CE.5000005@arskom.com.tr> On 05/18/12 13:06, Suraj Barkale wrote: > I added _body_style='bare' and _soap_body_style='document' to SendCalcMessage() > decorator. However, it caused a crash as ComplexModelBase.alias contains > undefined 'ClassAlias'. Replacing ClassAlias by something that works has proved > beyond my abilities.:( Hi Suraj, I could swear my code worked before I sent the previous message to you, but upon trying today, I saw it failed exactly as you showed. So there was a rather obvious bug, which I fixed in my fork now it's working (I really hope it does this time!). It definitely needs tests, though. See: https://github.com/plq/rpclib/commit/05c9deed0af3f2e22af1ecdd895524a1f9744cc4 and of course: https://gist.github.com/2718747 So, does this help? best, burak From esiotrot at gmail.com Mon May 21 18:57:15 2012 From: esiotrot at gmail.com (Michael Wood) Date: Mon, 21 May 2012 18:57:15 +0200 Subject: [Soap-Python] Suds: XML encoding issue? Message-ID: Hi Am I doing something wrong or is there a bug in suds wrt. XML encoding? If I do something like this (against a service implemented with soaplib): from suds.client import Client client = Client("http://localhost/blah/?wsdl") client.service.Method("x & y") I seem to get "x & y" on the server side, instead of "x & y". If I call client.service.Method("x & y") I also get "x & y" on the server. If I double encode the string before giving it to suds like this: client.service.Method("x &amp; y") then I get "x & y" on the server. So it seems that suds is encoding raw ampersands, but leaving "&" unencoded in the SOAP message body. The server then decodes them unconditionally as it should. I've tried with 0.4.1 Beta (from SVN) and 0.4 GA. Wireshark shows the same body whether I send "x & y" or "x & y". Is the above expected? Is it a bug? Thanks. -- Michael Wood From burak.arslan at arskom.com.tr Mon May 21 22:17:21 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Mon, 21 May 2012 23:17:21 +0300 Subject: [Soap-Python] Suds: XML encoding issue? In-Reply-To: References: Message-ID: <4FBAA2D1.1080007@arskom.com.tr> On 05/21/12 19:57, Michael Wood wrote: > So it seems that suds is encoding raw ampersands, but leaving "&" > unencoded in the SOAP message body. The server then decodes them > unconditionally as it should. > > I've tried with 0.4.1 Beta (from SVN) and 0.4 GA. > > Wireshark shows the same body whether I send "x& y" or "x& y". > > Is the above expected? Is it a bug? > > Thanks. > Hi Michael. I can reproduce this. It's a suds bug, as the xml request contains the & and not &amp; as it should. Why not migrate to rpclib btw? Best, Burak From burak.arslan at arskom.com.tr Tue May 22 00:40:48 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 22 May 2012 01:40:48 +0300 Subject: [Soap-Python] Using rpclib with wsdl containing namespaced messages In-Reply-To: References: <4FB52B26.2090901@arskom.com.tr> <4FB54784.2020705@arskom.com.tr> <4FB6D2CE.5000005@arskom.com.tr> Message-ID: <4FBAC470.4020303@arskom.com.tr> Hi Suraj, I merged pull request 129. Regarding the Array(EnumType) case, would you please write a test that shows the problem first and submit a pull request from a dedicated branch to the arskom/rpclib repository? This way, it'll be easier for me to see what exactly the problem is and how you're fixing it. Thanks! On 05/21/12 12:24, Suraj Barkale wrote: > Thank you very much. I had to change aux to auxm as Windows does not > allow files named aux. After that the bare mode worked. You should've seen my face when I realized you were speaking the truth :) Is windows the PHP of operating systems or what?! Anyway, I'll think of a better name. (actually, I don't think "auxm" is that bad) I filed a bug report in the arskom/rpclib tracker: https://github.com/arskom/rpclib/issues/135 > When are you planning to release 2.8? It seems there are a lot of > changes since 2.7 and I am afraid to use your experimental repo :) Yes, 2.8 is the result of my sprinting and responding to the criticism I got in this year's PyCon, so it contains a lot of important fixes and additions. But the current 2.8 branch has been working in my production for a while, and lately it's been fairly stable. I even think it's in better shape than the current 2.7.0-beta release. So as long as you clone arskom/rpclib and not plq/rpclib, I don't think there is much to be afraid of. However, I intend to test it a little bit more this time, squash most of the long-standing defects and also extend the test coverage a little bit more because my plan is to make this one the first non-beta release (a release candidate) since soaplib-1.0. So, bear with me a little bit more. Best, Burak From marikkan at gmail.com Wed May 23 17:56:31 2012 From: marikkan at gmail.com (Mehmet Arikkan) Date: Wed, 23 May 2012 18:56:31 +0300 Subject: [Soap-Python] How to change SOAP response headers Message-ID: Hi, I see a "FIXME" in the trunk as such (in soap11.py): # FIXME: There's no way to alter soap response headers for the user. Is there no way to alter SOAP Header (i.. add elements) or if there is, how can we do it easily? Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From wsourdeau at inverse.ca Wed May 23 17:58:48 2012 From: wsourdeau at inverse.ca (Wolfgang Sourdeau) Date: Wed, 23 May 2012 11:58:48 -0400 Subject: [Soap-Python] How to change SOAP response headers In-Reply-To: References: Message-ID: <4FBD0938.5040703@inverse.ca> Le 12-05-23 11:56, Mehmet Arikkan a ?crit : > Hi, > > I see a "FIXME" in the trunk as such (in soap11.py): > > # FIXME: There's no way to alter soap response headers for the user. > > Is there no way to alter SOAP Header (i.. add elements) or if there > is, how can we do it easily? > > From my experience, it is possible to modify the response headers by using the rpc decorator rather than srpc and then modifying the ctx.out_header attribute. That is, if we are talking stricly about the SOPE layer, and not the HTTP layer... Wolfgang From burak.arslan at arskom.com.tr Wed May 23 23:31:39 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 24 May 2012 00:31:39 +0300 Subject: [Soap-Python] How to change SOAP response headers In-Reply-To: <4FBD0938.5040703@inverse.ca> References: <4FBD0938.5040703@inverse.ca> Message-ID: <4FBD573B.3080601@arskom.com.tr> On 05/23/12 18:58, Wolfgang Sourdeau wrote: > Le 12-05-23 11:56, Mehmet Arikkan a ?crit : >> Hi, >> >> I see a "FIXME" in the trunk as such (in soap11.py): >> >> # FIXME: There's no way to alter soap response headers for the user. >> yes, but look at it in its context: if ctx.out_error is not None: # FIXME: There's no way to alter soap response headers for the user. so that's true only in case the use code throws an exception... >> Is there no way to alter SOAP Header (i.. add elements) or if there >> is, how can we do it easily? >> >> > > > From my experience, it is possible to modify the response headers by > using the rpc decorator rather than srpc and then modifying the > ctx.out_header attribute. > That is, if we are talking stricly about the SOPE layer, and not the > HTTP layer... > that's correct. in http you have ctx.transport.resp_headers dict but no ctx.out_header support yet. burak From marikkan at gmail.com Fri May 25 18:45:10 2012 From: marikkan at gmail.com (Mehmet Arikkan) Date: Fri, 25 May 2012 19:45:10 +0300 Subject: [Soap-Python] How to change SOAP response headers In-Reply-To: <4FBD573B.3080601@arskom.com.tr> References: <4FBD0938.5040703@inverse.ca> <4FBD573B.3080601@arskom.com.tr> Message-ID: I tried to add a simple header to the helloworld application: class RespHeader(ComplexModel): __namespace__ = 'rpclib.examples.hello.soap' Elem1 = Mandatory.String Elem2 = Mandatory.String def _on_method_call(ctx): ctx.out_header = RespHeader() ctx.out_header.Elem1 = 'Test1' ctx.out_header.Elem2 = 'Test2' HelloWorldService.event_manager.add_listener('method_call', _on_method_call) So now when I run the server and make a request with the Suds client, I get a response but no header and along with the following message: WARNING:rpclib.protocol.soap.soap11:Skipping soap response header as 'say_hello' method is not declared to have one. When I searched in the code, it seems, ctx.descriptor.out_header is None. But the documentation says for descriptor: descriptor The MethodDescriptor object representing the current method. This object should not be changed by the user code. So how to nail this?? Also, any docs/examples for the sampe usage? Thanks in advance. Mehmet On Thu, May 24, 2012 at 12:31 AM, Burak Arslan wrote: > On 05/23/12 18:58, Wolfgang Sourdeau wrote: > >> Le 12-05-23 11:56, Mehmet Arikkan a ?crit : >> >>> Hi, >>> >>> I see a "FIXME" in the trunk as such (in soap11.py): >>> >>> # FIXME: There's no way to alter soap response headers for the user. >>> >>> > yes, but look at it in its context: > > if ctx.out_error is not None: > > # FIXME: There's no way to alter soap response headers for the > user. > > > so that's true only in case the use code throws an exception... > > > Is there no way to alter SOAP Header (i.. add elements) or if there is, >>> how can we do it easily? >>> >>> >>> >> >> From my experience, it is possible to modify the response headers by >> using the rpc decorator rather than srpc and then modifying the >> ctx.out_header attribute. >> That is, if we are talking stricly about the SOPE layer, and not the HTTP >> layer... >> >> > that's correct. in http you have ctx.transport.resp_headers dict but no > ctx.out_header support yet. > > burak > > > ______________________________**_________________ > Soap mailing list > Soap at python.org > http://mail.python.org/**mailman/listinfo/soap > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marikkan at gmail.com Fri May 25 18:50:55 2012 From: marikkan at gmail.com (Mehmet Arikkan) Date: Fri, 25 May 2012 19:50:55 +0300 Subject: [Soap-Python] How to change SOAP response headers In-Reply-To: References: <4FBD0938.5040703@inverse.ca> <4FBD573B.3080601@arskom.com.tr> Message-ID: Sorry, it seems I was a quite hasty: __out_header__ = RespHeader This fixed the problem when added inside HelloWorldService class. But I am really still curious about whether or not this is the correct way to go. I would appreciate your comments. On Fri, May 25, 2012 at 7:45 PM, Mehmet Arikkan wrote: > I tried to add a simple header to the helloworld application: > > class RespHeader(ComplexModel): > __namespace__ = 'rpclib.examples.hello.soap' > > Elem1 = Mandatory.String > Elem2 = Mandatory.String > > def _on_method_call(ctx): > ctx.out_header = RespHeader() > ctx.out_header.Elem1 = 'Test1' > ctx.out_header.Elem2 = 'Test2' > > HelloWorldService.event_manager.add_listener('method_call', > _on_method_call) > > So now when I run the server and make a request with the Suds client, I > get a response but no header and along with the following message: > > WARNING:rpclib.protocol.soap.soap11:Skipping soap response header as > 'say_hello' method is not declared to have one. > > When I searched in the code, it seems, ctx.descriptor.out_header is None. > But the documentation says for descriptor: > > descriptor > The MethodDescriptor object representing the current method. This object > should not be changed by the user code. > > So how to nail this?? Also, any docs/examples for the sampe usage? > > Thanks in advance. > Mehmet > > On Thu, May 24, 2012 at 12:31 AM, Burak Arslan > wrote: > >> On 05/23/12 18:58, Wolfgang Sourdeau wrote: >> >>> Le 12-05-23 11:56, Mehmet Arikkan a ?crit : >>> >>>> Hi, >>>> >>>> I see a "FIXME" in the trunk as such (in soap11.py): >>>> >>>> # FIXME: There's no way to alter soap response headers for the user. >>>> >>>> >> yes, but look at it in its context: >> >> if ctx.out_error is not None: >> >> # FIXME: There's no way to alter soap response headers for the >> user. >> >> >> so that's true only in case the use code throws an exception... >> >> >> Is there no way to alter SOAP Header (i.. add elements) or if there is, >>>> how can we do it easily? >>>> >>>> >>>> >>> >>> From my experience, it is possible to modify the response headers by >>> using the rpc decorator rather than srpc and then modifying the >>> ctx.out_header attribute. >>> That is, if we are talking stricly about the SOPE layer, and not the >>> HTTP layer... >>> >>> >> that's correct. in http you have ctx.transport.resp_headers dict but no >> ctx.out_header support yet. >> >> burak >> >> >> ______________________________**_________________ >> 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 Fri May 25 19:25:25 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Fri, 25 May 2012 20:25:25 +0300 Subject: [Soap-Python] How to change SOAP response headers In-Reply-To: References: <4FBD0938.5040703@inverse.ca> <4FBD573B.3080601@arskom.com.tr> Message-ID: <4FBFC085.5070006@arskom.com.tr> On 05/25/12 19:50, Mehmet Arikkan wrote: > Sorry, it seems I was a quite hasty: > > __out_header__ = RespHeader > > This fixed the problem when added inside HelloWorldService class. > > But I am really still curious about whether or not this is the correct > way to go. I would appreciate your comments. merhaba, yes, that's the way to go. that's what the warning you saw was cautioning you to do actually. see: https://github.com/plq/rpclib/blob/e669e7e9227bda499e2a77fe5261a9238c232afe/src/rpclib/decorator.py#L149 best, burak From phrrngtn at panix.com Thu May 17 20:12:39 2012 From: phrrngtn at panix.com (Paul Harrington) Date: Thu, 17 May 2012 14:12:39 -0400 (EDT) Subject: [Soap-Python] rpclib and Microsoft Office Research Service In-Reply-To: <4FB4BB86.6030808@arskom.com.tr> References: <4FB4BB86.6030808@arskom.com.tr> Message-ID: Thanks for your reply! My response inline. pjjH On Thu, 17 May 2012, Burak Arslan wrote: > Hi Paul, > > Sorry, I've missed your message for some reason. I was not subscribed to the list when I sent the mail so I think it got enqueued pending approval by the moderator. > 1) > > > > and > > > > are equivalent, so I don't think there's an issue there. On re-reading my e-mail, I see that I did not make it clear that this is exactly where the problem is! I omitted to mention that when I used fiddler to modify the response in flight (a very, very useful feature to have in a HTTP debugger!) and I removed the leading tns: qualifier from the RegistrationResult and RegistrationResponse elements within the element and the faked up registration satisfied Excel and it displayed a dialog box saying my service had been registered successfully. > 2) > > The response you get is this: > > > SUCCESS > > > {f656bd32-8aac-476d-b705-54677ed14b05} > Microsoft Search Server 2010 > http://some.sharepoint.site.com/test/_vti_bin/search.asmx > SOAP > > > {f656bd32-8aac-476d-b705-54677ed14b05} > Hackalot > INTRANET_GENERAL > This service allows you to search the site : > Banana > Microsoft Search Server 2010 > On > > > > > > > which says SUCCESS in capital letters no less, so it doesn't look so bad to > me :) Again, my fault for not being specific. I got this string by scraping it from the response of SharePoint so that I knew that I had a working, valid response. I pasted it in as a string literal into my Python SOAP server code and used it as the return value from my subroutine. However, my problem is that this string is not seen by Excel unless I remove the qualifiers from the RegistrationResult and RegistrationResponse elements. It is as if the SOAP client s/w in Excel is not honoring the namespace declarations made in the element when it comes to processing elements in the element. It may be the case that the Excel code is hardwired to look for an unqualified element name but that is pure speculation. So my question boils down to is there an easy way to get my Python SOAP server to omit the tns qualifier in the response. If I don't specify the tns when creating the server then the incoming SOAP messages do not get translated into method invocations. From suraj at barkale.com Mon May 21 11:24:29 2012 From: suraj at barkale.com (Suraj Barkale) Date: Mon, 21 May 2012 14:54:29 +0530 Subject: [Soap-Python] Using rpclib with wsdl containing namespaced messages In-Reply-To: <4FB6D2CE.5000005@arskom.com.tr> References: <4FB52B26.2090901@arskom.com.tr> <4FB54784.2020705@arskom.com.tr> <4FB6D2CE.5000005@arskom.com.tr> Message-ID: Hi Burak, Thank you very much. I had to change aux to auxm as Windows does not allow files named aux. After that the bare mode worked. When are you planning to release 2.8? It seems there are a lot of changes since 2.7 and I am afraid to use your experimental repo :) Thanks & Regards, Suraj On Sat, May 19, 2012 at 4:23 AM, Burak Arslan wrote: > On 05/18/12 13:06, Suraj Barkale wrote: > >> I added _body_style='bare' and _soap_body_style='document' to >> SendCalcMessage() >> decorator. However, it caused a crash as ComplexModelBase.alias contains >> undefined 'ClassAlias'. Replacing ClassAlias by something that works has >> proved >> beyond my abilities.:( >> > > Hi Suraj, > > I could swear my code worked before I sent the previous message to you, > but upon trying today, I saw it failed exactly as you showed. > > So there was a rather obvious bug, which I fixed in my fork now it's > working (I really hope it does this time!). It definitely needs tests, > though. > > See: https://github.com/plq/rpclib/**commit/** > 05c9deed0af3f2e22af1ecdd895524**a1f9744cc4and of course: > https://gist.github.com/**2718747 > > So, does this help? > > best, > burak > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marikkan at gmail.com Fri May 25 20:09:14 2012 From: marikkan at gmail.com (Mehmet Arikkan) Date: Fri, 25 May 2012 21:09:14 +0300 Subject: [Soap-Python] How to change SOAP response headers In-Reply-To: <4FBFC085.5070006@arskom.com.tr> References: <4FBD0938.5040703@inverse.ca> <4FBD573B.3080601@arskom.com.tr> <4FBFC085.5070006@arskom.com.tr> Message-ID: Actually what I meant to ask is that whether my way to add the header is a proper way: def _on_method_call(ctx): ctx.out_header = RespHeader() ctx.out_header.Elem1 = 'Test1' ctx.out_header.Elem2 = 'Test2' HelloWorldService.event_manager.add_listener('method_call', _on_method_call) Is this how you would properly add a SOAP Header to your outgoing message? On Fri, May 25, 2012 at 8:25 PM, Burak Arslan wrote: > On 05/25/12 19:50, Mehmet Arikkan wrote: > >> Sorry, it seems I was a quite hasty: >> >> __out_header__ = RespHeader >> >> This fixed the problem when added inside HelloWorldService class. >> >> But I am really still curious about whether or not this is the correct >> way to go. I would appreciate your comments. >> > > > merhaba, > > yes, that's the way to go. that's what the warning you saw was cautioning > you to do actually. > > see: https://github.com/plq/rpclib/**blob/**e669e7e9227bda499e2a77fe5261a9 > **238c232afe/src/rpclib/**decorator.py#L149 > > best, > burak > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From burak.arslan at arskom.com.tr Fri May 25 20:14:00 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Fri, 25 May 2012 21:14:00 +0300 Subject: [Soap-Python] How to change SOAP response headers In-Reply-To: References: <4FBD0938.5040703@inverse.ca> <4FBD573B.3080601@arskom.com.tr> <4FBFC085.5070006@arskom.com.tr> Message-ID: <4FBFCBE8.5000203@arskom.com.tr> On 05/25/12 21:09, Mehmet Arikkan wrote: > Actually what I meant to ask is that whether my way to add the header > is a proper way: > > def _on_method_call(ctx): > ctx.out_header = RespHeader() > ctx.out_header.Elem1 = 'Test1' > ctx.out_header.Elem2 = 'Test2' > > HelloWorldService.event_manager.add_listener('method_call', > _on_method_call) > > Is this how you would properly add a SOAP Header to your outgoing message? > Yes, you could do it like this with events if you want to add that header to every response regardless of the method name. You could also do it in the user code as well, without messing with events at all, in case you need to add method-specific headers. Does that help? Best, Burak -------------- next part -------------- An HTML attachment was scrubbed... URL: From marikkan at gmail.com Mon May 28 09:34:01 2012 From: marikkan at gmail.com (Mehmet Arikkan) Date: Mon, 28 May 2012 10:34:01 +0300 Subject: [Soap-Python] How to change SOAP response headers In-Reply-To: <4FBFCBE8.5000203@arskom.com.tr> References: <4FBD0938.5040703@inverse.ca> <4FBD573B.3080601@arskom.com.tr> <4FBFC085.5070006@arskom.com.tr> <4FBFCBE8.5000203@arskom.com.tr> Message-ID: Hi Burak, "You could also do it in the user code as well, without messing with events at all, in case you need to add method-specific headers." Could you please give an example about this method? This is what I need. I think I don't have a clear understanding on how I can use the "ctx" variable in an @rpc or @srpc decorator function. Suppose I have two methods A and B and I want to include an AHeader and a BHeader in them respectively. How can I do that, could you please elaborate with a simple example? Regards, Mehmet On Fri, May 25, 2012 at 9:14 PM, Burak Arslan wrote: > On 05/25/12 21:09, Mehmet Arikkan wrote: > > Actually what I meant to ask is that whether my way to add the header is a > proper way: > > def _on_method_call(ctx): > ctx.out_header = RespHeader() > ctx.out_header.Elem1 = 'Test1' > ctx.out_header.Elem2 = 'Test2' > > HelloWorldService.event_manager.add_listener('method_call', > _on_method_call) > > Is this how you would properly add a SOAP Header to your outgoing > message? > > > Yes, you could do it like this with events if you want to add that header > to every response regardless of the method name. You could also do it in > the user code as well, without messing with events at all, in case you need > to add method-specific headers. > > Does that help? > > 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 marikkan at gmail.com Mon May 28 09:57:03 2012 From: marikkan at gmail.com (Mehmet Arikkan) Date: Mon, 28 May 2012 10:57:03 +0300 Subject: [Soap-Python] How to change SOAP response headers In-Reply-To: References: <4FBD0938.5040703@inverse.ca> <4FBD573B.3080601@arskom.com.tr> <4FBFC085.5070006@arskom.com.tr> <4FBFCBE8.5000203@arskom.com.tr> Message-ID: Hi Burak, I have found this answer as well, please don't bother :). I guess I have to use @rpc instead of @sprc so that I can include ctx variable. Please let me know if I am mistaken. Regards, Mehmet On Mon, May 28, 2012 at 10:34 AM, Mehmet Arikkan wrote: > Hi Burak, > > "You could also do it in the user code as well, without messing with > events at all, in case you need to add method-specific headers." > > Could you please give an example about this method? This is what I need. I > think I don't have a clear understanding on how I can use the "ctx" > variable in an @rpc or @srpc decorator function. > > Suppose I have two methods A and B and I want to include an AHeader and a > BHeader in them respectively. How can I do that, could you please elaborate > with a simple example? > > Regards, > Mehmet > > On Fri, May 25, 2012 at 9:14 PM, Burak Arslan wrote: > >> On 05/25/12 21:09, Mehmet Arikkan wrote: >> >> Actually what I meant to ask is that whether my way to add the header is >> a proper way: >> >> def _on_method_call(ctx): >> ctx.out_header = RespHeader() >> ctx.out_header.Elem1 = 'Test1' >> ctx.out_header.Elem2 = 'Test2' >> >> HelloWorldService.event_manager.add_listener('method_call', >> _on_method_call) >> >> Is this how you would properly add a SOAP Header to your outgoing >> message? >> >> >> Yes, you could do it like this with events if you want to add that header >> to every response regardless of the method name. You could also do it in >> the user code as well, without messing with events at all, in case you need >> to add method-specific headers. >> >> Does that help? >> >> 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 burak.arslan at arskom.com.tr Mon May 28 11:18:52 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Mon, 28 May 2012 12:18:52 +0300 Subject: [Soap-Python] How to change SOAP response headers In-Reply-To: References: <4FBD0938.5040703@inverse.ca> <4FBD573B.3080601@arskom.com.tr> <4FBFC085.5070006@arskom.com.tr> <4FBFCBE8.5000203@arskom.com.tr> Message-ID: <4FC342FC.2030200@arskom.com.tr> On 05/28/12 10:57, Mehmet Arikkan wrote: > Hi Burak, > > I have found this answer as well, please don't bother :). I guess I > have to use @rpc instead of @sprc so that I can include ctx variable. > Please let me know if I am mistaken. > Merhaba, Yes, you're correct. And in case you think I should make any additions to the documentation, please let me know. Best, Burak > Regards, > Mehmet > > On Mon, May 28, 2012 at 10:34 AM, Mehmet Arikkan > wrote: > > Hi Burak, > > "You could also do it in the user code as well, without messing > with events at all, in case you need to add method-specific headers." > > Could you please give an example about this method? This is what I > need. I think I don't have a clear understanding on how I can use > the "ctx" variable in an @rpc or @srpc decorator function. > > Suppose I have two methods A and B and I want to include an > AHeader and a BHeader in them respectively. How can I do that, > could you please elaborate with a simple example? > > Regards, > Mehmet > > On Fri, May 25, 2012 at 9:14 PM, Burak Arslan > > > wrote: > > On 05/25/12 21:09, Mehmet Arikkan wrote: >> Actually what I meant to ask is that whether my way to add >> the header is a proper way: >> >> def _on_method_call(ctx): >> ctx.out_header = RespHeader() >> ctx.out_header.Elem1 = 'Test1' >> ctx.out_header.Elem2 = 'Test2' >> >> HelloWorldService.event_manager.add_listener('method_call', >> _on_method_call) >> >> Is this how you would properly add a SOAP Header to your >> outgoing message? >> > > Yes, you could do it like this with events if you want to add > that header to every response regardless of the method name. > You could also do it in the user code as well, without messing > with events at all, in case you need to add method-specific > headers. > > Does that help? > > 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 dfischer at key-systems.net Thu May 31 09:35:37 2012 From: dfischer at key-systems.net (Dennis Fischer) Date: Thu, 31 May 2012 09:35:37 +0200 Subject: [Soap-Python] rpclib: anydict as a parameter question Message-ID: <4FC71F49.5020504@key-systems.net> Hello, I have question regarding soap server implementation using rpclib. I want to create a soap api with different methods. These methods should use a dict as a parameter to transfer different strings to the api. The server / client code are posted below. My problem is that, as seen in the [log] section, the variable 'params' in the [server] section is a WsgiMethodContext object, not the expected dict I want to use. What am I doing wrong here? Can anyone post an example of how to pass a dict as a parameter using rpclib? Thanks for your help :) [Server] # coding: utf-8 from rpclib.decorator import rpc from rpclib.service import ServiceBase from rpclib.model.primitive import AnyDict class ApiInterface(ServiceBase): @rpc(AnyDict,_returns=AnyDict) def Ping(params): print("[PARAMS] " + str(params)) return { 'result' : 1 } [Client] #! /usr/bin/python # coding: utf-8 from suds.client import Client api = Client('http://api.soaptest.com:1234/?wsdl', cache=None) params = { } params['user'] = [ 'abc' ] result = api.service.Ping(params) print(str(result)) [Result] (anyType){ result = "1" } [Log] [Thu May 31 09:02:03 2012] [error] [PARAMS] WsgiMethodContext( [Thu May 31 09:02:03 2012] [error] \tfunction=, [Thu May 31 09:02:03 2012] [error] \tout_body_doc=None, [Thu May 31 09:02:03 2012] [error] \tout_string=None, [Thu May 31 09:02:03 2012] [error] \tlocale=None, [Thu May 31 09:02:03 2012] [error] \tservice_class=, [Thu May 31 09:02:03 2012] [error] \tapp=, [Thu May 31 09:02:03 2012] [error] \tout_header_doc=None, [Thu May 31 09:02:03 2012] [error] \tcall_end=None, [Thu May 31 09:02:03 2012] [error] \tout_object=None, [Thu May 31 09:02:03 2012] [error] \tudc=None, [Thu May 31 09:02:03 2012] [error] \tout_document=None, [Thu May 31 09:02:03 2012] [error] \tout_header=None, [Thu May 31 09:02:03 2012] [error] \tin_document=, [Thu May 31 09:02:03 2012] [error] \tin_error=None, [Thu May 31 09:02:03 2012] [error] \tevent=, [Thu May 31 09:02:03 2012] [error] \ttransport=, [Thu May 31 09:02:03 2012] [error] \tin_body_doc=, [Thu May 31 09:02:03 2012] [error] \tin_object=[], [Thu May 31 09:02:03 2012] [error] \t_MethodContext__descriptor=, [Thu May 31 09:02:03 2012] [error] \tcall_start=1338447723.4348221, [Thu May 31 09:02:03 2012] [error] \tfrozen=True, [Thu May 31 09:02:03 2012] [error] \tin_string=, [Thu May 31 09:02:03 2012] [error] \tmethod_request_string='{dd24.api}Ping', [Thu May 31 09:02:03 2012] [error] \tout_error=None, [Thu May 31 09:02:03 2012] [error] \taux=None, [Thu May 31 09:02:03 2012] [error] \tin_header_doc=None, [Thu May 31 09:02:03 2012] [error] \tin_header=None, [Thu May 31 09:02:03 2012] [error] )) From burak.arslan at arskom.com.tr Thu May 31 09:59:32 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 31 May 2012 10:59:32 +0300 Subject: [Soap-Python] rpclib: anydict as a parameter question In-Reply-To: <4FC71F49.5020504@key-systems.net> References: <4FC71F49.5020504@key-systems.net> Message-ID: <4FC724E4.9090801@arskom.com.tr> Hi, With @rpc, the first parameter is always the context object (ctx by convention). You should do either this: @rpc(AnyDict,_returns=AnyDict) def Ping(ctx, params): or this: @srpc(AnyDict,_returns=AnyDict) def Ping(params): best, burak On 31/05/12 10:35, Dennis Fischer wrote: > Hello, > > I have question regarding soap server implementation using rpclib. I > want to create a soap api with different methods. These methods should > use a dict as a parameter to transfer different strings to the api. > The server / client code are posted below. My problem is that, as seen > in the [log] section, the variable 'params' in the [server] section is > a WsgiMethodContext object, not the expected dict I want to use. > > What am I doing wrong here? Can anyone post an example of how to pass > a dict as a parameter using rpclib? > > Thanks for your help :) > > [Server] > > # coding: utf-8 > > from rpclib.decorator import rpc > from rpclib.service import ServiceBase > from rpclib.model.primitive import AnyDict > > > class ApiInterface(ServiceBase): > > @rpc(AnyDict,_returns=AnyDict) > def Ping(params): > > print("[PARAMS] " + str(params)) > return { 'result' : 1 } > > [Client] > > #! /usr/bin/python > # coding: utf-8 > > from suds.client import Client > > api = Client('http://api.soaptest.com:1234/?wsdl', cache=None) > > params = { } > params['user'] = [ 'abc' ] > result = api.service.Ping(params) > print(str(result)) > > [Result] > > (anyType){ > result = "1" > } > > [Log] > > [Thu May 31 09:02:03 2012] [error] [PARAMS] WsgiMethodContext( > [Thu May 31 09:02:03 2012] [error] \tfunction= 0x7f9fa4d648c0>, > [Thu May 31 09:02:03 2012] [error] \tout_body_doc=None, > [Thu May 31 09:02:03 2012] [error] \tout_string=None, > [Thu May 31 09:02:03 2012] [error] \tlocale=None, > [Thu May 31 09:02:03 2012] [error] \tservice_class= 'api.ApiInterface.ApiInterface'>, > [Thu May 31 09:02:03 2012] [error] > \tapp=, > [Thu May 31 09:02:03 2012] [error] \tout_header_doc=None, > [Thu May 31 09:02:03 2012] [error] \tcall_end=None, > [Thu May 31 09:02:03 2012] [error] \tout_object=None, > [Thu May 31 09:02:03 2012] [error] \tudc=None, > [Thu May 31 09:02:03 2012] [error] \tout_document=None, > [Thu May 31 09:02:03 2012] [error] \tout_header=None, > [Thu May 31 09:02:03 2012] [error] \tin_document= {http://schemas.xmlsoap.org/soap/envelope/}Envelope at 0x7f9fa4d7bf00>, > [Thu May 31 09:02:03 2012] [error] \tin_error=None, > [Thu May 31 09:02:03 2012] [error] \tevent= object at 0x7f9fa4d6b050>, > [Thu May 31 09:02:03 2012] [error] > \ttransport= 0x7f9fa4d6b390>, > [Thu May 31 09:02:03 2012] [error] \tin_body_doc= {dd24.api}Ping at 0x7f9fa4d7bf50>, > [Thu May 31 09:02:03 2012] [error] \tin_object=[], > [Thu May 31 09:02:03 2012] [error] > \t_MethodContext__descriptor= 0x7f9fa4d66410>, > [Thu May 31 09:02:03 2012] [error] \tcall_start=1338447723.4348221, > [Thu May 31 09:02:03 2012] [error] \tfrozen=True, > [Thu May 31 09:02:03 2012] [error] \tin_string= __wsgi_input_to_iterable at 0x7f9fa4d7b4b0>, > [Thu May 31 09:02:03 2012] [error] > \tmethod_request_string='{dd24.api}Ping', > [Thu May 31 09:02:03 2012] [error] \tout_error=None, > [Thu May 31 09:02:03 2012] [error] \taux=None, > [Thu May 31 09:02:03 2012] [error] \tin_header_doc=None, > [Thu May 31 09:02:03 2012] [error] \tin_header=None, > [Thu May 31 09:02:03 2012] [error] )) > > > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap From dfischer at key-systems.net Thu May 31 10:25:32 2012 From: dfischer at key-systems.net (Dennis Fischer) Date: Thu, 31 May 2012 10:25:32 +0200 Subject: [Soap-Python] rpclib: anydict as a parameter question In-Reply-To: <4FC724E4.9090801@arskom.com.tr> References: <4FC71F49.5020504@key-systems.net> <4FC724E4.9090801@arskom.com.tr> Message-ID: <4FC72AFC.4000705@key-systems.net> Hello burak, thanks for your help. I have made these changes, but now i receive a new error. Do you have any suggestions on this one: [client] suds raises the following exception: Traceback (most recent call last): File "./tests/api_test.py", line 84, in result = api.service.Ping(params) File "/usr/lib/pymodules/python2.6/suds/client.py", line 539, in __call__ return client.invoke(args, kwargs) File "/usr/lib/pymodules/python2.6/suds/client.py", line 598, in invoke result = self.send(msg) File "/usr/lib/pymodules/python2.6/suds/client.py", line 633, in send result = self.failed(binding, e) File "/usr/lib/pymodules/python2.6/suds/client.py", line 684, in failed r, p = binding.get_fault(reply) File "/usr/lib/pymodules/python2.6/suds/bindings/binding.py", line 238, in get_fault raise WebFault(p, faultroot) suds.WebFault: Server raised fault: 'Namespace prefix xs on user is not defined, line 6, column 21' [server] The server debug log shows me the following: [Thu May 31 10:12:03 2012] [error] ERROR:rpclib.protocol.soap.soap11: [Thu May 31 10:12:03 2012] [error] [Thu May 31 10:12:03 2012] [error] [Thu May 31 10:12:03 2012] [error] [Thu May 31 10:12:03 2012] [error] [Thu May 31 10:12:03 2012] [error] abc [Thu May 31 10:12:03 2012] [error] [Thu May 31 10:12:03 2012] [error] [Thu May 31 10:12:03 2012] [error] [Thu May 31 10:12:03 2012] [error] Which leads to this result: [Thu May 31 10:12:03 2012] [error] DEBUG:rpclib.protocol.soap.soap11:\x1b[1;31mResponse\x1b[0m [Thu May 31 10:12:03 2012] [error] [Thu May 31 10:12:03 2012] [error] [Thu May 31 10:12:03 2012] [error] [Thu May 31 10:12:03 2012] [error] senv:Client.XMLSyntaxError [Thu May 31 10:12:03 2012] [error] Namespace prefix xs on user is not defined, line 6, column 21 [Thu May 31 10:12:03 2012] [error] [Thu May 31 10:12:03 2012] [error] [Thu May 31 10:12:03 2012] [error] [Thu May 31 10:12:03 2012] [error] [Thu May 31 10:12:03 2012] [error] If I use a String (for testing purpose) instead of a AnyDict, it works like a charm Am 31.05.2012 09:59, schrieb Burak Arslan: > Hi, > > With @rpc, the first parameter is always the context object (ctx by > convention). > > You should do either this: > > @rpc(AnyDict,_returns=AnyDict) > def Ping(ctx, params): > > or this: > > @srpc(AnyDict,_returns=AnyDict) > def Ping(params): > > > best, > burak > > > On 31/05/12 10:35, Dennis Fischer wrote: >> Hello, >> >> I have question regarding soap server implementation using rpclib. I >> want to create a soap api with different methods. These methods >> should use a dict as a parameter to transfer different strings to the >> api. The server / client code are posted below. My problem is that, >> as seen in the [log] section, the variable 'params' in the [server] >> section is a WsgiMethodContext object, not the expected dict I want >> to use. >> >> What am I doing wrong here? Can anyone post an example of how to pass >> a dict as a parameter using rpclib? >> >> Thanks for your help :) >> >> [Server] >> >> # coding: utf-8 >> >> from rpclib.decorator import rpc >> from rpclib.service import ServiceBase >> from rpclib.model.primitive import AnyDict >> >> >> class ApiInterface(ServiceBase): >> >> @rpc(AnyDict,_returns=AnyDict) >> def Ping(params): >> >> print("[PARAMS] " + str(params)) >> return { 'result' : 1 } >> >> [Client] >> >> #! /usr/bin/python >> # coding: utf-8 >> >> from suds.client import Client >> >> api = Client('http://api.soaptest.com:1234/?wsdl', cache=None) >> >> params = { } >> params['user'] = [ 'abc' ] >> result = api.service.Ping(params) >> print(str(result)) >> >> [Result] >> >> (anyType){ >> result = "1" >> } >> >> [Log] >> >> [Thu May 31 09:02:03 2012] [error] [PARAMS] WsgiMethodContext( >> [Thu May 31 09:02:03 2012] [error] \tfunction=> 0x7f9fa4d648c0>, >> [Thu May 31 09:02:03 2012] [error] \tout_body_doc=None, >> [Thu May 31 09:02:03 2012] [error] \tout_string=None, >> [Thu May 31 09:02:03 2012] [error] \tlocale=None, >> [Thu May 31 09:02:03 2012] [error] \tservice_class=> 'api.ApiInterface.ApiInterface'>, >> [Thu May 31 09:02:03 2012] [error] >> \tapp=, >> [Thu May 31 09:02:03 2012] [error] \tout_header_doc=None, >> [Thu May 31 09:02:03 2012] [error] \tcall_end=None, >> [Thu May 31 09:02:03 2012] [error] \tout_object=None, >> [Thu May 31 09:02:03 2012] [error] \tudc=None, >> [Thu May 31 09:02:03 2012] [error] \tout_document=None, >> [Thu May 31 09:02:03 2012] [error] \tout_header=None, >> [Thu May 31 09:02:03 2012] [error] \tin_document=> {http://schemas.xmlsoap.org/soap/envelope/}Envelope at 0x7f9fa4d7bf00>, >> [Thu May 31 09:02:03 2012] [error] \tin_error=None, >> [Thu May 31 09:02:03 2012] [error] \tevent=> object at 0x7f9fa4d6b050>, >> [Thu May 31 09:02:03 2012] [error] >> \ttransport=> 0x7f9fa4d6b390>, >> [Thu May 31 09:02:03 2012] [error] \tin_body_doc=> {dd24.api}Ping at 0x7f9fa4d7bf50>, >> [Thu May 31 09:02:03 2012] [error] \tin_object=[], >> [Thu May 31 09:02:03 2012] [error] >> \t_MethodContext__descriptor=> 0x7f9fa4d66410>, >> [Thu May 31 09:02:03 2012] [error] \tcall_start=1338447723.4348221, >> [Thu May 31 09:02:03 2012] [error] \tfrozen=True, >> [Thu May 31 09:02:03 2012] [error] \tin_string=> __wsgi_input_to_iterable at 0x7f9fa4d7b4b0>, >> [Thu May 31 09:02:03 2012] [error] >> \tmethod_request_string='{dd24.api}Ping', >> [Thu May 31 09:02:03 2012] [error] \tout_error=None, >> [Thu May 31 09:02:03 2012] [error] \taux=None, >> [Thu May 31 09:02:03 2012] [error] \tin_header_doc=None, >> [Thu May 31 09:02:03 2012] [error] \tin_header=None, >> [Thu May 31 09:02:03 2012] [error] )) >> >> >> _______________________________________________ >> Soap mailing list >> Soap at python.org >> http://mail.python.org/mailman/listinfo/soap > -- Bei weiteren Fragen stehen wir Ihnen gerne zur Verf?gung. Mit freundlichen Gr??en, Dennis Fischer Chief Development Officer - dd24 Key-Systems GmbH Im Oberen Werk 1 66386 St. Ingbert Tel.: +49 (0) 6894 - 9396 960 Fax.: +49 (0) 6894 - 9396 851 Email: dfischer at key-systems.net Web: www.key-systems.net / www.RRPproxy.net www.domaindiscount24.com / www.BrandShelter.com Folgen Sie uns bei Twitter oder werden Sie unser Fan bei Facebook: www.key-systems.net/facebook www.twitter.com/key_systems Gesch?ftsf?hrer: Alexander Siffrin Handelsregister Nr.: HR B 18835 - Saarbruecken Umsatzsteuer ID.: DE211006534 Der Inhalt dieser Nachricht ist vertraulich und nur f?r den angegebenen Empf?nger bestimmt. Jede Form der Kenntnisgabe, Ver?ffentlichung oder Weitergabe an Dritte durch den Empf?nger ist unzul?ssig. Sollte diese Nachricht nicht f?r Sie bestimmt sein, so bitten wir Sie, sich mit uns per E-Mail oder telefonisch in Verbindung zu setzen. -------------------------------------------- Should you have any further questions, please do not hesitate to contact us. Best regards, Dennis Fischer Chief Development Officer - dd24 Key-Systems GmbH Im Oberen Werk 1 DE-66386 St. Ingbert Tel.: +49 (0) 6894 - 9396 960 Fax.: +49 (0) 6894 - 9396 851 Email: dfischer at key-systems.net Web: www.key-systems.net / www.RRPproxy.net www.domaindiscount24.com / www.BrandShelter.com Follow us on Twitter or join our fan community on Facebook and stay updated: www.key-systems.net/facebook www.twitter.com/key_systems CEO: Alexander Siffrin Registration No.: HR B 18835 - Saarbruecken V.A.T. ID.: DE211006534 Member of the KEYDRIVE GROUP www.keydrive.lu This e-mail and its attachments is intended only for the person to whom it is addressed. Furthermore it is not permitted to publish any content of this email. You must not use, disclose, copy, print or rely on this e-mail. If an addressing or transmission error has misdirected this e-mail, kindly notify the author by replying to this e-mail or contacting us by telephone. From burak.arslan at arskom.com.tr Thu May 31 10:45:47 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 31 May 2012 11:45:47 +0300 Subject: [Soap-Python] rpclib: anydict as a parameter question In-Reply-To: <4FC72AFC.4000705@key-systems.net> References: <4FC71F49.5020504@key-systems.net> <4FC724E4.9090801@arskom.com.tr> <4FC72AFC.4000705@key-systems.net> Message-ID: <4FC72FBB.2000409@arskom.com.tr> On 05/31/12 11:25, Dennis Fischer wrote: > [Thu May 31 10:12:03 2012] [error] > senv:Client.XMLSyntaxError > [Thu May 31 10:12:03 2012] [error] Namespace prefix xs on > user is not defined, line 6, column 21 you have: abc you should have: abc burak From dfischer at key-systems.net Thu May 31 10:52:58 2012 From: dfischer at key-systems.net (Dennis Fischer) Date: Thu, 31 May 2012 10:52:58 +0200 Subject: [Soap-Python] rpclib: anydict as a parameter question In-Reply-To: <4FC72FBB.2000409@arskom.com.tr> References: <4FC71F49.5020504@key-systems.net> <4FC724E4.9090801@arskom.com.tr> <4FC72AFC.4000705@key-systems.net> <4FC72FBB.2000409@arskom.com.tr> Message-ID: <4FC7316A.5000202@key-systems.net> Ok, but how can I change that? As you can see, I'm not changing any rpclib code and the wsdl file is automaticly generated Am 31.05.2012 10:45, schrieb Burak Arslan: > On 05/31/12 11:25, Dennis Fischer wrote: >> [Thu May 31 10:12:03 2012] [error] >> senv:Client.XMLSyntaxError >> [Thu May 31 10:12:03 2012] [error] Namespace prefix xs >> on user is not defined, line 6, column 21 > > you have: > abc > > you should have: > abc > > burak From burak.arslan at arskom.com.tr Thu May 31 11:15:48 2012 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 31 May 2012 12:15:48 +0300 Subject: [Soap-Python] rpclib: anydict as a parameter question In-Reply-To: <4FC7316A.5000202@key-systems.net> References: <4FC71F49.5020504@key-systems.net> <4FC724E4.9090801@arskom.com.tr> <4FC72AFC.4000705@key-systems.net> <4FC72FBB.2000409@arskom.com.tr> <4FC7316A.5000202@key-systems.net> Message-ID: <4FC736C4.5000607@arskom.com.tr> On 05/31/12 11:52, Dennis Fischer wrote: > Ok, but how can I change that? As you can see, I'm not changing any > rpclib code and the wsdl file is automaticly generated > It's not rpclib's fault, you're sending it invalid xml (as it clearly states). You should have a look at suds' documentation to figure out how to add namespace prefix definition to your request document. burak > Am 31.05.2012 10:45, schrieb Burak Arslan: >> On 05/31/12 11:25, Dennis Fischer wrote: >>> [Thu May 31 10:12:03 2012] [error] >>> senv:Client.XMLSyntaxError >>> [Thu May 31 10:12:03 2012] [error] Namespace prefix xs >>> on user is not defined, line 6, column 21 >> >> you have: >> abc >> >> you should have: >> abc >> >> burak