I am relatively new at Flex and am having writing a sample
using the IExternalizable interface. I have a Java object on the
server side that I want to send to the Flash player. I have
searched through the older posts on this group and on various other
blog posts but not much help. I am attaching the sample code.
Both the Java files are compiled and put under
D:\lcds\jrun4\servers\default\flex\WEB-INF\classe! s. I debugged
this more and the method MyView::getResults is being invoked and
the method ResultObj::writeExternal also gets invoked successfully
but on the browser side I get the following error
ArgumentError: Error #2004: One of the parameters is invalid.
And then I get the following error:
displayFault called, [FaultEvent fault=[RPC Fault
faultString="Didn't receive an acknowledge message"
faultCode="Server.Acknowledge.Failed" faultDetail="Was expecting
mx.messaging.messages.AcknowledgeMessage, but received null"]
bubbles=false cancelable=true eventPhase=2]
So I am guessing the browser side doesn't know to construct
the object ResultObj.as. If anyone can shed some light on how to
fix it that would be very much appreciated.
I am looking at the code to find out the problem. Since you
said that you are new to Flex, you actually need not handle the
serialization/de-serialization unless required. All this is handled
for you. Please check out the URLs below for details on how to
invoke Java methods on the server and how to map AS objects to Java