Solved

How Do I connect Flash to a .net Webservice and show Results in a grid?

Posted on 2007-08-03
3
933 Views
Last Modified: 2013-12-16
Hi there,

We are using Flash V8 Por and a .Net 2 webserice.

In our webservice theres a call that returns a string full of XML that describes a datatable... we have tested this and it all works fine.
we are using a webservice connector in flash and on the press of a button,  passing the results of the call into a textArea, which all works fine
We are having trouble displaying the returned XML in a datagrid though. I have maanged to get the datagrid to create the required numbe rof rows but it will not show any data.
Does anyone know where I can get an example of how to display this data in a grid using a webservice or does anyone know how do to it.
This is driving us crazy, we have been at it a week so far and still can;pt make any headway. we are c# developers by the way and not flash people, so easy steps please

BB
0
Comment
Question by:badbearontour
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
dfu23 earned 500 total points
ID: 19628135
have you seen this article?
http://madowney.com/blog/2004/02/20/flash-web-services-and-net-datasets/

a key thing is that Flash needs an array of objects and not one of the .NET objects like a DataTable or a DataSet. from there you should be able to do whatever you need with the data ...
0
 
LVL 7

Author Comment

by:badbearontour
ID: 19636845
Hi

thanks for the lead,I'll give it a try today and get back to you

BB
0
 
LVL 7

Author Comment

by:badbearontour
ID: 19637169
Cool and the Gang....

That article pointed me in the right direction..

for the purposes of a complete Answer heres a brief overview of what the solutions was

Flash doesn't recognise .net datatables serialised into a xml, in either native or typed mode
So you have to create a custom object that matches all the columns you want from the table. then create an Array of these custom objects. You iterate through the datatable filling in the details of the new array of custom objects.
Below I have cutout my code, my custom object is the JobStatus Object that has 3 fields in it, description, status, statusdate



JobStatus[] myJobsArray = null;
DataTable myData = myDataCon.getJobs(p_ID);
if (myData.Rows.Count > 0)
{
  myJobsArray = new JobStatus[myData.Rows.Count];
  int i = 0;
  foreach (DataRow dr in myData.Rows)
  {
     myJobsArray[i] = new JobStatus();
     myJobsArray[i].description = dr[0].ToString();
     myJobsArray[i].status = dr[2].ToString();
     myJobsArray[i].statusDate = dr[1].ToString();
     i++;
   }
}

Hope this helps anyone coming after me, I spent a week trawling the web and got nowhere

BB
                                                
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question