From piet at vanoostrum.org Fri Aug 9 22:21:21 2013 From: piet at vanoostrum.org (Piet van Oostrum) Date: Fri, 9 Aug 2013 16:21:21 -0400 Subject: [Soap-Python] Convert SOAP response (ArrayOfInt) to Python list In-Reply-To: <51D5D134.6020506@bioprocess.org> References: <51D5D134.6020506@bioprocess.org> Message-ID: <20997.20289.58335.215440@cochabamba.vanoostrum.org> Robert Winkler wrote: > Thanks to the OSA library, which works for SOAP requests with Python 3.x, I can now use SOAP > services at http://www.chemspider.com. > > The result is a list of accession numbers (which correspond to chemical compounds) and I get them > in the following format: > > (ArrayOfInt){ > int[] = [ > 5744, > 69182, > 292, > 68027, > 3404131, > 82616, > 18280, > 11200, > 704646, > 543430 > ... > ] > } > > How could I transform this to a simple python list? > > [5744, 69182, 292,68027, 3404131, 82616, 18280, 11200, 704646, 543430 ...] > > Conversion to a numpy array (and subsequent list(), or similar) does not solve the problem, since > the structure is maintained; the numpy.shape returns (). > > Suggestions? If result is the return value then result.int will give you the list. -- Piet van Oostrum WWW: http://pietvanoostrum.com/ PGP key: [8DAE142BE17999C4] From steve.max88 at yahoo.com Fri Aug 23 20:59:28 2013 From: steve.max88 at yahoo.com (Steve Max) Date: Fri, 23 Aug 2013 11:59:28 -0700 (PDT) Subject: [Soap-Python] How to pass anyType data in Suds? Message-ID: <1377284368.20988.YahooMailNeo@web161803.mail.bf1.yahoo.com> I have tried searching the web all over the place, but could not find the help I need. Appreciate any help from you. ? I have this SOAP function definition (provided by Suds): ? getSomething(xs:anyType[] accessions) ? I tried to call it like this: ? result = client.service.getSomething([?string1?, ?string2?]) ? Get this fault: ? suds.WebFault: Server raised fault: 'com.xyz.VolumeManagerException: java.lan g.ClassCastException: org.apache.xerces.dom.ElementNSImpl cannot be cast to java .lang.String' ? I think I am not provide the data for anyType correctly. The Web Services API does expect an array of strings. ? Thanks a million. Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: From social.riyad at gmail.com Thu Aug 29 15:52:02 2013 From: social.riyad at gmail.com (Riyad Parvez) Date: Thu, 29 Aug 2013 19:52:02 +0600 Subject: [Soap-Python] Developing SOAP service Message-ID: Hi, I'm a new developer trying to develop SOAP. I've found spyne http://spyne.io/. But I've no idea how to start with spyne to develop SOAP service. Can someone point me to a tutorial for beginners? Regards, Riyad Parvez -------------- next part -------------- An HTML attachment was scrubbed... URL: