• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Web Services name clash with AS top level class

New Here ,
Jan 24, 2011 Jan 24, 2011

Copy link to clipboard

Copied

Some context:

  •     New to Flex
  •     Using Flash Builder 4
  •     Flex 4.1

I'm trying to connect to a web service and I get the following error:

An error occurred while attempting to resolve the existing model.

ERROR : ActionScript generation is not supported for entities whose names clash with this top level (no package) ActionScript classes.
Entity "Error" clashes with an AS top level class.

Any pointers on how to resolve conflicts with the WSDL object names and AS classes?

Thanks!

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 24, 2011 Jan 24, 2011

Copy link to clipboard

Copied

This has been resolved in the upcoming version of FB.

A workaround could be to replace the Error in the wsdl with a different word and use the WSDL to generate appropriate classes.

After this you could use the convertResultHandler property (by pointing to your custom function) in the WebService class to actually convert the result to appropriate classes.

By default FB uses a result handler function convertResultHandler defined in com.adobe.serializers.utility.TypeUtility in serializers.swc

Hope this helps.

-Sunil

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 25, 2011 Jan 25, 2011

Copy link to clipboard

Copied

Is this fixed in the Burrito preview?

About convertResultHandler, I defined it as such:

<mx:WebService id="reportingServices" convertResultHandler="WebServiceTest.convertResultHandler" ...>

public static function convertResultHandler(result:*, operation:AbstractOperation):*
{
...               
}

But response is caught by the fault handler with "faultCode:DecodingError". Is there a way to define a response handler higher up in the flow for parsing the response?  (It's a multipart/related response)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 06, 2012 Aug 06, 2012

Copy link to clipboard

Copied

LATEST

I am importing a Partner WSDL from SalesForce.com and am still getting the same error. Has this ever been fixed?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 02, 2011 Jul 02, 2011

Copy link to clipboard

Copied

I'm also encountering the same problem with Flash Builder 4.5.

I'm connecting to a web service that also has an "Error" object defined.

Is there any way to resolve this issue?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 16, 2011 Jul 16, 2011

Copy link to clipboard

Copied

You might want to look at your database field names and make sure you're not using names that match Actionscripts reserved name types.  There's possibly an illegal name in your database field list.

In my case, I had a field called 'classes' in my database that produced the same error. When I changed it to 'myClass' the error was resolved.

I'm not sure if this is useful.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines