I'm new to this forum. I'm a software dev and working with Flex for a few months now.
Until now I was doing well in acquiring Know-How and so on.
But know I got stuck with a, in fact not that big issue. But I was Googling a lot and searching for solutions without success.
We have built up an Apache Axis2 web service. At the backend we are loading data from a MySQL database and packing them into HashMaps (java.util.hashmap) to transfer them via SOAP to subscribers.
For now I also want to built up a flex client, subscribing this service. I also used the Introspection Wizard (Main Menu -> Data -> "Import Web Service (WSDL)") which generated event classes, valueObject classes, the WebService and BaseWebService classes and a MapItem class (for the latter I assume the generated code should use it for a single item in the HashMap).
Everything's cool, but here also the Problems come:
After a successful response the result variables contained in my WebService instance simply remain NULL instead of pointing at the result set.
I tried to step through the code too, and indeed, before Flex tries to encode the result I can see the raw data in a result var. So the data transfer itself works and obviously it all is about the understanding of the data type on Flex side.
In one case it also happens that I get this exception:
TypeError: Cannot unmarshall type 'http://www.w3.org/2001/XMLSchema::Map' from XML.
at mx.rpc.xml::SchemaMarshaller/unmarshall()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\ mx\rpc\xml\SchemaMarshaller.as:135]
at mx.rpc.xml::SchemaManager/unmarshall()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\mx\ rpc\xml\SchemaManager.as:441]
at mx.rpc.xml::XMLDecoder/marshallBuiltInType()[C:\autobuild\3.3.0\frameworks\projects\rpc\s rc\mx\rpc\xml\XMLDecoder.as:1779]
at mx.rpc.xml::XMLDecoder/decodeType()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\mx\rpc \xml\XMLDecoder.as:1704]
at mx.rpc.soap::SOAPDecoder/decodeType()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\mx\r pc\soap\SOAPDecoder.as:772]
at mx.rpc.xml::XMLDecoder/decode()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\mx\rpc\xml \XMLDecoder.as:161]
at mx.rpc.soap::SOAPDecoder/decodeBody()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\mx\r pc\soap\SOAPDecoder.as:452]
at mx.rpc.soap::SOAPDecoder/decodeEnvelope()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\ mx\rpc\soap\SOAPDecoder.as:304]
at mx.rpc.soap::SOAPDecoder/decodeResponse()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\ mx\rpc\soap\SOAPDecoder.as:236]
at webservice::BaseMyTrainerService/processResult()[C:\Users\Eugen\Projekte\Flex\MyTrainer\s rc\webservice\BaseMyTrainerService.as:1047]
at mx.rpc::AsyncResponder/result()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\mx\rpc\Asy ncResponder.as:84]
at mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.3.0\frameworks\projects\rpc\src\mx\rpc\ AsyncRequest.as:74]
at DirectHTTPMessageResponder/completeHandler()[C:\autobuild\3.3.0\frameworks\projects\rpc\s rc\mx\messaging\channels\DirectHTTPChannel.as:409]
So far now I'm not able to access the result data in a proper way. If it helps I'll post the corresponding WSDL too.
Thanks for your help!