Skip to Content
0
Former Member
Dec 12, 2007 at 08:49 AM

Calling a Query Template as WebService(Flex Application)

20 Views

Hi all,

This is my Flex application code:

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

http://www.adobe.com/2006/mxml" layout="absolute" initialize="Hi()">

<mx:Script>

<![CDATA[

import mx.rpc.events.ResultEvent;

import mx.rpc.http.mxml.HTTPService;

import mx.controls.Alert;

private function Hi():void{

Alert.show("Hello", "Alert Box", Alert.OK);

App1.url=encodeURI("http://localhost/Lighthammer/Illuminator?QueryTemplate=Accenture\SAP_CAP\04_Sandpit\SheetalReddy\Query\Asset_util_query1&IllumLoginName=admin&IllumLoginPassword=admin&content-type=text/xml");

App1.send();

}

]]>

</mx:Script>

<mx:HTTPService id="App1"/>

<mx:LineChart id="linechart1" width="100%" height="60%" dataProvider="{App1.lastResult.Rowsets.Rowset.Row}" x="0" y="0">

<mx:horizontalAxis>

<mx:CategoryAxis categoryField="DateTime"/>

</mx:horizontalAxis>

<mx:series>

<mx:LineSeries displayName="Util1" yField="AssetUtil2" form="curve"/>

</mx:series>

</mx:LineChart>

<mx:Legend dataProvider="" x="10" y="347" fontFamily="Arial" fontSize="13"/>

</mx:Application>

Problem is I am not able populate data from the Query Template into the grid.

I am guessing the problem is either with the "HTTPService" tag or the "dataProvider".

Are there any pre-requisites or any settings to be done before calling a Query through a flex application?

I am clueless.

Kindly help.