Expand my Community achievements bar.

xml in datagrid instead of a proper result

Avatar

Level 1
Hi



I'm new to FDS and I have a problem to show my data in my
data grid. As you can see below I have a datagrid and a button.When
I click on the button I search for every item which contains 'BA'
but instead of giving me all the items of my search results, the
data grid gives me my search result in a xml-format:
<articles><article><number>262</number><description>BALPEN
BIC M10 BLAUW</description></article>



Has anybody have had a similar problem and found a solution?



Thanks!



<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
backgroundColor="#FFFFFF" viewSourceURL="srcview/index.html">

<mx:WebService id="srv" wsdl="
http://localhost:8080/axis/ArticleService.jws?wsdl"
showBusyCursor="true"/>

<mx:DataGrid dataProvider="{srv.getArticles.lastResult}"
width="100%" height="100%">

<mx:columns>

<mx:DataGridColumn dataField="article.number"
headerText="Article Number"/>

<mx:DataGridColumn dataField="article.description"
headerText="Description"/>

</mx:columns>

</mx:DataGrid>

<mx:Button label="Get Data"
click="srv.getArticles('BA')"/>

</mx:Application>







2 Replies

Avatar

Former Community Member
Note that this issue would be technically unrelated to FDS
(now known as

LCDS - the latest version being LCDS 2.5.1), but rather it
concerns WebServices

and the decoding SOAP into ActionScript objects. That is, FDS
is not required

to use WebServices in Flex (unless you need the proxy
service) and FDS does

not decode the SOAP responses - that is something that the
rpc.swc client

library does from the Flex SDK.



Depending on the version of Flex that you're using, it may be
a bug in the

<mx:WebService> implementation in the Flex SDK?



A new <mx:WebService> implementation was provided in
the Flex SDK which was

first made available in LCDS 2.5 which co-incided with Flex
SDK 2.0.1 Hotfix

2, and will be more widely exposed in Flex 3 (which is
currently in Beta).



The latest nightly builds for the Flex SDK 2.0.1 can be found
here:


http://labs.adobe.com/technologies/flex/sdk/flex2sdk.html





The latest nightly builds for the Flex SDK 3 Beta can be
found here:


http://labs.adobe.com/technologies/flex/sdk/flex3sdk.html



If you find a problem with WebServices, please log a bug
against the Flex

SDK at the public bug repository:




http://bugs.adobe.com/flex/



You can log the bug under the "RPC: WebService" component.



When logging a WebService bug, it's best to provide the WSDL,
any XML Schema

imports, a snippet of MXML or AS3 code that you used to call
an operation

and process the result (as you did in your post), and ideally
a capture of

the SOAP response as XML.



Regards,

Pete











> Hi

>

> I'm new to FDS and I have a problem to show my data in
my data grid.

> As you can see below I have a datagrid and a button.When
I click on

> the button I search for every item which contains 'BA'
but instead of

> giving me all the items of my search results, the data
grid gives me

> my search result in a xml-format:

>
<articles><article><number>262</number><description>BALPEN
BIC M10

> BLAUW</description></article>

>

> Has anybody have had a similar problem and found a
solution?

>

> Thanks!

>

> <?xml version="1.0" encoding="utf-8"?>

> <mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"

> backgroundColor="#FFFFFF"
viewSourceURL="srcview/index.html">

> <mx:WebService id="srv"

> wsdl="
http://localhost:8080/axis/ArticleService.jws?wsdl"

> showBusyCursor="true"/>

> <mx:DataGrid
dataProvider="{srv.getArticles.lastResult}"

> width="100%"

> height="100%">

> <mx:columns>

> <mx:DataGridColumn dataField="article.number"
headerText="Article

> Number"/>

> <mx:DataGridColumn dataField="article.description"

> headerText="Description"/>

> </mx:columns>

> </mx:DataGrid>

> <mx:Button label="Get Data"
click="srv.getArticles('BA')"/>

> </mx:Application>