Hello,
I have a graph component in Flex and my end-user wants to be able to manipulate this control in Flex, and then export the result into Powerpoint. I don't have a problem exporting an Image to Powerpoint, but where I am running into a problem is with exporting the Flex component to a .NET web service. Here is the code I have come up with...
The Web Service Declaration:
<mx:WebService id="ws" wsdl="http://localhost:59228/CreateImageService.asmx?wsdl">
<mx:operation name="CreateImage" resultFormat="xml"/>
</mx:WebService>
The Flex code:
private function btnCreateImage():void {
var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(TeamChart);
var imageByteArray:ByteArray = imageSnap.data as ByteArray;
ws.CreateImage(imageByteArray);
//swfLoader.load(imageByteArray);
}
And the Web Service code:
[WebMethod]
public void CreateImage(byte byteArrayin)
{
CreateImage createImage = new CreateImage();
createImage.byteArrayToImage(byteArrayin);
}
I know the component is being converted successfully to a ByteArray because I can use SWFLoader() to make it reappear within the Flash canvas. If I try to send the bytearray to the .NET web servie, I get a SOAP errr. If I submit a 0 to the web service, this will at least hit the web service.
I'm not quite sure where the problem is, but I fear it's something simple that I'm overlooking.
Much appreciated,
-Matt