Unless your xml is very simple, you should not guess at the e4x expession, but rather work your way to the node you want by using temporary variables and tracing the results as you go.
To do this you must use a resultHandler, and do not use lastResult. Start with something like: private function handleResult(event:ResultEvent):void var xmlResult:XML = XML(event.result) trace(xmlResult.toXMLString()); //CRITICAL step, verify your structure Then get the next node in the path you want, trace again, etc. Tracy Spratt Lariat Services Flex development bandwidth available ________________________________ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of m_ollman Sent: Wednesday, February 18, 2009 4:23 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: parse SOAP response for values Tracy :-) Thought about the namespace issue - some examples where talking about the SOAP Header being removed automatically, I was'nt seeing that. The reult format is E4X. However I could not get into the structure using childNode etc. So I would start by defining the namespace it. <SOAP-ENV... typ="http://ruleburst.com/ruleserver/9.1/rulebase/types <http://ruleburst.com/ruleserver/9.1/rulebase/types> in AS public var typ:Namespace = new Namespace("http://ruleburst.com/ruleserver/9.1/rulebase/types <http://ruleburst.com/ruleserver/9.1/rulebase/types> "); Next step I'm not sure about the path to the attribute. WS.Assess.lastResult.typ::session-data.global.global_1.abc570. WS.Assess.lastResult.typ::assess-response.session-data.list-entity.entit y.abc570 Will test in the morning when back at desk. Rushed out so fast I left my USB! doh Cheers martin --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Tracy Spratt" <tspr...@...> wrote: > > One big hassle with SOAP is the namespaces. Once you get that straight, > you can use normal e4x expressions on it. > > > > Where are you having difficulty? > > > > Tracy Spratt > Lariat Services > > Flex development bandwidth available > > ________________________________ > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of m_ollman > Sent: Wednesday, February 18, 2009 12:38 AM > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] parse SOAP response for values > > > > I have been looking around for a few hours - Flex Cookbook has some > info about mapping types. But no real method of getting into the > structure. > > I need to grab the value of an attribute - abc570, which will be EOPO > + 4 other attributes. > > <SOAP-ENV:Envelope > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> > <http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> > " > > xmlns:typ="http://ruleburst.com/ruleserver/9.1/rulebase/types <http://ruleburst.com/ruleserver/9.1/rulebase/types> > <http://ruleburst.com/ruleserver/9.1/rulebase/types <http://ruleburst.com/ruleserver/9.1/rulebase/types> > "> > <SOAP-ENV:Header/> > <SOAP-ENV:Body> > <typ:assess-response> > <typ:session-data> > <typ:list-entity entity-type="global"> > <typ:entity id="global_1"> > > <typ:attribute id="abc570" inferencing-type="intermediate" type="text"> > <typ:text-val>EOPO</typ:text-val> > </typ:attribute> > > ** ETC - 4 more vales ** > > </typ:entity> > </typ:list-entity> > </typ:session-data> > </typ:assess-response> > </SOAP-ENV:Body> > </SOAP-ENV:Envelope> > > Handler is > > private function RBcompleteHandler(event:Event) : void > { > > var dataXML:XML = XML(event.target.data); > } > > any help much appreciated > > rgds > martin >