Problem about Webservice
hallo,
i have 2 problems when using web service in flex. web service wrote java, , deployed in jboss, used webservice explorer test it, no problem web service.
=1=
i used flex builder 3 import .wsdl, , use generated proxy classes access webservice functions.
when java classes in same package, no problem. when in different package, (so have different namespace in qname, think), cannot read data object. (the values null)
=2=
another problem is, when call call function, , read result xxx_lastresult. can not immediate accessed. must make 1 button run webservice function, , other button read result, , user must click them 1 one. if write them in 1 function (or 2 functions called 1 click), not work!
thank you.
i have 2 problems when using web service in flex. web service wrote java, , deployed in jboss, used webservice explorer test it, no problem web service.
=1=
i used flex builder 3 import .wsdl, , use generated proxy classes access webservice functions.
when java classes in same package, no problem. when in different package, (so have different namespace in qname, think), cannot read data object. (the values null)
=2=
another problem is, when call call function, , read result xxx_lastresult. can not immediate accessed. must make 1 button run webservice function, , other button read result, , user must click them 1 one. if write them in 1 function (or 2 functions called 1 click), not work!
thank you.
thanks, scripts:
[bindable]
private var ws:wsinterfaceservice = new wsinterfaceservice();
...
public function showdocs():void
{
// webservice function call
ws.getdocs();
//set result dataprovider in runtime, not work! if direct use bindable link in <mx:datagrid>, no such problem.
//dg.dataprovider = ws.getdocs_lastresult;
}
...
<mx:datagrid width="100%" id="dg" dataprovider="{ws.getdocs_lastresult}">
<mx:columns>
<mx:datagridcolumn datafield="name" headertext="name"/>
<mx:datagridcolumn datafield="size" headertext="size"/>
<mx:datagridcolumn datafield="changeddate" headertext="changed date"/>
<mx:datagridcolumn labelfunction="showurl" headertext="url"/>
</mx:columns>
</mx:datagrid>
...
<mx:controlbar horizontalalign="center">
<mx:button label="get date server" click="showdocs()"/>
...
[bindable]
private var ws:wsinterfaceservice = new wsinterfaceservice();
...
public function showdocs():void
{
// webservice function call
ws.getdocs();
//set result dataprovider in runtime, not work! if direct use bindable link in <mx:datagrid>, no such problem.
//dg.dataprovider = ws.getdocs_lastresult;
}
...
<mx:datagrid width="100%" id="dg" dataprovider="{ws.getdocs_lastresult}">
<mx:columns>
<mx:datagridcolumn datafield="name" headertext="name"/>
<mx:datagridcolumn datafield="size" headertext="size"/>
<mx:datagridcolumn datafield="changeddate" headertext="changed date"/>
<mx:datagridcolumn labelfunction="showurl" headertext="url"/>
</mx:columns>
</mx:datagrid>
...
<mx:controlbar horizontalalign="center">
<mx:button label="get date server" click="showdocs()"/>
...
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment