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

Customising Data Services

Explorer ,
Sep 30, 2010 Sep 30, 2010

Copy link to clipboard

Copied

Hi,

I am using http to get data from a database not included in the standard options for data services. That's fine I have been able to get data.

The problem I am now facing is the database has about 150 tables many with upwards of 100 columns. It would be very nice to be able to write some generic CRUD data services and pass the table name and assign the result to a particular Value Object.

The biggest problem I'm having is data typing. I can use the data service to get a sample return result with all the fields from the database, but I don't really want to have to go through every field returned and manually set it's data type – especially when I (obviously) know the data type on the server.

Any ideas about how to tackle this?

regards

Chris

Views

485

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 ,
Oct 03, 2010 Oct 03, 2010

Copy link to clipboard

Copied

This might help you.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/rpc/http/SerializationFilter.html

It will help you to convert an object to XML and vice-versa to work with strong types when using a HTTPService.

The serializers.swc shipped with FB and included in your libraries when you use a HTTPService, provides with default deserializers for XML and JSON to convert them to strong types. You can override them and provide your deserializers and serializers.

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
Explorer ,
Oct 04, 2010 Oct 04, 2010

Copy link to clipboard

Copied

LATEST

Thanks for your tip Sunil. That points me in the right direction.

However it would be nice if I could understand this class. It would be good if Adobe would provide some examples.

As it is, I get the basic idea, but I don't really know how to implement it.

I'll keep looking at it though.

thanks again,

Chris

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