I haven’t used the new xml bit in as3 but , maybe you need to so something like result[0].Login.User_Name

 

Also – you can trace out what you are getting returned that might help you a bit with something like

      trace(ObjectUtil.toString(this.service.logonXML1.result))

 

Wish I could be more helpful.

 

s.

 

 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of brownd_92
Sent: Thursday, November 24, 2005 3:33 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Problem with binding from webservice

 

Hi there,
this is my MXML File:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml"
xmlns="*">
<mx:WebService id="meetingRoomService"
wsdl="http://localhost/bookingservice/Service.asmx?wsdl"
useProxy="false" showBusyCursor="true">
      <mx:operation name="logonXML1">
            <mx:request>
                <uname>{uname.text}</uname>
                <upassword>{upassword.text}</upassword>
           </mx:request>
      </mx:operation>
      <mx:operation name="meetingAttendees">
            <mx:request>
            <MeetGuid>{uguid.text}</MeetGuid>
            </mx:request>
      </mx:operation>
     
      <mx:operation name="test">
            <mx:request>
                 
            </mx:request>
      </mx:operation>
</mx:WebService>

      <mx:states>
            <mx:State name="mainScreen">
                  <mx:RemoveChild child="{upassword}"/>
                  <mx:RemoveChild child="{label1}"/>
                  <mx:RemoveChild child="{label2}"/>
                  <mx:RemoveChild child="{uname}"/>
                  <mx:RemoveChild child="{button1}"/>
                  <mx:PropertyOverride target="{MeetingRoom}"
property="title" value="Meeting Room"/>
                  <mx:PropertyOverride target="{MeetingRoom}"
property="width" value="100%"/>
                  <mx:PropertyOverride target="{MeetingRoom}"
property="height" value="485"/>
                  <mx:PropertyOverride target="{MeetingRoom}"
property="x" value="2"/>
                  <mx:PropertyOverride target="{edgeanchor1}"
property="top" value="0"/>
                  <mx:PropertyOverride target="{MeetingRoom}"
property="y" value="249"/>
                  <mx:RemoveChild child="{MeetingRoom}"/>
                  <mx:AddChild target="{canvas1}"
position="lastChild">
                        <mx:Panel x="0" y="-2" height="150"
width="242" title="my Details">
                              <mx:Canvas height="100%"
width="100%"/>
                        </mx:Panel>
                  </mx:AddChild>
                  <mx:AddChild target="{canvas1}"
position="lastChild">
                        <mx:Panel height="150" width="242"
x="256" y="-2" title="My Meetings">
                              <mx:Canvas height="100%"
width="100%"/>
                        </mx:Panel>
                  </mx:AddChild>
                  <mx:RemoveChild child="{lbl1}"/>
                  <mx:PropertyOverride target="{txtArea}"
property="height" value="61"/>
            </mx:State>
      </mx:states>
      <mx:Resize id="Resize" duration="1000" widthFrom="260"
widthTo="500"/>
      <mx:Canvas width="100%" height="100%" id="canvas1">
           
            <mx:Panel id="MeetingRoom" title="Meeting App Login"
horizontalAlign="center" verticalAlign="middle" label="Login"
width="400" resizeEffect="resize" height="135" x="27">
                  <mx:layoutConstraints>
                        <mx:EdgeAnchor top="14"
id="edgeanchor1"/>
                  </mx:layoutConstraints>
                  <mx:Canvas height="100%" width="100%">
                        <mx:Label x="39" y="23"
text="Username" id="label2"/>
                        <mx:Label x="45" y="53"
text="Password" id="label1"/>
                        <mx:Button x="286" y="52" label="Log
on" id="button1" click="meetingRoomService.logonXML.send();
currentState='mainScreen'" resizeEffect="Resize"/>
                        <mx:TextInput x="106" y="22"
id="uname"/>
                        <mx:TextInput x="106" y="51"
id="upassword" password="true"/>
                  </mx:Canvas>
            </mx:Panel>
            <mx:Panel x="8" y="155" height="149" width="260">
                  <mx:Canvas height="100%" width="100%">
                        <mx:TextInput x="60" y="22"
id="uguid"/>
                        <mx:Button x="143" y="65"
label="Button" click="meetingRoomService.logonXML1.send()"/>
                  </mx:Canvas>
            </mx:Panel>
            <mx:Label x="300" y="172" id="lbl1" width="149"
height="55"  text="{meetingRoomService.logonXML1.result}"/>
            <mx:TextArea x="314" y="204" width="132"
height="104" id="txtArea"
text="{meetingRoomService.logonXML1.result.login.User_Name}"/>

      </mx:Canvas>
</mx:Application>




This is what my webservice returns:




  <?xml version="1.0" encoding="utf-8" ?>
- <NewDataSet>
- <login>
  <User_ID>1</User_ID>
  <User_Name>[EMAIL PROTECTED]</User_Name>
  <User_Password>secura140</User_Password>
  <User_Minutes>120</User_Minutes>
  </login>
  </NewDataSet>



Why an I not getting anything in the text area? If I use
meetingRoomService.logonXML1.result I get [Object][Object].

Please help.

David








--
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




Reply via email to