Yes, it displays XML and cannot access nodes.
Here's the heading elements of the returned XML from a trace:
<PostalCodeLookupResponse
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns="[CorporateNSAddressRemoved]">
<PostalCodeLookupResult Value="K7M 6B2" ProvinceCode="ON">
<Municipality Name="KINGSTON">
.....
</Municipality>
</PostalCodeLookupResult>
</PostalCodeLookupResponse>

I have been able to reference via 
postalcodeXML.*::[EMAIL PROTECTED] but when I have to put
the wildcard and result and such on every node it seems kind of
laborious. I figured there would be a way to make the default hold up
which I haven't yet managed.

--- In [email protected], "ben.clinkinbeard"
<[EMAIL PROTECTED]> wrote:
>
> Does the Alert.show(postcodeXML) display the xml and you're just not
> able to get nodes within it? Does the returned xml contain namespaces?
> If you can post the resulting xml and the code you're using to try and
> access individual nodes it will be easier to diagnose your issue.
> 
> Ben
> 
> 
> --- In [email protected], "Jamie O" <jamie.oastler@> wrote:
> >
> > I've tried pretty much every sample I can find out there on the
> > interweb and just can't seem to get things to play nice with my web
> > service to allow me to get at individual nodes / elements using E4X.
> > If anyone can suggest something, it would be REALLY appreciated.
> > 
> > I've got:
> > -an event broadcasting to the controller (not shown) working fine.
> > -execute the search command (not shown) working fine.
> > -executing the webservice request (shown) working fine.
> > -receiving the webservice response (shown) working fine.
> > -Accessing specific nodes / attributes in the response not working!
> > -If I use a HTTPService to a direct XML file, e4x is ok.
> > 
> > [SERVICE DEFINITION MXML]
> > <mx:WebService id="addressWSService" wsdl="[RemovedPath]?WSDL"
> > makeObjectsBindable="false" showBusyCursor="true" useProxy="false">
> >     <mx:operation name="PostalCodeLookup" resultFormat="e4x">
> >             <mx:request>
> >                     <PostalCode>
> >                             K7M6B2
> >                     </PostalCode>
> >             </mx:request>
> >     </mx:operation>
> > </mx:WebService>
> > 
> > [DELEGATE DEFINITION ACTIONSCRIPT]
> > service = ServiceLocator.getInstance().getService("addressWSService")
> > as WebService;
> > 
> > public function LocateAddress(p_PostalCode:String):void
> > {
> > service.addEventListener(ResultEvent.RESULT, LocateAddress_onResult);
> > service.addEventListener(FaultEvent.FAULT, LocateAddress_onFault);
> > var o:AbstractOperation = service.getOperation("PostalCodeLookup");
> > o.arguments.PostalCode = p_PostalCode;
> > service.PostalCodeLookup();
> > }
> > 
> > protected function LocateAddress_onResult(event:ResultEvent):void
> > {
> > trace("AddressWSDelegate::LocateAddress_onResult");
> > responder.onResult(new ResultEvent(ResultEvent.RESULT, false, true,
> > event.result));
> > }
> > 
> > [SEARCH COMMAND ACTIONSCRIPT]
> > protected function searchPostalCode(p_postalcode:String):void
> > {
> >     getDelegate().LocateAddress(p_postalcode);
> > }
> > 
> > protected function getDelegate():AddressWSDelegate
> > {
> >     return new AddressWSDelegate(this);
> > }
> > 
> > public function onResult(event:*=null):void
> > {
> >     trace("SearchCommand::onResult");
> >     var postcodeXML:XML = new XML(event.result);
> >     Alert.show(postcodeXML);
> > }
> > 
> > Overall the structure of this app is pretty close to Jesse Wardens
> > Amazon sample but that one goes to an array rather than working with
> > e4x which I would like to.
> >
>





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to