‎2008 Dec 17 11:33 AM
hi experts,
I am calling RFC from Flex using import option in FlexBuilder3. This RFC gets data from a table.
I debugged the code and found that data is there in the result Object. The problem arise when the proxy class tries to decode the result. I get following error
" Error: Cannot find definition for type 'urn:sap-com:document:sap:rfc:functions::char40' "
the code is
var decoder:SOAPDecoder = new SOAPDecoder();
var soapResult:SOAPResult = decoder.decodeResponse(result.message.body);
Thanks
Trilochan
‎2008 Dec 20 12:22 AM
Hi Trilly,
The FB3 WSDL introspection process produces proxy code that does not handle SAP data types properly when they are in anything but the most fundamental elements.
A workaround for this is to build wrapper RFC-enabled function modules that basically cast all data types to strings. This issue has been logged with Adobe as a bug.
An easier way might be just to call the web service directly rather than use the generated code - this is Dan McWeeney's suggestion and when it comes to Flex I take notice of Dan's suggestions.
Cheers
Graham Robbo
‎2009 Feb 13 10:34 AM
I am having the same problem as Trilochan.
I am using a webservice that returns a simple table from abap.
While debugging, the data is available in the resulting message. However the decoder fails to convert them, making all return values null.
This while using the wsdl import tool in Flex builder 3. If i call the webservice manually, the result is the same, with resultformat Object, e4x or xml. Data isn't converted properly and returns null values.
I don't get an error message like Trilochan does though.
‎2009 Oct 06 11:45 AM
Hi,
try to use "e4x" for the resultFormat.
You shouldn't have problems then to decode the result.
Cheers