flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: Extracting XML from web service result with namespace
Date Mon, 20 Jan 2014 17:33:54 GMT
See the doc on Qname and Namespace.

On 1/20/14 8:54 AM, "Oleg Konovalov" <olegkon@gmail.com> wrote:

>Hi,
>
>
>
>
>I need to extract some XML data from proprietary Web Service (to be fed to
>HierarchicalData for dataProvider of ADG).
>
>
>
>So I made service.returnType=¹e4x¹;
>
>In that case it returns data as XML.
>
>
>
>I need to get useful data from it after Snapshot:
>
><SOAP-ENV:Envelope
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/
>">
>
><SOAP-ENV:Header 
>xmlns:msdwHdr="http://xml.msdw.com/ns/appmw/soap/1.0/header
>">
>
><msdw:RequestID xmlns:msdw="http://xml.msdw.com/ns/appmw/soap/1.0/header
>">restsoap#1390182244050#197728273958044232</msdw:RequestID>
>
><msdwHdr:FinalMessage>true</msdwHdr:FinalMessage>
>
></SOAP-ENV:Header>
>
><SOAP-ENV:Body>
>
><ADSSnapshotResponse xmlns="http://xml.ms.com/ns/appmw/dataserver/1.0">
>
><Snapshot seqNo="0">
>
>*<BASE_ELEMENT_NAME BASE_ELEMENT_NAME="4.11.2.0">*
>
>ŠŠ..
>
>
>
>Using E4X, like:
>
>*var* root:XML = event.result *as* XML; //good!
>
>
>*var* xmlRoot1:XMLList = root[*'SOAP-ENV:Body'*
>].ADSSnapshotResponse.Snapshot.BASE_ELEMENT_NAME;
>
>it does return XMLList (tried different variants), but debugger shows
>nothing at all inside that XMLList.
>
>
>*var* root1:XMLList = root.children();  // that returns valid XMLList with
>2 XML elements inside
>
>
>
>But all other data I could not get if I use any E4X:
>
>
>
>Can I skip Envelope, going to Body as one of its children?  suppose I
>can...
>
>
>
>a) root.*SOAP-ENV:Body would give compilation errors because of Œ-Œ, Œ:¹*
>
>
>
>*b) root.Body gives blank XMLList*
>
>
>
>c) root.Body[0] returns NULL
>
>
>
>
>
>Any idea how to extract the load from ADS Response (envelope)?
>
>
>
>What can I do regarding XML Namespaces in E4X ?
>
>
>
>
>
>If I set service.returnType="xml" it returns data as XMLNode's.
>
>But I prefer to use E4X if possible.
>
>
>
>Please help!
>
>
>
>TIA,
>
>Oleg.
>
>
>
>P.S.: using Flex 4.5.1 with Flex3 ADG.


Mime
View raw message