Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SOAP decoder parsing error

Former Member
0 Likes
675

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

3 REPLIES 3
Read only

GrahamRobbo
SAP Mentor
SAP Mentor
0 Likes
611

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

Read only

joramsomers
Explorer
0 Likes
611

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.

Read only

Former Member
0 Likes
611

Hi,

try to use "e4x" for the resultFormat.

You shouldn't have problems then to decode the result.

Cheers