Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'skip:[ 20': 0.04; 'see:': 0.07; 'soap': 0.07; 'answering': 0.09; 'logic': 0.09; 'worked.': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'array.': 0.16; 'brackets,': 0.16; 'burak': 0.16; 'element,': 0.16; 'from:addr:arskom.com.tr': 0.16; 'from:addr:burak.arslan': 0.16; 'from:name:burak arslan': 0.16; 'message-id:@arskom.com.tr': 0.16; 'python-list,': 0.16; 'received:arskomhosting.com': 0.16; 'uses,': 0.16; 'wrote:': 0.18; 'thanks.': 0.20; 'team,': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'skip:" 20': 0.27; 'header:In-Reply-To:1': 0.27; 'mode': 0.30; "i'm": 0.30; 'apparently': 0.31; 'there.': 0.32; 'worked': 0.33; 'guess': 0.33; 'could': 0.34; 'doing': 0.36; 'hi,': 0.36; 'should': 0.36; 'too': 0.37; 'two': 0.37; 'server': 0.38; 'either': 0.39; 'company': 0.60; "you're": 0.61; 'first': 0.61; 'address': 0.63; 'to:addr:gmail.com': 0.65; 'here': 0.66; 'skip:r 40': 0.68; 'square': 0.74; 'glad': 0.83; 'fields,': 0.84 Date: Thu, 18 Apr 2013 13:55:26 +0300 From: Burak Arslan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130410 Thunderbird/17.0.5 MIME-Version: 1.0 To: Ombongi Moraa Fe Subject: Re: Parsing soap result References: <516F16FE.4080900@arskom.com.tr> In-Reply-To: Content-Type: multipart/alternative; boundary="------------050503080400000900010008" Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 115 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1366282526 news.xs4all.nl 2277 [2001:888:2000:d::a6]:54041 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43818 This is a multi-part message in MIME format. --------------050503080400000900010008 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------050503080400000900010008 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit

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

--------------050503080400000900010008--