From burak.arslan at arskom.com.tr Tue Aug 3 11:27:37 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 03 Aug 2010 12:27:37 +0300 Subject: [Soap-Python] multiple services with soaplib-0.9.1-alpha1 Message-ID: <4C57E109.3050509@arskom.com.tr> hi, i just made a new release that lets you give an iterable of service definitions (not instances) to wsgi.Application. this helps complex applications that want to provide web services under the same targetNamespace but want them defined under different classes. to do this, i had to rearrange some of the hooks. here are the hooks for the wsgi server: http://github.com/arskom/soaplib/blob/662051688fad20e151b427aa1d20c20caa8ecedd/src/soaplib/wsgi.py#L499 and the hooks for the service definition: http://github.com/arskom/soaplib/blob/662051688fad20e151b427aa1d20c20caa8ecedd/src/soaplib/service.py#L224 i think this was the last api change to the 0.9 series. i plan to make a beta 0.8.2 and 0.9.1 releases around end of august or beginning of september, if nobody reports any issues. soaplib project needs your help for documentation. the working example servers are located here: http://github.com/arskom/soaplib/tree/master/src/soaplib/test/interop/server/ best regards, burak From luca.dariz at unife.it Tue Aug 3 12:08:33 2010 From: luca.dariz at unife.it (Luca Dariz) Date: Tue, 03 Aug 2010 12:08:33 +0200 Subject: [Soap-Python] multiple services with soaplib-0.9.1-alpha1 In-Reply-To: <4C57E109.3050509@arskom.com.tr> References: <4C57E109.3050509@arskom.com.tr> Message-ID: <4C57EAA1.9050501@unife.it> > i just made a new release that lets you give an iterable of service > definitions (not instances) to wsgi.Application. this helps complex > applications that want to provide web services under the same > targetNamespace but want them defined under different classes. > > Hi, I am wondering if wouldn't be better to have instances of services instead of definitions. This way would be easier to subclass DefinitionBase, maybe defining a __call__ method and pass there the http environment, and one could write something like: class MyService(DefinitionBase): def __init__(self, data): DefinitionBase.__init__(self) self._something_needed = data services = [MyService(something_heavy)] application = Application(services, 'ServiceTNS') Here something_needed could be for example some database connection, or something that could be nice to have persistent into the service, since the methods are called on it. To me it looks like this way services would be more customizable, what do you think? Regards, Luca From burak.arslan at arskom.com.tr Tue Aug 3 13:13:46 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 03 Aug 2010 14:13:46 +0300 Subject: [Soap-Python] multiple services with soaplib-0.9.1-alpha1 In-Reply-To: <4C57EAA1.9050501@unife.it> References: <4C57E109.3050509@arskom.com.tr> <4C57EAA1.9050501@unife.it> Message-ID: <4C57F9EA.2070103@arskom.com.tr> On 08/03/10 13:08, Luca Dariz wrote: > >> i just made a new release that lets you give an iterable of service >> definitions (not instances) to wsgi.Application. this helps complex >> applications that want to provide web services under the same >> targetNamespace but want them defined under different classes. >> >> > Hi, > > I am wondering if wouldn't be better to have instances of services > instead of definitions. > > This way would be easier to subclass DefinitionBase, maybe defining a > __call__ method and pass there the http environment, and one could > write something like: > > class MyService(DefinitionBase): > def __init__(self, data): > DefinitionBase.__init__(self) > self._something_needed = data > > services = [MyService(something_heavy)] > application = Application(services, 'ServiceTNS') > > Here something_needed could be for example some database connection, > or something that could be nice to have persistent into the service, > since the methods are called on it. > > To me it looks like this way services would be more customizable, what > do you think? Hi Luca, The way i designed it was to have service object instantiated for every request. This gives you an elegant way to store request-level information like soap or http headers. But you can pass any kind of callable as a service to the wsgi.Application object, provided it implements the same interface. I'd do what you describe by overriding the wsgi.Application.get_service method. class MyApplication(wsgi.Application): def __init__(self, services, tns, data): self.__data = data wsgi.Application.__init__(self, service, tns) def get_service(self, method_name, http_env): return self.call_routes[method_name](http_env, self.__data) application = MyApplication([MyService], data, tns=__name__) hth burak From burak.arslan at arskom.com.tr Tue Aug 3 13:33:11 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 03 Aug 2010 14:33:11 +0300 Subject: [Soap-Python] multiple services with soaplib-0.9.1-alpha1 In-Reply-To: <4C57F9EA.2070103@arskom.com.tr> References: <4C57E109.3050509@arskom.com.tr> <4C57EAA1.9050501@unife.it> <4C57F9EA.2070103@arskom.com.tr> Message-ID: <4C57FE77.4000009@arskom.com.tr> On 08/03/10 14:13, Burak Arslan wrote: > On 08/03/10 13:08, Luca Dariz wrote: >>> i just made a new release that lets you give an iterable of service >>> definitions (not instances) to wsgi.Application. this helps complex >>> applications that want to provide web services under the same >>> targetNamespace but want them defined under different classes. >>> >>> >> Hi, >> >> I am wondering if wouldn't be better to have instances of services >> instead of definitions. >> >> This way would be easier to subclass DefinitionBase, maybe defining a >> __call__ method and pass there the http environment, and one could >> write something like: >> >> class MyService(DefinitionBase): >> def __init__(self, data): >> DefinitionBase.__init__(self) >> self._something_needed = data >> >> services = [MyService(something_heavy)] >> application = Application(services, 'ServiceTNS') >> >> Here something_needed could be for example some database connection, >> or something that could be nice to have persistent into the service, >> since the methods are called on it. >> >> To me it looks like this way services would be more customizable, what >> do you think? > Hi Luca, > > The way i designed it was to have service object instantiated for every > request. This gives you an elegant way to store request-level > information like soap or http headers. > > But you can pass any kind of callable as a service to the > wsgi.Application object, provided it implements the same interface. > > I'd do what you describe by overriding the wsgi.Application.get_service > method. > > class MyApplication(wsgi.Application): > def __init__(self, services, tns, data): > self.__data = data > > wsgi.Application.__init__(self, service, tns) > > def get_service(self, method_name, http_env): > return self.call_routes[method_name](http_env, self.__data) > > application = MyApplication([MyService], data, tns=__name__) > > hth > burak but i guess the magic self.call_routes[method_name] statement is not of interest to users. i'm going to hide it so subclasses are less prone to errors, like so: def get_service(self, service, http_env): return service(http_env, self.__data) what do you think? burak From burak.arslan at arskom.com.tr Tue Aug 3 21:14:23 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 03 Aug 2010 22:14:23 +0300 Subject: [Soap-Python] multiple services with soaplib-0.9.1-alpha1 In-Reply-To: <4C58232B.6010308@unife.it> References: <4C57E109.3050509@arskom.com.tr> <4C57EAA1.9050501@unife.it> <4C57F9EA.2070103@arskom.com.tr> <4C57FE77.4000009@arskom.com.tr> <4C58232B.6010308@unife.it> Message-ID: <4C586A8F.6050103@arskom.com.tr> On 08/03/10 17:09, Luca Dariz wrote: > Hi Burak, > > thanks, subclassing the Application seems way better. > > However, passing service definitions to the Application will make the > methods descriptors to be generated at every request. I wonder if they > could be somehow keeped in the Application, since it's not something > that will vary between requests. what do you think about this? > you're right, it's in my todo list. > Btw, i think hiding the magic of self.call_routes is a good idea. > fixed in 0.9.1-alpha3. added a new method get_service_class that makes the self.call_routes lookup. best, burak From burak.arslan at arskom.com.tr Wed Aug 4 09:20:59 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Wed, 04 Aug 2010 10:20:59 +0300 Subject: [Soap-Python] multiple services with soaplib-0.9.1-alpha1 In-Reply-To: <4C586A8F.6050103@arskom.com.tr> References: <4C57E109.3050509@arskom.com.tr> <4C57EAA1.9050501@unife.it> <4C57F9EA.2070103@arskom.com.tr> <4C57FE77.4000009@arskom.com.tr> <4C58232B.6010308@unife.it> <4C586A8F.6050103@arskom.com.tr> Message-ID: <4C5914DB.8030609@arskom.com.tr> On 08/03/10 22:14, Burak Arslan wrote: > On 08/03/10 17:09, Luca Dariz wrote: >> Hi Burak, >> >> thanks, subclassing the Application seems way better. >> >> However, passing service definitions to the Application will make the >> methods descriptors to be generated at every request. I wonder if they >> could be somehow keeped in the Application, since it's not something >> that will vary between requests. what do you think about this? >> > you're right, it's in my todo list. > i've implemented method caching and released it in 0.9.1-alpha5. it seems to be working fine. best, burak From burak.arslan at arskom.com.tr Wed Aug 4 23:48:16 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 05 Aug 2010 00:48:16 +0300 Subject: [Soap-Python] soaplib-0.9.0 changes In-Reply-To: References: Message-ID: <4C59E020.1000809@arskom.com.tr> On 08/03/10 18:42, Bart Kelley wrote: > Burak, > > Lots of changes in the soaplib library soaplib-0.9.0_alpha4-py2.6. I > see. All the examples shown at > http://github.com/arskom/soaplib/tree/master/examples/ dated July 22, > 2010 show the use of a module named wsgi_soap (SimpleWSGIApp) but yet > the latest soaplib distribution does not include this file. I am in > need of updating proprietary code to interact with the new soaplib > distro but am having a hard time seeing how the new code is to work. > Is there a good place you could send me for examples on using the new > soaplib distro? Any help at all would be welcome. > hi bart, currently, there's only one person who's doing the majority of the work (me). i'm also on a deadline, so i can't spare much time for documentation. the example server that i'm making sure is working is the interopd. there are two versions: twisted version can serve static files as well: http://github.com/arskom/soaplib/tree/master/src/soaplib/test/interop/server/static.py i'm using it to test my soap client qxsoap (https://github.com/arskom/qxsoap) there's also a python wsgi version, which just serves the service. it's here: http://github.com/arskom/soaplib/tree/master/src/soaplib/test/interop/server/basic.py with 0.9.1-alpha3, i've merged work from Augusto Destrero (http://github.com/baxeico) that fixes examples/classerializer.py and examples/helloworld.py hth burak From ssoni at nextdigital.com Thu Aug 5 02:20:29 2010 From: ssoni at nextdigital.com (Sury Soni) Date: Thu, 5 Aug 2010 00:20:29 +0000 Subject: [Soap-Python] Interoperability problem between soaplib and MS .Net 3.5 SOAP Message-ID: <6CD03B2AA6AE4747BAF3A0D5EEEF7286072C03@exmbx01.corp.nextdigital.com> Hi All, I have recently joined the list to get answer to the question 'Interoperability problem between soaplib and MS .Net 3.5 SOAP'. Any recent updates? Regards, Sury From burak.arslan at arskom.com.tr Thu Aug 5 08:31:03 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 05 Aug 2010 09:31:03 +0300 Subject: [Soap-Python] Interoperability problem between soaplib and MS .Net 3.5 SOAP In-Reply-To: <6CD03B2AA6AE4747BAF3A0D5EEEF7286072C03@exmbx01.corp.nextdigital.com> References: <6CD03B2AA6AE4747BAF3A0D5EEEF7286072C03@exmbx01.corp.nextdigital.com> Message-ID: <4C5A5AA7.3090204@arskom.com.tr> On 08/05/10 03:20, Sury Soni wrote: > Hi All, > > I have recently joined the list to get answer to the question 'Interoperability problem between soaplib and MS .Net 3.5 SOAP'. > > Any recent updates? > hi sury, there's been a lot of work on soaplib in the past weeks and many issues were fixed. but i did not test soaplib against a .net client, nor got much feedback about it. there's a server specifically for interoperability tests between soaplib and other frameworks, which you can find here: http://github.com/arskom/soaplib/blob/master/src/soaplib/test/interop/server/ can you please provide sample xml, or better, a .net script that produces that xml, that doesn't work? best regards, burak From ssoni at nextdigital.com Thu Aug 5 09:43:19 2010 From: ssoni at nextdigital.com (Sury Soni) Date: Thu, 5 Aug 2010 07:43:19 +0000 Subject: [Soap-Python] Interoperability problem between soaplib and MS .Net 3.5 SOAP In-Reply-To: <4C5A5AA7.3090204@arskom.com.tr> References: <6CD03B2AA6AE4747BAF3A0D5EEEF7286072C03@exmbx01.corp.nextdigital.com> <4C5A5AA7.3090204@arskom.com.tr> Message-ID: <6CD03B2AA6AE4747BAF3A0D5EEEF7286072CF1@exmbx01.corp.nextdigital.com> > > Hi All, > > > > I have recently joined the list to get answer to the question > 'Interoperability problem between soaplib and MS .Net 3.5 SOAP'. > > > > Any recent updates? > > > > hi sury, > > there's been a lot of work on soaplib in the past weeks and many issues were > fixed. but i did not test soaplib against a .net client, nor got much feedback > about it. > > there's a server specifically for interoperability tests between soaplib and > other frameworks, which you can find here: > > http://github.com/arskom/soaplib/blob/master/src/soaplib/test/interop/se > rver/ > > can you please provide sample xml, or better, a .net script that produces that > xml, that doesn't work? > > best regards, > burak > Hi Burak, Thanks for the update. I usually test my python web service using WebService Studio (http://webservicestudio.codeplex.com/) I run static.py and basic.py, one at a time. For static.py wsdl url was http://localhost/app?wsdl And for basic.py wsdl url was http://localhost/?wsdl Above information was not readily available in docs, so it would be useful, if we put it somewhere. When I used WebService Studio to load the either wsdl url and generate proxy objects, it failed. So, you can use this tool to make wsdl inter-operable as well. I have also posted my question on stackoverflow with details on SOAPpy problem. http://stackoverflow.com/questions/3358792/is-python-good-for-writing-standard-compatible-and-complete-soap-web-services A small update for static.py. I am using twisted '8.2.0' which is little bit old, but could be useful. Replace: Line 46 resource = WSGIResource(reactor, reactor.getThreadPool(), application) To: resource = WSGIResource(reactor, reactor, application) Regards, Sury From burak.arslan at arskom.com.tr Thu Aug 5 10:14:13 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 05 Aug 2010 11:14:13 +0300 Subject: [Soap-Python] Interoperability problem between soaplib and MS .Net 3.5 SOAP In-Reply-To: <6CD03B2AA6AE4747BAF3A0D5EEEF7286072CF1@exmbx01.corp.nextdigital.com> References: <6CD03B2AA6AE4747BAF3A0D5EEEF7286072C03@exmbx01.corp.nextdigital.com> <4C5A5AA7.3090204@arskom.com.tr> <6CD03B2AA6AE4747BAF3A0D5EEEF7286072CF1@exmbx01.corp.nextdigital.com> Message-ID: <4C5A72D5.1090508@arskom.com.tr> On 08/05/10 10:43, Sury Soni wrote: >>> Hi All, >>> >>> I have recently joined the list to get answer to the question >> 'Interoperability problem between soaplib and MS .Net 3.5 SOAP'. >>> Any recent updates? >>> >> hi sury, >> >> there's been a lot of work on soaplib in the past weeks and many issues were >> fixed. but i did not test soaplib against a .net client, nor got much feedback >> about it. >> >> there's a server specifically for interoperability tests between soaplib and >> other frameworks, which you can find here: >> >> http://github.com/arskom/soaplib/blob/master/src/soaplib/test/interop/se >> rver/ >> >> can you please provide sample xml, or better, a .net script that produces that >> xml, that doesn't work? >> >> best regards, >> burak >> > Hi Burak, > > Thanks for the update. > > I usually test my python web service using WebService Studio (http://webservicestudio.codeplex.com/) > i don't prefer using such tools as they can't be scripted. > I run static.py and basic.py, one at a time. they expose the same services. static.py serves static files for testing javascript soap clients (namely, qxsoap) basic.py is for general soap testing. > For static.py wsdl url was http://localhost/app?wsdl > And for basic.py wsdl url was http://localhost/?wsdl > > Above information was not readily available in docs, so it would be useful, if we put it somewhere. fixed in trunk. > When I used WebService Studio to load the either wsdl url and generate proxy objects, it failed. > > So, you can use this tool to make wsdl inter-operable as well. > i don't have easy access to a windows box. i'd be glad if you'd (or someone else) provide a scriptable testing tool. > I have also posted my question on stackoverflow with details on SOAPpy problem. > > http://stackoverflow.com/questions/3358792/is-python-good-for-writing-standard-compatible-and-complete-soap-web-services > > A small update for static.py. > > I am using twisted '8.2.0' which is little bit old, but could be useful. > > Replace: Line 46 > resource = WSGIResource(reactor, reactor.getThreadPool(), application) > To: > resource = WSGIResource(reactor, reactor, application) > thanks for this, fixed in trunk. > Regards, > > Sury thanks for your time, best regards burak From luca.dariz at unife.it Thu Aug 5 13:37:31 2010 From: luca.dariz at unife.it (Luca Dariz) Date: Thu, 05 Aug 2010 13:37:31 +0200 Subject: [Soap-Python] Interoperability problem between soaplib and MS .Net 3.5 SOAP In-Reply-To: <4C5A72D5.1090508@arskom.com.tr> References: <6CD03B2AA6AE4747BAF3A0D5EEEF7286072C03@exmbx01.corp.nextdigital.com> <4C5A5AA7.3090204@arskom.com.tr> <6CD03B2AA6AE4747BAF3A0D5EEEF7286072CF1@exmbx01.corp.nextdigital.com> <4C5A72D5.1090508@arskom.com.tr> Message-ID: <4C5AA27B.60300@unife.it> >> I usually test my python web service using WebService Studio (http://webservicestudio.codeplex.com/) >> >> > i don't prefer using such tools as they can't be scripted. > The interoperability testing tools from ws-i (http://www.ws-i.org/deliverables/workinggroup.aspx?wg=testingtools) can be scripted, a config file should be written to test the wsdl. What do you think about using them? Hope it helps Luca From burak.arslan at arskom.com.tr Thu Aug 5 19:13:26 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Thu, 05 Aug 2010 20:13:26 +0300 Subject: [Soap-Python] Interoperability problem between soaplib and MS .Net 3.5 SOAP In-Reply-To: <4C5AA27B.60300@unife.it> References: <6CD03B2AA6AE4747BAF3A0D5EEEF7286072C03@exmbx01.corp.nextdigital.com> <4C5A5AA7.3090204@arskom.com.tr> <6CD03B2AA6AE4747BAF3A0D5EEEF7286072CF1@exmbx01.corp.nextdigital.com> <4C5A72D5.1090508@arskom.com.tr> <4C5AA27B.60300@unife.it> Message-ID: <4C5AF136.2050201@arskom.com.tr> On 08/05/10 14:37, Luca Dariz wrote: > >>> I usually test my python web service using WebService Studio >>> (http://webservicestudio.codeplex.com/) >>> >>> >> i don't prefer using such tools as they can't be scripted. >> > The interoperability testing tools from ws-i > (http://www.ws-i.org/deliverables/workinggroup.aspx?wg=testingtools) > can be scripted, a config file should be written to test the wsdl. > > What do you think about using them? hi luca, thanks for the pointer. i've looked at this file: http://www.ws-i.org/Testing/Tools/2005/06/WSI_Test_Java_Final_1.1.zip the documentation that comes with that package is around 150 pages. to be honest, i don't see the point of reading all that and getting this package up and running when a few hundred lines of simple testing code would suffice. it looks like an overkill to me for a one-man-army project the size of soaplib. of course, i'd be curious about how soaplib would perform on such a professionally prepared interop test, so if anybody is willing to publish results of this test, it'd be very interesting. best regards, burak From mclay at mjmoi.com Thu Aug 5 23:17:00 2010 From: mclay at mjmoi.com (Michael McLay) Date: Thu, 5 Aug 2010 17:17:00 -0400 Subject: [Soap-Python] Deleted branch on Github Message-ID: Deleting the archive also broke old links in soap at python.org mailing list archives, such as the links found in . If the deletion cannot be restore it would be helpful to at least put a redirect to the new repository in the page . Also, the launchpad.net page on soaplib doesn't point to the official soaplib website or download area. The git repository could be mirrored in a branch on launchpad using . On 27 July 2010 00:54, Jamie Kirkpatrick wrote: > Just so everyone knows: I've deleted my repository as Burak is now managing > the canonical repository and I wanted to avoid confusion for new users. On Tue Jul 27 03:00 2010 Martin Aspeli wrote: > http://pypi.python.org/pypi/soaplib/0.8.1 still points to this repos > as its home page, which now 404s. Maybe worth fixing? The .tar.gz > download still works, thankfully. From reingart at gmail.com Fri Aug 6 06:43:13 2010 From: reingart at gmail.com (Mariano Reingart) Date: Fri, 6 Aug 2010 01:43:13 -0300 Subject: [Soap-Python] web2py 1.82.1 released with PySimpleSoap v1.02a Message-ID: FYI Since current release (1.82.1), web2py includes "full-stack" support to expose and consume webservices using PySimpleSoap, complementing previous json and xml_rpc infrastructure with a similar (and simple) approach. Since last versions, PySimpleSoap 1.02a changes includes: * Improved WSDL Support (fixed some interoperability issues with .NET an JBoss WS) * Raw request/response enhancements (useful for xsd:anyType and custom/advanced operations) * More wiki documentation, including WSDL examples, basic compliance tests and generic benchmarks * Minor adjustments (unicode, namespace and faults detection, compatibility issues, soap1.1/1.2, etc.) * Code clean-up and some naming convention / API changes Although I did my best effort to test this library against other python solutions, that tests are not complete and in some cases serious issues were found with some libraries that prevent any further analysis (they are documented in the project site, feel free to contact me regarding this, especially if you encounter any mistake / have further testing scenarios, see bellow). A sample online testing service is exposed, just in case anyone wants help us doing his own tests: http://www.web2py.com.ar/webservices/sample/call/soap?WSDL A webpage containing the description and example xml messages can be found at: http://www.web2py.com.ar/webservices/sample/call/soap If other libraries have similar testing services, I'll be glad to test them with this solution and share the results. More information at: http://code.google.com/p/pysimplesoap Any advice is welcome, Best regards, Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com From ssoni at nextdigital.com Fri Aug 6 07:00:29 2010 From: ssoni at nextdigital.com (Sury Soni) Date: Fri, 6 Aug 2010 05:00:29 +0000 Subject: [Soap-Python] web2py 1.82.1 released with PySimpleSoap v1.02a In-Reply-To: References: Message-ID: <6CD03B2AA6AE4747BAF3A0D5EEEF7286072E7C@exmbx01.corp.nextdigital.com> > A sample online testing service is exposed, just in case anyone wants help us > doing his own tests: > http://www.web2py.com.ar/webservices/sample/call/soap?WSDL I used web service studio (http://webservicestudio.codeplex.com/) to quickly test its interoperability for .net and I think it failed. Can you have a quick look and fix it accordingly and can you add complex type returns interfaces as well? If it works for all using this tool, I believe it will work for .net and I will switch my code to yours. Thanks for providing API. -Sury From reingart at gmail.com Fri Aug 6 08:58:37 2010 From: reingart at gmail.com (Mariano Reingart) Date: Fri, 6 Aug 2010 03:58:37 -0300 Subject: [Soap-Python] web2py 1.82.1 released with PySimpleSoap v1.02a In-Reply-To: <6CD03B2AA6AE4747BAF3A0D5EEEF7286072E7C@exmbx01.corp.nextdigital.com> References: <6CD03B2AA6AE4747BAF3A0D5EEEF7286072E7C@exmbx01.corp.nextdigital.com> Message-ID: On Fri, Aug 6, 2010 at 2:00 AM, Sury Soni wrote: >> A sample online testing service is exposed, just in case anyone wants help us >> doing his own tests: >> http://www.web2py.com.ar/webservices/sample/call/soap?WSDL > > I used web service studio (http://webservicestudio.codeplex.com/) to quickly test its interoperability for .net and I think it failed. Yes, apparently .net wasn't parsing correctly the response returned values because of a minor bug with namespaces... > Can you have a quick look and fix it accordingly and can you add complex type returns interfaces as well? Fixed! Can you try again? I think it is working now, look at this screenshot: http://pysimplesoap.googlecode.com/files/net_ws_studio.png What do you mean when you say "complex type returns"? I've added a new example "Order", it isn't so trivial, to demonstrate how to use and return several types/sequences. You can easily represent any compound object using soap primitive types with this library (and new type support could be added too). If you need inheritance, abstract or custom xml types, you can use raw SimpleXMLElement messages, because this library uses a basic dict-based object representation that may not be enough in that cases. > If it works for all using this tool, I believe it will work for .net and I will switch my code to yours. > > Thanks for providing API. Thanks you for this report! Best regards, Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com From ssoni at nextdigital.com Fri Aug 6 09:05:03 2010 From: ssoni at nextdigital.com (Sury Soni) Date: Fri, 6 Aug 2010 07:05:03 +0000 Subject: [Soap-Python] web2py 1.82.1 released with PySimpleSoap v1.02a In-Reply-To: References: <6CD03B2AA6AE4747BAF3A0D5EEEF7286072E7C@exmbx01.corp.nextdigital.com> Message-ID: <6CD03B2AA6AE4747BAF3A0D5EEEF7286072EEA@exmbx01.corp.nextdigital.com> > >> A sample online testing service is exposed, just in case anyone wants > >> help us doing his own tests: > >> http://www.web2py.com.ar/webservices/sample/call/soap?WSDL > > > > I used web service studio (http://webservicestudio.codeplex.com/) to > quickly test its interoperability for .net and I think it failed. > > Yes, apparently .net wasn't parsing correctly the response returned values > because of a minor bug with namespaces... > > > Can you have a quick look and fix it accordingly and can you add complex > type returns interfaces as well? > > Fixed! Can you try again? > Wow! It's working. I will investigate it further now. Thanks for quick update. Regards, -Sury From luca.dariz at unife.it Fri Aug 6 12:25:00 2010 From: luca.dariz at unife.it (Luca Dariz) Date: Fri, 06 Aug 2010 12:25:00 +0200 Subject: [Soap-Python] WS-I Interoperability test Message-ID: <4C5BE2FC.1000508@unife.it> Hi, i tried soapui (http://www.soapui.org/) to perform the wsdl compliance test against the interop test, and it seems like the namespaces in the messages are broken. This patch fixes it: diff --git a/src/soaplib/service.py b/src/soaplib/service.py index 4b1e584..41f9c39 100644 --- a/src/soaplib/service.py +++ b/src/soaplib/service.py @@ -504,15 +504,17 @@ class DefinitionBase(object): in_part = etree.SubElement(in_message, '{%s}part' % soaplib.ns_wsdl) in_part.set('name', method.in_message.get_type_name()) - in_part.set('element', method.in_message.get_type_name()) + in_part.set('element', method.in_message.get_type_name_ns()) out_message = etree.SubElement(root, '{%s}message' % soaplib.ns_wsdl) out_message.set('name', method.out_message.get_type_name()) out_part = etree.SubElement(out_message, '{%s}part' % soaplib.ns_wsdl) out_part.set('name', method.out_message.get_type_name()) - out_part.set('element', '%s:%s' % (_pref_tns, - method.out_message.get_type_name())) + #out_part.set('element', '%s:%s' % (_pref_tns, + # method.out_message.get_type_name())) + out_part.set('element', method.out_message.get_type_name_ns()) + def add_bindings_for_methods(self, root, service_name, types, url, binding, cb_binding=None): ''' but i'm not sure about which namespace should be used, if get_type_name_ns() or _pref_ns. Anyway even with this patch the test still fails, but at least the messages are recognized correctly. I also noticed that the 4 services defined in the wsdl have the same name, that is the Application name, while i think they should have the Definition name. I can give more info/testing if needed. Regards Luca From burak.arslan at arskom.com.tr Fri Aug 6 17:54:47 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Fri, 06 Aug 2010 18:54:47 +0300 Subject: [Soap-Python] WS-I Interoperability test In-Reply-To: <4C5BE2FC.1000508@unife.it> References: <4C5BE2FC.1000508@unife.it> Message-ID: <4C5C3047.6080102@arskom.com.tr> On 08/06/10 13:25, Luca Dariz wrote: > Hi, > > i tried soapui (http://www.soapui.org/) to perform the wsdl compliance > test against the interop test, and it seems like the namespaces in the > messages are broken. This patch fixes it: hi luca, looking closer at the generated wsdl, i noticed that half of it was bogus :) i fixed a few things. can you try with the alpha8, just uploaded? here's the wsdl diff since this morning: http://github.com/arskom/soaplib/compare/b2e8270bac07e39efdee...master#diff-9 here's what happened at the last fix: http://github.com/arskom/soaplib/commit/aa5948aead1eced71065c3844e028299fdd356c5#diff-1 here's the history. http://github.com/arskom/soaplib/commits/master/src/soaplib/test/wsdl.xml best regards, burak From ben.lopatin at wellfireinteractive.com Sun Aug 8 17:36:58 2010 From: ben.lopatin at wellfireinteractive.com (Ben Lopatin) Date: Sun, 8 Aug 2010 11:36:58 -0400 Subject: [Soap-Python] Interoperability problem between soaplib and MS .Net 3.5 SOAP In-Reply-To: <4C5AF136.2050201@arskom.com.tr> References: <6CD03B2AA6AE4747BAF3A0D5EEEF7286072C03@exmbx01.corp.nextdigital.com> <4C5A5AA7.3090204@arskom.com.tr> <6CD03B2AA6AE4747BAF3A0D5EEEF7286072CF1@exmbx01.corp.nextdigital.com> <4C5A72D5.1090508@arskom.com.tr> <4C5AA27B.60300@unife.it> <4C5AF136.2050201@arskom.com.tr> Message-ID: Hi Burak, et al, I've been working a little bit with soaplib in its ongoing development stage lately, and am also dealing with .NET client compatibility issues. The problem appears to be that the .NET client is a) not applying the namespace to the operation and/or nesting the operation node within itself (e.g. because the message name and operation name are the same?). I've used suds, SoapUI, the SOAP testing generic client ( http://soapclient.com/soaptest.html) all successfully with the generated WSDL. However the eXtc WSDL Validator (http://validwsdl.com/) which is a .NET client fails. The former, suds, SoapUI, the generic client, all generate a request that looks like this: test While the eXtc WSDL Validator generated request looks like this: test I've been trying to compare the generated WSDL to that of a .NET service and have yet to pinpoint where the issue is. Hope this example is helpful to someone else though in figuring out what's going on. Ben On Thu, Aug 5, 2010 at 1:13 PM, Burak Arslan wrote: > On 08/05/10 14:37, Luca Dariz wrote: > > > >>> I usually test my python web service using WebService Studio > >>> (http://webservicestudio.codeplex.com/) > >>> > >>> > >> i don't prefer using such tools as they can't be scripted. > >> > > The interoperability testing tools from ws-i > > (http://www.ws-i.org/deliverables/workinggroup.aspx?wg=testingtools) > > can be scripted, a config file should be written to test the wsdl. > > > > What do you think about using them? > > hi luca, > > thanks for the pointer. i've looked at this file: > http://www.ws-i.org/Testing/Tools/2005/06/WSI_Test_Java_Final_1.1.zip > > the documentation that comes with that package is around 150 pages. to > be honest, i don't see the point of reading all that and getting this > package up and running when a few hundred lines of simple testing code > would suffice. it looks like an overkill to me for a one-man-army > project the size of soaplib. > > of course, i'd be curious about how soaplib would perform on such a > professionally prepared interop test, so if anybody is willing to > publish results of this test, it'd be very interesting. > > best regards, > burak > > > _______________________________________________ > Soap mailing list > Soap at python.org > http://mail.python.org/mailman/listinfo/soap > -- Ben Lopatin www.wellfireinteractive.com ben.lopatin at wellfireinteractive.com 571.482.8801 -------------- next part -------------- An HTML attachment was scrubbed... URL: From burak.arslan at arskom.com.tr Sun Aug 8 20:48:52 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Sun, 08 Aug 2010 21:48:52 +0300 Subject: [Soap-Python] Interoperability problem between soaplib and MS .Net 3.5 SOAP In-Reply-To: References: <6CD03B2AA6AE4747BAF3A0D5EEEF7286072C03@exmbx01.corp.nextdigital.com> <4C5A5AA7.3090204@arskom.com.tr> <6CD03B2AA6AE4747BAF3A0D5EEEF7286072CF1@exmbx01.corp.nextdigital.com> <4C5A72D5.1090508@arskom.com.tr> <4C5AA27B.60300@unife.it> <4C5AF136.2050201@arskom.com.tr> Message-ID: <4C5EFC14.4030207@arskom.com.tr> On 08/08/10 18:36, Ben Lopatin wrote: > While the eXtc WSDL Validator generated request looks like this: > > > > > > test > > > > > > I've been trying to compare the generated WSDL to that of a .NET > service and have yet to pinpoint where the issue is. Hope this example > is helpful to someone else though in figuring out what's going on. > > Hi Ben, This request looks indeed invalid to me. Can this request actually go through xml schema validation? is there a default namespace declaration further above the tree? thanks, burak From ben.lopatin at wellfireinteractive.com Sun Aug 8 21:29:45 2010 From: ben.lopatin at wellfireinteractive.com (Ben Lopatin) Date: Sun, 8 Aug 2010 15:29:45 -0400 Subject: [Soap-Python] Interoperability problem between soaplib and MS .Net 3.5 SOAP In-Reply-To: <4C5EFC14.4030207@arskom.com.tr> References: <6CD03B2AA6AE4747BAF3A0D5EEEF7286072C03@exmbx01.corp.nextdigital.com> <4C5A5AA7.3090204@arskom.com.tr> <6CD03B2AA6AE4747BAF3A0D5EEEF7286072CF1@exmbx01.corp.nextdigital.com> <4C5A72D5.1090508@arskom.com.tr> <4C5AA27B.60300@unife.it> <4C5AF136.2050201@arskom.com.tr> <4C5EFC14.4030207@arskom.com.tr> Message-ID: > > On Sun, Aug 8, 2010 at 2:48 PM, Burak Arslan wrote: On 08/08/10 18:36, Ben Lopatin wrote: > > While the eXtc WSDL Validator generated request looks like this: > > > > > > > > > > > > test > > > > > > > > > > > > I've been trying to compare the generated WSDL to that of a .NET > > service and have yet to pinpoint where the issue is. Hope this example > > is helpful to someone else though in figuring out what's going on. > > > > > > Hi Ben, > > This request looks indeed invalid to me. Can this request actually go > through xml schema validation? is there a default namespace declaration > further above the tree? > > thanks, > burak > > Hi Burak, No, it's not validating the schema. The service returns this fault string in response to the request: :1:0:ERROR:SCHEMASV:SCHEMAV_CVC_ELT_1: Element 'SHL_SubmitAssessmentResult': > No matching global declaration available for the validation root. The namespace declaration in the request is: xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:plink=' > http://schemas.xmlsoap.org/ws/2003/05/partner-link/' xmlns:s0=' > http://mynamespace' xmlns:s12enc='http://www.w3.org/2003/05/soap-encoding/' > xmlns:s12env='http://www.w3.org/2003/05/soap-envelope/' xmlns:senc=' > http://schemas.xmlsoap.org/soap/encoding/' xmlns:senv=' > http://schemas.xmlsoap.org/soap/envelope/' xmlns:wsa=' > http://schemas.xmlsoap.org/ws/2003/03/addressing' xmlns:wsdl=' > http://schemas.xmlsoap.org/wsdl/' xmlns:xop=' > http://www.w3.org/2004/08/xop/include' xmlns:xs=' > http://www.w3.org/2001/XMLSchema' xmlns:xsi=' > http://www.w3.org/2001/XMLSchema-instance'> Every other client I've tested picks up the s0='http://mynamespace' save for this client. I've tried manually editing the WSDL output to try out different settings to see what might work to no avail so far. Ben -------------- next part -------------- An HTML attachment was scrubbed... URL: From burak.arslan at arskom.com.tr Mon Aug 9 08:11:26 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Mon, 09 Aug 2010 09:11:26 +0300 Subject: [Soap-Python] [qooxdoo-devel] announcing soaplib-0.9.2 and qxsoap-0.6.1 series In-Reply-To: <4C59E2E7.2050309@arskom.com.tr> References: <4C59E2E7.2050309@arskom.com.tr> Message-ID: <4C5F9C0E.1090506@arskom.com.tr> Hi, Thanks everyone for your encouraging words. I'm releasing qxsoap-0.6.1-beta1, the js client for qooxdoo, along with soaplib 0.9.2-alpha2, which implement (single) inheritance, and some more minore changes. With this release, you'll be able to communicate complex class hierarchies between your server code and qooxdoo. you can download qxsoap from the qooxdoo-contrib repository, or here: http://github.com/arskom/qxsoap/downloads you can download soaplib from pypi via easy_install or from http://pypi.python.org/soaplib, or http://github.com/arskom/soaplib/downloads I hope you find them useful. Best regards, Burak From luca.dariz at unife.it Mon Aug 9 08:25:53 2010 From: luca.dariz at unife.it (Luca Dariz) Date: Mon, 09 Aug 2010 08:25:53 +0200 Subject: [Soap-Python] WS-I Interoperability test In-Reply-To: <4C5C3047.6080102@arskom.com.tr> References: <4C5BE2FC.1000508@unife.it> <4C5C3047.6080102@arskom.com.tr> Message-ID: <4C5F9F71.5050203@unife.it> > looking closer at the generated wsdl, i noticed that half of it was > bogus :) i fixed a few things. can you try with the alpha8, just uploaded Hi burak, i just tried with 0.9.2-alpha2 but the error message is the following: Failure Message WSDL definition does not conform to the schema located at http://schemas.xmlsoap.org/wsdl/soap/2003-02-11.xsd for some element using the WSDL-SOAP binding namespace, or does not conform to the schema located at http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd for some element using the WSDL namespace. Failure Detail Message Exception: org.xml.sax.SAXException: Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plink:partnerLinkType'. One of '{"http://schemas.xmlsoap.org/wsdl/":import, "http://schemas.xmlsoap.org/wsdl/":types, "http://schemas.xmlsoap.org/wsdl/":message, "http://schemas.xmlsoap.org/wsdl/":portType, "http://schemas.xmlsoap.org/wsdl/":binding, "http://schemas.xmlsoap.org/wsdl/":service}' is expected. at org.wsi.xml.XMLUtils$ErrHandler.error(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.wsi.xml.jaxp.DocumentBuilderImpl.parse(Unknown Source) at org.wsi.xml.XMLUtils.parseXML(Unknown Source) at org.wsi.xml.XMLUtils.parseXMLDocument(Unknown Source) at org.wsi.test.profile.validator.impl.wsdl.BP2703.validate(Unknown Source) at org.wsi.test.profile.validator.impl.BaseValidatorImpl.processAssertions(Unknown Source) at org.wsi.test.profile.validator.impl.wsdl.WSDLValidatorImpl.processDefinitionAssertions(Unknown Source) at org.wsi.test.profile.validator.impl.wsdl.WSDLValidatorImpl.validate(Unknown Source) at org.wsi.test.analyzer.BasicProfileAnalyzer.validateWSDL(Unknown Source) at org.wsi.test.analyzer.BasicProfileAnalyzer.validateConformance(Unknown Source) at org.wsi.test.analyzer.BasicProfileAnalyzer.main(Unknown Source) Element Location: lineNumber=2 Luca From luca.dariz at unife.it Mon Aug 9 12:06:39 2010 From: luca.dariz at unife.it (Luca Dariz) Date: Mon, 09 Aug 2010 12:06:39 +0200 Subject: [Soap-Python] WS-I Interoperability test In-Reply-To: <4C5F9F71.5050203@unife.it> References: <4C5BE2FC.1000508@unife.it> <4C5C3047.6080102@arskom.com.tr> <4C5F9F71.5050203@unife.it> Message-ID: <4C5FD32F.2060506@unife.it> On 09/08/2010 08:25, Luca Dariz wrote: > >> looking closer at the generated wsdl, i noticed that half of it was >> bogus :) i fixed a few things. can you try with the alpha8, just >> uploaded > Hi burak, > > i just tried with 0.9.2-alpha2 but the error message is the following: > I managed to write a simple script that runs the test and prints the failure message, if there is one Hope it helps Luca -------------- next part -------------- A non-text attachment was scrubbed... Name: test-ws-i.py Type: text/x-python Size: 5648 bytes Desc: not available URL: From burak.arslan at arskom.com.tr Mon Aug 9 18:05:33 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Mon, 09 Aug 2010 19:05:33 +0300 Subject: [Soap-Python] soaplib In-Reply-To: References: Message-ID: <1281369933.9547.5.camel@Nokia-N900> ----- Original message ----- > Although the > installation process completed without any issues, python can't find the > wsgi_soap module in the library. > > from soaplib.wsgi_soap import SimpleWSGISoapApp > > ImportError: No module named wsgi_soap > > hi roman, you probably installed the latest soaplib. soaplib-0.9 series breaks compatibility with 0.8 api. in your case, there's no wsgi_soap module anymore. you should either install a 0.8.x release or migrate your code to the new api. hth, burak -------------- next part -------------- An HTML attachment was scrubbed... URL: From burak.arslan at arskom.com.tr Tue Aug 10 23:14:58 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Wed, 11 Aug 2010 00:14:58 +0300 Subject: [Soap-Python] WS-I Interoperability test In-Reply-To: <4C5FD32F.2060506@unife.it> References: <4C5BE2FC.1000508@unife.it> <4C5C3047.6080102@arskom.com.tr> <4C5F9F71.5050203@unife.it> <4C5FD32F.2060506@unife.it> Message-ID: <4C61C152.9050107@arskom.com.tr> On 08/09/10 13:06, Luca Dariz wrote: > On 09/08/2010 08:25, Luca Dariz wrote: >> >>> looking closer at the generated wsdl, i noticed that half of it was >>> bogus :) i fixed a few things. can you try with the alpha8, just >>> uploaded >> Hi burak, >> >> i just tried with 0.9.2-alpha2 but the error message is the following: >> > > I managed to write a simple script that runs the test and prints the > failure message, if there is one > Hope it helps > Luca > hi luca, great work, thanks. i added your script to the repository, but i don't think i'll be able to spend time on this in the coming weeks. patches are welcome. best regards, burak fyi, here's the error i'm getting: FAILURE in test BP2703 WSDL definition does not conform to the schema located at http://schemas.xmlsoap.org/wsdl/soap/2003-02-11.xsd for some element using the WSDL-SOAP binding namespace, or does not conform to the schema located at http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd for some element using the WSDL namespace. FAILURE MSG Exception: org.xml.sax.SAXException: Error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'plink:partnerLinkType'. One of '{"http://schemas.xmlsoap.org/wsdl/":import, "http://schemas.xmlsoap.org/wsdl/":types, "http://schemas.xmlsoap.org/wsdl/":message, "http://schemas.xmlsoap.org/wsdl/":portType, "http://schemas.xmlsoap.org/wsdl/":binding, "http://schemas.xmlsoap.org/wsdl/":service}' is expected. From luca.dariz at unife.it Mon Aug 16 11:29:37 2010 From: luca.dariz at unife.it (Luca Dariz) Date: Mon, 16 Aug 2010 11:29:37 +0200 Subject: [Soap-Python] Array and max_occurs Message-ID: <4C690501.9090408@unife.it> Hi, i am a bit confised about array serialization in soaplib. One usually defines an array with @rpc(Array(String)) def echo(self, s) that requires an envelope like s a r but one could also write @rpc(String(min_occurs=1, max_occurs=10)) def echo(self, s) that would need s a r but the latter will not work since only the last value found in the envelope is passed to the method; I attach a little patch that tries to fix it. However in the two cases the envelope is different, and i think the envelope resulting from the second approach is simpler and maybe more compatible with different clients. What do you think is the best way to serialize arrays? Luca -------------- next part -------------- A non-text attachment was scrubbed... Name: max_occurs.patch Type: text/x-patch Size: 1516 bytes Desc: not available URL: From luca.dariz at unife.it Mon Aug 16 15:28:19 2010 From: luca.dariz at unife.it (Luca Dariz) Date: Mon, 16 Aug 2010 15:28:19 +0200 Subject: [Soap-Python] Fwd: Array and max_occurs In-Reply-To: <1281957334.2869.12.camel@Nokia-N900> References: <4C690501.9090408@unife.it> <1281957334.2869.12.camel@Nokia-N900> Message-ID: ---------- Forwarded message ---------- From: Burak Arslan Date: 2010/8/16 Subject: Re: [Soap-Python] Array and max_occurs To: Luca Dariz ----- Original message ----- > Hi, > > i am a bit confised about array serialization in soaplib. > > One usually defines an array with > > @rpc(Array(String)) > def echo(self, s) > > that requires an envelope like > > xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> > > > > > s > a > r > > > > > > > but one could also write > > @rpc(String(min_occurs=1, max_occurs=10)) > def echo(self, s) > > that would need > > xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> > > > > s > a > r > > > > > > but the latter will not work since only the last value found in the > envelope is passed to the method; I attach a little patch that tries to > fix it. > > However in the two cases the envelope is different, and i think the > envelope resulting from the second approach is simpler and maybe more > compatible with different clients. > > What do you think is the best way to serialize arrays? > > Luca hi luca, from a theoretical perspective, i think the two methods work perfectly and there's no real difference between them. and as it's possible to use both, i think we should keep both methods as a possibility. but, wsdl spec has an array type already defined and any array-ish type SHOULD (or MUST, don't remember the exact word) inherit from that. maybe that can be implemented to improve array support in soaplib. best regards burak -------------- next part -------------- An HTML attachment was scrubbed... URL: From burak.arslan at arskom.com.tr Wed Aug 25 21:33:44 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Wed, 25 Aug 2010 22:33:44 +0300 Subject: [Soap-Python] ANN: soaplib-0.9.3-alpha3 Message-ID: <4C757018.6050605@arskom.com.tr> hi, newest soaplib comes with soap header support, along with a number of bugfixes. i moved the tests to a multiple namespace setting. most of the suds tests are failing. help is welcome. best, burak From minh_luu at toll.com.au Mon Aug 30 07:32:15 2010 From: minh_luu at toll.com.au (Minh Luu) Date: Mon, 30 Aug 2010 15:32:15 +1000 Subject: [Soap-Python] List of objects Message-ID: Hi, I am new to soaplib. I would like to setup a service that would accept the following XML Allan MR Julie MS I have try this but it didn't work. I get the error of 'NoneType object has no attribute from_xml class Contact(ClassSerializer): class types: name = String title = String class Contacts(ClassSerializer): class types: contact = Array(Contact) Thanks, From burak.arslan at arskom.com.tr Mon Aug 30 21:07:03 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Mon, 30 Aug 2010 22:07:03 +0300 Subject: [Soap-Python] List of objects In-Reply-To: References: Message-ID: <4C7C0157.7040103@arskom.com.tr> On 08/30/10 08:32, Minh Luu wrote: > Hi, > > I am new to soaplib. I would like to setup a service that would accept the following XML > > > > Allan > MR > > > Julie > MS > > > > I have try this but it didn't work. I get the error of 'NoneType object has no attribute from_xml > > class Contact(ClassSerializer): > class types: > name = String > title = String > > class Contacts(ClassSerializer): > class types: > contact = Array(Contact) > > what version of soaplib is it? the sample xml does not contain a method call, nor namespace qualifications. soaplib won't accept that *exact* message inside a soap envelope. you need to define some methods. here's what i'd do (with 0.9.x, minus imports) class Contact(ClassSerializer): name = String title = String class Contacts(ClassSerializer): contact = Array(Contact) class ServiceDefinition(soaplib.service.DefinitionBase): @rpc(_returns=Array(Contact)) def get_contacts(self) c1 = Contact() c1.name = 'punk' c1.title = 'ceo' c2 = Contact() c2.name = 'nerd' c2.title = 'cto' return [c1,c2] look here for an example about what to do with that service: http://github.com/arskom/soaplib/blob/master/examples/helloworld.py hth burak From destrero at imavis.com Tue Aug 31 15:35:00 2010 From: destrero at imavis.com (Augusto Destrero) Date: Tue, 31 Aug 2010 15:35:00 +0200 Subject: [Soap-Python] anyURI type in soaplib Message-ID: <201008311535.01055.destrero@imavis.com> Hi, I've to write a soap method which returns an anyURI type (http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#anyURI). Is it possible with soaplib? I've to write a new serializer for that type? Can you give me some pointers on how to develop this? I've forked http://github.com/arskom/soaplib in http://github.com/baxeico/soaplib and I'm willing to give a little contribution to soaplib, if appreciated. Thank you very much for your help. -- Augusto Destrero, PhD From burak.arslan at arskom.com.tr Tue Aug 31 16:18:56 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 31 Aug 2010 17:18:56 +0300 Subject: [Soap-Python] anyURI type in soaplib In-Reply-To: <201008311535.01055.destrero@imavis.com> References: <201008311535.01055.destrero@imavis.com> Message-ID: <4C7D0F50.2070507@arskom.com.tr> On 08/31/10 16:35, Augusto Destrero wrote: > Hi, > I've to write a soap method which returns an anyURI type > (http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#anyURI). > > Is it possible with soaplib? I've to write a new serializer for that type? Can > you give me some pointers on how to develop this? > > I've forked http://github.com/arskom/soaplib > in http://github.com/baxeico/soaplib and I'm willing to give a little > contribution to soaplib, if appreciated. > > Thank you very much for your help. > Hello Augusto, Why wouldn't the String type fit your purposes, you need extra validation? I could be wrong but I think that's all you need to do: (in primitive.py) class AnyUri(String): __type_name__ = 'anyURI' best, burak From minh_luu at toll.com.au Mon Aug 30 23:53:33 2010 From: minh_luu at toll.com.au (Minh Luu) Date: Tue, 31 Aug 2010 07:53:33 +1000 Subject: [Soap-Python] List of objects In-Reply-To: <4C7C0157.7040103@arskom.com.tr> Message-ID: Thanks for the reply. I tried to use the version 0.9.x but it doesn't seem to work with twisted, so I am now using version 0.8.1. The problem I have is that the client has already been written by a thirdparty, and I need to write the server side to match the client request. The *extact* incoming message is like this: .... Allan MR Julie MS My soap method is: class SOAPService(SimpleWSGISoapApp): @soapmethod(Despatch, _return=String) def DeliveryMsg(self, Despatch): ... return "message received" The problem I have is there are multiple contact entries in contacts. Using Array(Contact) doesn't work because the incoming message doesn't have an array tag around the contact. Can I use the Any class like, Contacts = Any, and handle the xml within my app. If so, how can I get the xml value of the Contacts? THANK AGAIN FOR YOUR HELP. -----Original Message----- From: soap-bounces+minhl=toll.com.au at python.org [mailto:soap-bounces+minhl=toll.com.au at python.org] On Behalf Of Burak Arslan Sent: Tuesday, 31 August 2010 5:07 AM To: soap at python.org Subject: Re: [Soap-Python] List of objects On 08/30/10 08:32, Minh Luu wrote: > Hi, > > I am new to soaplib. I would like to setup a service that would accept the following XML > > > > Allan > MR > > > Julie > MS > > > > I have try this but it didn't work. I get the error of 'NoneType object has no attribute from_xml > > class Contact(ClassSerializer): > class types: > name = String > title = String > > class Contacts(ClassSerializer): > class types: > contact = Array(Contact) > > what version of soaplib is it? the sample xml does not contain a method call, nor namespace qualifications. soaplib won't accept that *exact* message inside a soap envelope. you need to define some methods. here's what i'd do (with 0.9.x, minus imports) class Contact(ClassSerializer): name = String title = String class Contacts(ClassSerializer): contact = Array(Contact) class ServiceDefinition(soaplib.service.DefinitionBase): @rpc(_returns=Array(Contact)) def get_contacts(self) c1 = Contact() c1.name = 'punk' c1.title = 'ceo' c2 = Contact() c2.name = 'nerd' c2.title = 'cto' return [c1,c2] look here for an example about what to do with that service: http://github.com/arskom/soaplib/blob/master/examples/helloworld.py hth burak _______________________________________________ Soap mailing list Soap at python.org http://mail.python.org/mailman/listinfo/soap From bradallen137 at gmail.com Tue Aug 31 18:23:44 2010 From: bradallen137 at gmail.com (Brad Allen) Date: Tue, 31 Aug 2010 11:23:44 -0500 Subject: [Soap-Python] The Python SOAP community: past, present, future In-Reply-To: <20100305155202.APM48614@ms1.mc.surewest.net> References: <4957f1ef1003010234t9b8246ct975035ab09252252@mail.gmail.com> <23523839.56171267451044795.JavaMail.root@mail.corp> <57b32ba81003010646k7165d35fo391a53b6b5b74954@mail.gmail.com> <4957f1ef1003010745j5f84479g7129cf0ed93e6aec@mail.gmail.com> <20100305155202.APM48614@ms1.mc.surewest.net> Message-ID: I ran across this StackOverflow discussion which was mostly asking about SOAP clients; I updated it to mention that soaplib is deprecating the client in favor of suds (right?). http://stackoverflow.com/questions/206154/whats-the-best-soap-client-library-for-python-and-where-is-the-documentation-fo From burak.arslan at arskom.com.tr Tue Aug 31 22:26:10 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Tue, 31 Aug 2010 23:26:10 +0300 Subject: [Soap-Python] The Python SOAP community: past, present, future In-Reply-To: References: <4957f1ef1003010234t9b8246ct975035ab09252252@mail.gmail.com> <23523839.56171267451044795.JavaMail.root@mail.corp> <57b32ba81003010646k7165d35fo391a53b6b5b74954@mail.gmail.com> <4957f1ef1003010745j5f84479g7129cf0ed93e6aec@mail.gmail.com> <20100305155202.APM48614@ms1.mc.surewest.net> Message-ID: <4C7D6562.9010507@arskom.com.tr> On 08/31/10 19:23, Brad Allen wrote: > I ran across this StackOverflow discussion which was mostly asking > about SOAP clients; I updated it to mention that soaplib is > deprecating the client in favor of suds (right?). > > http://stackoverflow.com/questions/206154/whats-the-best-soap-client-library-for-python-and-where-is-the-documentation-fo right, i do not plan to work on a python soap client in the short term. but that's because suds is enough for my needs for the moment. that being said, it's not hard to add a non-wsdl-parsing soap client to soaplib. if anybody needs the speed of lxml in a soap client and is willing to port the old client to 0.9 api, (and fix callbacks while doing that) i would include it in the source distribution. burak From venable.devin at gmail.com Tue Aug 31 22:39:45 2010 From: venable.devin at gmail.com (Devin Venable) Date: Tue, 31 Aug 2010 15:39:45 -0500 Subject: [Soap-Python] wsdl to python soap bindings Message-ID: I've been playing with soaplib and suds and like them both. Unfortunately, suds does not appear to be something I can use as a soap server. Here's the situation. I have a rather large and ugly wsdl file that was sent to me by a 3rd party who was responsible for defining an interface between our two systems. I'm trying to find the best library for implementing the Soap service in Python, probably as a WSDL plugin under Apache. The suds approach seems to be define the functions, and the WSDL is generated for you that describes the interfaces. I need to go the other way---take the WSDL and generate python bindings that will be used. Oh, and I'd like to use the bindings in my soaplib-based server. Any tips? -------------- next part -------------- An HTML attachment was scrubbed... URL: From burak.arslan at arskom.com.tr Tue Aug 31 23:16:48 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Wed, 01 Sep 2010 00:16:48 +0300 Subject: [Soap-Python] WSGI requirement for soaplib 0.9 In-Reply-To: References: Message-ID: <4C7D7140.5020603@arskom.com.tr> On 08/31/10 19:05, Brad Allen wrote: > Burak, > > At ZeOmega we use soaplib within Zope 2, which only recently added > WSGI support with version 2.13. We are still running 2.11 and 2.12 and > may not be migrating to 2.13 anytime soon. > > One of our developers, Kader, has reported to me that soaplib 0.9 now > requires WSGI. We are preparing to do a lot of new SOAP development > and it would make sense to define our web serializer classes using the > new 0.9 approach (so we don't have to refactor those classes later). > > I have not had a chance to dig into the soaplib code to see what > changed in 0.9, and see how difficult it would be to allow non-WSGI > requests. Do you see that as a requirement which could be backed out > for 0.9? > > Thanks! hi again, i thought wsgi standard was old enough to be universal in python http world. apparently i was wrong. yes, the wsgi.Application class is an integral part of a soaplib service. two suggestions: 1) emulate the wsgi call. 2) patch soaplib to separate the the logic that uses req_env and start_response from the wsgi.Application. i think it'd be few days of work. best regards, burak From burak.arslan at arskom.com.tr Tue Aug 31 23:17:00 2010 From: burak.arslan at arskom.com.tr (Burak Arslan) Date: Wed, 01 Sep 2010 00:17:00 +0300 Subject: [Soap-Python] wsdl to python soap bindings In-Reply-To: References: Message-ID: <4C7D714C.5000400@arskom.com.tr> On 08/31/10 23:39, Devin Venable wrote: > I've been playing with soaplib and suds and like them both. > Unfortunately, suds does not appear to be something I can use as a > soap server. > you're right, it isn't a soap server, it's just a client. > Here's the situation. I have a rather large and ugly wsdl file that > was sent to me by a 3rd party who was responsible for defining an > interface between our two systems. I'm trying to find the best > library for implementing the Soap service in Python, probably as a > WSDL plugin under Apache. > > The suds approach seems to be define the functions, and the WSDL is > generated for you that describes the interfaces. I need to go the > other way---take the WSDL and generate python bindings that will be used. > i think you mean the *soaplib* approach. anyway, soaplib can't do that. you should either do it manually or write a new wsdl parser, or modify suds' parser to generate soaplib code. if you decide to write a wsdl parser from scratch, i recommend to use the output from lxml.objectify. it does half the work. burak