I'm writing a reporting system that allows users to select a report, enter parameters, select a chart, then click a run button. When the "Run" button is clicked I execute a SOAP request via AXIS2 to a J2EE server that returns the report information. I then (dynamically) create a datagrid based on the report data and If the user's selected a chart, I create a FusionChart (dynamically) and add them to the canvas.
The steps in creating a report are:
- select a report (executes a SOAP call to retrieve information about the report)
- enter parameters (required),
- select a chart type (optional)
- I retrieve the data for the report via an Axis2 SOAP call to a Tomcat server running on a Linux box,
- The data is in an Flex ArrayCollection
- I use this data to populate both the Flex datagrid and the Fusion chart (based on users selections).
- If the user selected a chart, I create the Fusion chart dynamically,
- I create a Flex ArrayCollection to feed the Fusion chart.
The chart and datagrid render without a problem but, the next report I select encounters the following error "Unable to load WSDL If currently online, please verify the URI and/or format of the WSDL". If I don't include the chart I don't have any problem with the WSDL. I have posted this question on the FusionChart for Flex forums but have not had any responses other then the code I use to add the chart.
Here is the Flex code that I use to create the Fusion chart;
var fChart:FusionCharts = new FusionCharts;
fChart.FCChartType = chartData.name; // chartData.name is a value that the user selected ex. Pie3D
var cdBuilder:ChartDataBuilder =
new ChartDataBuilder(attribArray); // ChartDataBuilder is a Flex class that I use
// to generate the ArrayCollection.
// attribArray is an ArrayCollestion that contains
// the users selection (X, Y)
fChart.FCData(cdBuilder.buildChartData(reportData)); // buildChartDatais the method that I call to return the
// ArrayCollection for the chart. reportData is an
// ArrayCollection that contains the report/graph data
reportCanvas.addChild(fChart); // reportCanvas is the '' control for the panel
Again, this code works fine for the first report but the next report that I try to run I receive:
"Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL."
It never makes it to the the Fusion code it dies on the first SOAP call when trying to get information about the next report.
If I don't select/include a chart I have no problems.