Parsing soap result

Burak Arslan burak.arslan at arskom.com.tr
Thu Apr 18 06:55:26 EDT 2013


Hi,

On 04/18/13 13:46, Ombongi Moraa Fe wrote:
> Hi Burak, Team,
>

Apparently I was too deep in answering support questions for my company 
:) This is python-list, so It's just me here :)

> Your solution worked perfectly thanks.
>
> Could you share the logic of this solution?
>

You're using suds. Let's have a look at what you see:

[(DeliveryInformation){
    address = "254727"
    deliveryStatus = "DeliveredToNetwork"
  }]

You have it in square brackets, so it's an array. You apparently want 
the first element, so it's result[0]. It's of type DeliveryInformation 
with two fields, they are what you see there. Depending on the which 
soap mode (rpc/document) your server uses, you should either use 
result[0].deliveryStatus or result[0].DeliveryInformation.deliveryStatus.

I guess I got too much experience doing SOAP with python :) (I maintain 
spyne, see: http://spyne.io)

I'm glad it worked.

Best,
Burak

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130418/323a6451/attachment.html>


More information about the Python-list mailing list