What happens in the result handler “fin()”?

 

By the way, you should type the event object more specifically, RPCEvent I believe

 

Also in a trace or alert, you will want use e.result.toXMLString() in order to see the xml.

 

Tracy

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Ing.Sist, Rafael Briones
Sent: Wednesday, September 06, 2006 7:09 PM
To: [email protected]
Subject: [flexcoders] web service and datagrid

 

Hi ,
I have a webservice created with AXIS Java, and I try
to get the result .
The result of the webservice is a XML Document.
I have an Object wsQryProgress that is my webservice
wsQryProgress.doQueryWS is the only method in my
webservice , and too I have a datagrid and binding
with
dataProvider="{wsQryProgress.doQueryWS.lastResult}"

I don't know why the datagrid is empty

Here is my code I hope you can help me

quote:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" >
<mx:WebService id="wsQryProgress"

wsdl="http://localhost/axis/services/QryProgress?wsdl"
useProxy="false" result="fin(event);"
fault="falla(event);">
<mx:operation name="doQueryWS">
<mx:request>
<in0>for each tblcredencial where chrusername =
'[EMAIL PROTECTED]com' no-lock</in0>
<in1>Credenciales</in1>
<in2>Credencial</in2>
<in3>idcredencial,chrusername</in3>

<in4>http://www.toditocard.com/cgi-bin/tcardB/util/XML/wGenXml.p</in4>
</mx:request>
</mx:operation>

</mx:WebService>
<mx:Panel x="10" y="10" width="400" height="300"
layout="absolute" title="Usuarios tcard">
<mx:TextInput x="10" y="23" id="txtUser"/>
<mx:Button x="198" y="23" label="Enviar"
id="btnSend" click="SendUser();"/>
<mx:DataGrid x="10" y="70" id="dgUsuario"
dataProvider="{wsQryProgress.doQueryWS.lastResult}">
<mx:columns>
<mx:DataGridColumn headerText="idCredencial"
dataField="idcredencial"/>
<mx:DataGridColumn headerText="Username"
dataField="chrusername"/>
</mx:columns>

</mx:DataGrid>
<mx:Label x="10" y="229" text="&quot; &quot;"
id="lblqry"/>
</mx:Panel>
<mx:Script>
<![CDATA[
import mx.utils.ArrayUtil;
import mx.controls.Alert;

public var strQry:String;
public var strUrl:String =
"http://www.toditocard.com/cgi-bin/tcardB/util/XML/wGenXml.p";
public var strRoot:String = "Credenciales";
public var strRow:String = "Credencial";
public var strCampos:String =
"chrusername,idcredencial";
[Bindable]
public var credenciales:Array;
public function EnviaQry(strUser:String):void
{
strQry = "for each tblcredencial where chrusername
= '" + strUser + "' no-lock:";
wsQryProgress.doQueryWS.send();

}
public function SendUser():void
{
EnviaQry(txtUser.text);
}

public function fin(e:Object):void{
Alert.show(e.result,"Result
XML",Alert.OK,this,null,null,Alert.OK);

}
public function falla(e:Event):void
{
txtUser.text=e.toString();
}

]]>
</mx:Script>
</mx:Application>




__________________________________________________________
Do You Yahoo!?
La mejor conexión a Internet y <b >2GB</b> extra a tu correo por $100 al mes. http://net.yahoo.com.mx

__._,_.___

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





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to