Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7961445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:02:20+00:00 2026-06-04T05:02:20+00:00

Using Flash Builder I need to create a data service with 2 parameters named

  • 0

Using Flash Builder I need to create a data service with 2 parameters named start-index and max-results (for the YouTube API). In Flash Builder/Flex data services, parameter names can only contain letters, numbers and underscores. I temporarily used startIndex and maxResults intending to override these in the service’s superclass using its child class. It turns out it is not as simple as I thought and I have tried this numerous ways. If I overwrite the parameter names in the superclass it works fine, but this is inevitably overwritten because it is auto-generated. This is the superclass, _Super_TopRatedService.as :

package services.topratedservice
{
**(imports here)**

[ExcludeClass]
internal class _Super_TopRatedService extends com.adobe.fiber.services.wrapper.HTTPServiceWrapper
{
    private static var serializer0:XMLSerializationFilter = new XMLSerializationFilter();

    // Constructor
    public function _Super_TopRatedService()
    {
        // initialize service control
        _serviceControl = new mx.rpc.http.HTTPMultiService();
         var operations:Array = new Array();
         var operation:mx.rpc.http.Operation;
         var argsArray:Array;

         operation = new mx.rpc.http.Operation(null, "getData");
         operation.url = "https://gdata.youtube.com/feeds/api/standardfeeds/top_rated";
         operation.method = "GET";
         argsArray = new Array("startIndex","maxResults");
         operation.argumentNames = argsArray;         
         operation.serializationFilter = serializer0;
         operation.properties = new Object();
         operation.properties["xPath"] = "/::entry";
         operation.resultElementType = valueObjects.Entry;
         operations.push(operation);

         _serviceControl.operationList = operations;  


         preInitializeService();
         model_internal::initialize();
    }        
    //init initialization routine here, child class to override
    protected function preInitializeService():void
    {

    }    
    /**
      * This method is a generated wrapper used to call the 'getData' operation. It returns an mx.rpc.AsyncToken whose 
      * result property will be populated with the result of the operation when the server response is received. 
      * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
      * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
      *
      * @see mx.rpc.AsyncToken
      * @see mx.rpc.CallResponder 
      *
      * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
      */
    public function getData(startIndex:int, maxresults:int) : mx.rpc.AsyncToken
    {
        var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("getData");
        var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(startIndex,maxresults) ;
        return _internal_token;
    }         
}

You can see the parameter names in the line argsArray = new Array(“startIndex”,”maxResults”);

This is the child class, TopRatedService.as :

package services.topratedservice
{    
public class TopRatedService extends _Super_TopRatedService
{
    /**
     * Override super.init() to provide any initialization customization if needed.
     */
    protected override function preInitializeService():void
    {
        super.preInitializeService();
        // Initialization customization goes here
    }                   
}    
}

How and where should I override this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:02:23+00:00Added an answer on June 4, 2026 at 5:02 am

    I think this was the way it was supposed to be done in TopRatedService.as :

    protected override function preInitializeService():void
        {
            super.preInitializeService();
            // Initialization customization goes here
            super._serviceControl.operations.getData.argumentNames= new Array("start-index","max-results")
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Flash Builder 4 to create an application. I need to set an
In Flash builder, I'm struggling with basics of data retrieval from local database. Using
Hi, i have been having some problems using JSON data in flash builder lately
I am using Flash Builder 4 and need a VideoDisplay component that works with
Using Flash Builder 4 (with 4.1 flex). Trying to create a state change after
I'm using Flash builder, with flex 4 sdk and am trying to create a
I am currently using the latest verion of Adobe Flash Builder to create a
I'm building a desktop app using Flash Builder and I need it to run
I am using using Flash Builder to create an AS3 video player which needs
I'm using Flash Builder 4 (the version after Flex Builder 3, so very similar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.