Mapping Objects in Flex Data Services

Hi My Dear Friends
This is yogans, i am working in flex for the last 15 days
and i learned the basic things like syntax, tags, scripts. and i am
doing
some data services work now. especially with the help of
Java Remote objects. I dont know http services and
webservices(WSDL).
My doubt here is, I created a user defined object in java
and i want to send this object through Remote call from flex. how
can i
type cast the java object to flex. And i want to add these
objects to the dataprovider of a datagrid. Please help me in
acheiving
this. i will be very thank ful to you in my life. I know
that i have to create same kind of object in flex. But i dont have
concrete idea
please explain me with very simple example step by step . I
am awaiting in hope that God will send some one to help me.
Thanks and Regards
Yogans.s

Hi,
If you want to map your actionscript class to your server's
Java class. You can run a util function
registerClassAlias("dev.echoservice.Book",Book);
where "dev.echoservice.Book" is the fully qualify name of
your java class. Book is your actionscript class.
Calling this util before you make your remoteobject call. You
can put this in your actionscript class constructor, it makes this
call whenever you create your class. However, it seems to be better
to call it when the class is loaded. To do so you can declare it as
static
public static var a:* =
registerClassAlias("dev.echoservice.Book",Book);
OR
You can also declare it as metaData in your class as:
[RemoteClass(alias="dev.echoservice.Book")]
However, I found someone saying that it didn't work in sdk
compilation, but webtier compilation. It might be some
configuration issue. I haven't tried it yet.
To display the properties in the dataGrid, you just have to
either use Array or ArrayCollection. If databinding is involved,
the datagrid need to know the Collection.Change event. It is better
to use ArrayCollection, therefore, adding new item to
arrayCollection the datagrid get repopulate.
hope it helps!
William Chan

Similar Messages

  • Error while creating New flex data services project

    Hi
    Error: Invalid server root. flex-config.xml or
    flex-enterprise-services.xml must exist in the WEB-INF/flex folder
    within the server root.
    Trying to create flex data services project with Weblogic8.1
    as the j2ee server, but am geting the above error in the screen
    where i point to the root of the server.
    I did deploy flex on weblogic.
    I would appreciate any help.
    Thank you
    Sun

    Hi Nj,
    Thanks for you reply, I did point root folder to WEB-INF
    folder(which contains flex folder). My WEB-INF folder is in the
    weblogics "c://bea/userprojects/applications/appname/"
    this the value in the root folder field "
    C:\bea81SP5\user_projects\applications\dcgsaApplication\dcgsAdaptersWeb\WEB-INF\flex"
    Let me know if am doing anything wrong.
    thank you
    sun

  • Flex Data Services JOTM, JTA and JMX downloads

    I am not a Java developer. I am an Information Architect/UI
    Designer and up until a few months ago, I designed GUIs using MS
    Studio.Net -- Tomcat is a little different IIS, to say the least.
    =)
    I have downloaded the trial software of Flex Builder 2 and
    Flex Data Services to test it with intent to purchase.
    I was getting real happy with Flex Builder 2. Breezing
    through the "Getting Started" and all the tutorials. Absolutely
    Love it.
    Then along comes Flex Data Services. This application has
    bought me to a screeching halt.
    I've downloaded the files according to the instructions at:
    http://www.adobe.com/support/documentation/en/flex/2/install.html#flexj2ee.
    I placed the files in my webapps directory running on tomcat.
    However, according to the instructions at:
    http://www.adobe.com/support/documentation/en/flex/2/install.html#tomcat,
    I need to download additional applications in order to
    correctly use FDS. I have tried to download the JOTM 2.0.10.tgz
    from
    http://forge.objectweb.org/project/download.php?group_id=19&file_id=3926
    without success. When I try to unzip the file (I am running
    Windows XP Professional), I get the following error:
    "Error reading header after processing 0 entries."
    I've tried to download three different versions of JOTM, no
    luck. Our Java developer suggested that I save the "tar" file as a
    "zip" file and try to open it after download. However, when I try
    to open the archive in WinZip it returns this error:
    "Cannot open file: it does not appear to be a valid archive.
    If you downloaded this file, try downloading the file again."
    Both of these errors occur when trying to open the downloaded
    JOTM 2.0.10.tgz and JOTM 2.0.8.tgz files.
    How can I get these applications? Has anyone had any success
    in downloading these files from:
    http://forge.objectweb.org/project/showfiles.php?group_id=19&release_id=1024
    The downloaded archive files are empty. I can not run any of
    the Data Service samples.
    When I tried at:
    http://localhost:8080/samples/dataservice/flexcab/flexcabDispatcher.mxml
    A service error prompt returns: "Unable to access
    UserTransaction in Dataservice".
    I'm assuming this is because the JOTM (et. al) is not on my
    box, because the archive is empty when I try to open it in WinZip.
    Also, while I was reading the installation instructions for
    Tomcat at:
    http://www.adobe.com/support/documentation/en/flex/2/install.html#tomcat
    it seems pretty complicated for a non-Java programmer to
    understand. I asked one of our 6-year veteran Java developers here
    to help me with this and he said it was a pretty a complicated
    process for someone w/o Java programming experience. I thought it
    was geared towards front-end developers. But he did say that if I
    can't download the JOTM, I won't be able to do whatever it is that
    Flex Data Services is supposed to do. I say the latter because I am
    still in the "Getting Started" manual going through the last of the
    tutorials (which is the Flex Data Services distributed application
    tutorial) before I start reading "Using Flex", so I'm not really
    sure what lessons I will be doing that require FDS to work
    correctly on my box.
    Do I really need the FDS to build interactive applications in
    Flex Builder?
    I appreciate your answers. Thanks in advance.

    I agree with you about the process of getting FDS installed
    and working. I recommend that you try Christophe Coenraets FDMS
    tutorial. The JOTM files are in "tar" format, and so I think you'll
    have to extract them using a "tar" utility. This is included with
    any Unix variant, and so I asked someone at work to extract the
    files; on Windows I think you'll have to find a free "tar" program.
    I downloaded jotm-2.0.10.tar from the JOTM Sourceforge. Use
    parameters "-xf" if the tar file is not compressed, or "-zxf" if it
    is compressed. Good luck!

  • Business Objects Enterprise and Data Services and SAPRouter

    Hi,
    I am relatively new to Business Objects so I am not entirely sure how this works. My question is can Business Objects Enterprise and Data Services be configured in SAPRouter for SAP to dial in and access the systems.
    Regards
    Naureen

    Hi,
    I am new to PI Upgradtion Project.
    We are planning to upgrade PI 7.11 to PI 7.3.
    Can you please help me what are the steps we have to fallow to upgdrade PI and what are the changes/Issues will happen when upgradtion in PI.
    Share me your ideasssssssssssssssssss.......
    Thanks,
    Mallam

  • FLex Data service

    I run into problem when i create Flex Data Service project. I
    get error when i try to compile my code
    "Invalid byte 1 of 1-byte UTF-8 sequence"
    Doesnt say anything more of what is going on. I tried it both
    on Vista and XP but sometimes project runs and after a while i
    start receiving this error again.
    Thanks in advance

    What about ColdFusion?

  • Flex Data Services tutorial error

    In the "Before You Begin" section of the Flex Data Services
    tutorial in "Getting Started with Flex", the first bullet is
    incorrect. It text should be:
    "Ensure that you have installed the Flex Data Services Beta 3
    release and that you can run the applications in the samples web
    application."
    The installation instructions are located here:
    http://www.adobe.com/go/flex2_installation
    The tutorial zip file is located here:
    http://www.macromedia.com/go/flex2beta1_quickstart_tutorial_zip
    - Mike Peterson
    Adobe Flex documentation team

    Hi, I found some more "issues" with these data services
    tutorial.
    First of working with the notes example at first I couldn't
    get the two browsers to talk to eachother until I found this
    comment by funk_sf on the livedocs:
    quote:
    after some searching, I located a link to the tutorial.zip
    here:
    http://www.macromedia.com/go/flex2beta1_quickstart_tutorial_zip.
    i unzip'd the contents into my samples directory so that I had the
    following path: C:\fds2\jrun4\servers\default\samples\tutorials
    the xml file in WEB-INF for the standalone flexbuilder 2b3 is
    located at C:\fds2\resources\config as mentioned in the comments on
    the previous page (
    http://livedocs.macromedia.com/labs/1/flex20beta3/00000129.html)
    as for creating the tutorial1.mxml file, i created a new Flex
    project with the following settings (this is from memory, so
    hopefully i recall all the steps right):
    File->New Flex Project
    How will you flex application access data? -> Flex Data
    Services -> Compile application locally in Flex Builder
    root folder: C:\fds2\jrun4\servers\default\samples
    root url:
    http://localhost:8700/samples/
    I left the build paths to their defaults (ie. blank)
    named the main application file: tutorial1.mxml
    output folder: tutorial
    output folder url: [blank]
    So I followed his advice, deleted my project and made it in
    the samples directory and the notes application started to work, so
    all appeared good.
    Until I was making the Java example and I'm now faced with
    the following errors:
    Severity Description Resource In Folder Location Creation
    Time Id
    2 Definition samples.contact:Contact could not be found.
    tutorial2.mxml Tutorials line 8 6 juni 2006 16:36:25 20
    Severity Description Resource In Folder Location Creation
    Time Id
    2 Type was not found or was not a compile-time constant:
    Contact. tutorial2.mxml Tutorials line 13 6 juni 2006 16:36:25 21
    I'm not sure what is happening, I think it can't find the
    data service files but I don't know how to make it so that it does
    find those files, the manual is still a bit vague on that and when
    I try to run this application it just shows a blue (flex) screen.
    The code I'm using is straight from the example documentation after
    tinkering around for 2 days to get this to work I thought using
    original code is the best way to go.
    My application tries to run from
    http://localhost:8700/samples/bin/tutorial2.html
    The documentation states:
    Open the following URL in two browser windows:
    [L=http://localhost:port/samples/tutorials/tutorial2.mxml
    The screenshots in the documentation show:
    Window1: /tutorial/tutorial1.mxml
    Window2: /dataservice/contact/tutorial_step4.mxml
    Now I'm just confused, tutorial1.mxml is my notes application
    which was the previous tutorial and there was no mention of a
    tutorial_step4.mxml file ?
    Someone help me please with where to place these files and
    why so I can understand what is happening here.
    Thanks :)

  • New Flex Data Services Project

    Hi all,
    When creating new Flex Data Services Project i found this
    error
    "Unexpected attribute 'url' found in 'endpoint' from file:
    services-config.xml."
    and i don't know what it means.

    Hi Nj,
    Thanks for you reply, I did point root folder to WEB-INF
    folder(which contains flex folder). My WEB-INF folder is in the
    weblogics "c://bea/userprojects/applications/appname/"
    this the value in the root folder field "
    C:\bea81SP5\user_projects\applications\dcgsaApplication\dcgsAdaptersWeb\WEB-INF\flex"
    Let me know if am doing anything wrong.
    thank you
    sun

  • Free alternatives to Flex Data Services

    Are there free alternatives to Flex Data Services? YES I KNOW
    ABOUT THE FREE LICENSE... but that is for a SINGLE CPU... not for
    the real world...I'm talking about really free... as in MySQL, if
    you know what you're doing free...
    Thanks!

    Me too. A few stumbles but it really was easy to use.....
    Only drawback is would like to easily secure the "service
    browser"... and my copy of ServiceCapture was invaluable (to me)...
    http://amfphp.sourceforge.net/
    Thanks, Matt M.

  • Flex Data Services

    Hi Guys,
    We have licensed version of Flex Builder with charting.But i
    want to connect MYSQL database through Flex data services.When I am
    trying to install the Flex Data Services 2 the installer prompts
    for a serial number.
    If we omit the serial number, the installer installs Flex
    Data Services Express but according to our project requirement we
    need FDS 2 only.
    Can anyone please suggest us which steps we have to follow.
    Thanks,
    Venkata

    I think you need Adobe LiveCycle Data Services (formerly
    FDS). In any case it is an additional product, apart from Flex
    Builder, so of course you would need a serial number.

  • How to install Flex Data Services 2 on Coldfusion MX 7?

    hello,
    How to install Flex Data Services 2 on Coldfusion MX 7?
    was is tomcat..
    I want to use RemoteObject(CFC) for oracle.
    Thanks for your support.

    Hello -
    To use mx:RemoteObject with CFC you don't even need FDS, you
    can use FlexBuilder 2.0 and use it's internal FDS SDK to build,
    compile and deploy full apps to be used in conjunction with CF 7.02
    (Flex Connectivity)
    Secondly, if you do want to install the full FDS 2.0
    enterprise software you can find the instructions to do so for J2EE
    apps servers here
    http://www.adobe.com/support/documentation/en/flex/2/install.html#flexj2ee
    HTH, Bill

  • Serial number for Flex Data service Beta 3

    Which serial umber should be entered for flex Data service
    beta 3. It says that if no serial number is entered it reverts to
    the Express version....

    There is a serial number in the
    Installation
    Instructions.

  • Populate ComboBox from database - NOT using Flex Data Services

    Hi there,
    We are using CF with Flex but are not using the Flex Data
    Service. I'm very much a newb and I'm having trouble finding any
    information on how to populate controles from a database without
    using Flex Data Service. Any help would be greatly appreciated.
    First I have a page... JobSearch.mxml that contains a combo
    box that I want to populate with the job_id and job_title from a
    MSSQL database.
    In Flex in the RDS DataView I used the "Create CFC" Wizard
    which generated "job.cfc" and "jobGateway.cfc". It also generated
    "job.as".
    The CF Function that selects the data appears to be defaulted
    and called "load" and the .as function is called simply "job".
    So, that all looks great. But I can't find any information on
    what I need to have on my JobSearch.mxml to actually get this data
    into the comboBox.
    I did:
    <mx:Script>
    <![CDATA[
    [Bindable]
    public var jobData:job = null;
    ]]>
    </mx:Script>
    And then:
    <mx:ComboBox
    text="{jobData.job_title}"></mx:ComboBox>
    But I'm being told "Type was not found or was not a
    complie-time constant: job"
    I guess I'm missing something, or doing something way
    wrong... I just don't know enough of Flex at this point to know
    what it is.
    Thanks!
    April

    Using php or asp is not an option, as we are a Cold Fusion
    House.
    I was looking at an article on Ben Forta's blog (
    http://www.forta.com/blog/index.cfm?mode=e&entry=1786)
    and following his example I did this... only it doesn't work:
    I'm very very new to Flash and we are using ColdFusion but
    are not using Flex Data Services. I've been trying to figure out
    how to populate a combobox from a database and I'm just not having
    any luck.
    My project is called "PreTraffic". I have my main file as
    "JobSearch.mxml" and a folder under the root named "cfc" with a
    file called "job.cfc".
    job.cfc contains the following code:
    <cfcomponent>
    <!--- Get jobs --->
    <cffunction name="GetJob" access="remote"
    returntype="query" output="false">
    <cfset var job="">
    <cfset var results="">
    <cfquery datasource="discsdev" name="job">
    SELECT job_id, job_title
    FROM job
    WHERE status = 'O'
    ORDER BY job_title
    </cfquery>
    <cfquery dbtype="query" name="results">
    SELECT job_title AS label, job_id AS data
    FROM job
    ORDER BY label
    </cfquery>
    <cfreturn results>
    </cffunction>
    </cfcomponent>
    And JobSearch.mxml has the following code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
    xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns="*"
    layout="absolute"
    backgroundGradientColors="[#ffffff, #d0d0d0]"
    creationComplete="InitApp()">
    <mx:Style source="style.css" />
    <mx:Script>
    <![CDATA[
    public function InitApp():void {
    jobSvc.GetJob();
    ]]>
    </mx:Script>
    <!-- ColdFusion CFC (via AMF) -->
    <mx:RemoteObject id="jobSvc" destination="PreTraffic"
    showBusyCursor="true" />
    <mx:VBox label="Job History" width="100%" height="100%"
    x="10" y="92">
    <mx:Label text="Search jobs by"/>
    <mx:Form label="Task" width="100%">
    <mx:FormItem label="Job Name:">
    <mx:ComboBox id="jobNameCB"
    dataProvider="{jobSvc.GetJob.results}"></mx:ComboBox>
    </mx:FormItem>
    </mx:Form>
    <mx:HBox>
    <mx:Button label="Search"/>
    <mx:Button label="Clear"/>
    </mx:HBox>
    </mx:VBox>
    </mx:Application>
    My Compiler thingy points to:
    -services
    "/Volumes/flexwwwroot/WEB-INF/flex/job-services-config.xml" -locale
    en_US
    and job-services-config.xml contains the following code:
    <destination id="PreTraffic">
    <channels>
    <channel ref="my-cfamf"/>
    </channels>
    <properties>
    <source>flex.pretraffic.cfc.job</source>
    <lowercase-keys>true</lowercase-keys>
    </properties>
    </destination>
    Well, when I run the app... the combobox is not populated...
    Can anyone help with what I've done wrong?
    Thanks!
    April

  • Flex Data Services does not see remote methods in extended ColdFusion component.

    I have created a remote service base component as a AModelService.cfc file. I extend that file to make my ModelService.cfc. When I configure the ColdFusion data service and point to ModelService.cfc and click next, I don't see any remote methods (there are none explicitly defined in the component) in the Service Operations window.
    If I go back and point to AModelServide.cfc, the parent component, and hit next, I see all the remote methods that are defined in the parent component. So, either I am doing something wrong, or Data Services does not look at methods up the cfc prototype chain, which from an OOP standpoint means that instead of say creating one restful base class and being nice and DRY you can't. I.e. not OOP for data services. Is this a bug, or what?
    Anybody get data services to work with extended service components?
    Mark

    Thanks for the reply. Yes, I did compile all the Java and it
    works OK with a simple Java program. It just will not work in a
    Flex application.
    The java classes are:
    RRA:
    package blah.myPackage;
    import java.util.List;
    import java.util.Collection;
    import flex.data.DataSyncException;
    import flex.data.assemblers.AbstractAssembler;
    class RRA extends AbstractAssembler
    public Collection fill( List fillParameters )
    RRS service = new RRS();
    return service.getSome();
    RRS:
    package blah.myPackage;
    import java.util.ArrayList;
    import java.util.List;
    import java.sql.*;
    import flex.EORS.*;
    class RRS
    public List getSome()
    ArrayList list = new ArrayList();
    String str = "bob";
    RR rr = new RR(str);
    list.add(rr);
    return list;
    RR:
    package blah.myPackage;
    class RR
    private String name;
    public RR() { }
    public RR(String name)
    this.name = name;
    public String getName()
    return this.name;
    public void setName(String name)
    this.name = name;
    I started with something that retrieved data from a database
    but watered it down just to try and get some kind of communication
    between Flex and Java.

  • GZIP-Encoded HTTP Response in adobe air and flex data service

    Hello,
    I am using data centric service in flash builder 4 (beta 2) to call betfair web service. The application is working well.
    But betfair told me to set the encoding to gzip when requesting the web service. I had used httpHeaders to add new header.
             var bfHeader:Object=new Object();
             bfHeader["Accept-Encoding"]= "gzip";
             _serviceControl.httpHeaders = bfHeader;
    Now when I run the application, network monitor shows both the request and response is encoded in gzip format, network monitor itself uncompressed the content and showed it. But I don't know how to uncompress the content. As the content is compressed, I could not call any data service.
    I have tried to use the convertResultHandler. But actually don't know how to use it correctly.
    Please help me. Its important
    Thanks in advance.

    Hello bahar08
    Its been a long while since you posted your topic but I've just found it after being getting stuck with this exact problem. There is a gzip decompressor my Danny Patterson that might help. I've added the header in as well but the responces don't seem to be coming down in a compressed format.
    It would be cool to chat with you about this.

  • Flex data services and data managment.

    Hi!
    I have a question about data services with data managment enabled in Adobe Flex Builder 4. The issue is more theoretical than practical.
    When I need to remove an item from the DataProvider  I use the delete method of autogenerated service, but when I need to add or update item in DataProvider, I use methods of DataProvider ArrayCollection directly (addItem ...). When I try to remove item from the DataProvider with removeAt method, no changes made to database after commit. Why and how this stuff works?
    P.S. Sorry for my bad English, I use Google transltate.

    Thanks for the reply. Yes, I did compile all the Java and it
    works OK with a simple Java program. It just will not work in a
    Flex application.
    The java classes are:
    RRA:
    package blah.myPackage;
    import java.util.List;
    import java.util.Collection;
    import flex.data.DataSyncException;
    import flex.data.assemblers.AbstractAssembler;
    class RRA extends AbstractAssembler
    public Collection fill( List fillParameters )
    RRS service = new RRS();
    return service.getSome();
    RRS:
    package blah.myPackage;
    import java.util.ArrayList;
    import java.util.List;
    import java.sql.*;
    import flex.EORS.*;
    class RRS
    public List getSome()
    ArrayList list = new ArrayList();
    String str = "bob";
    RR rr = new RR(str);
    list.add(rr);
    return list;
    RR:
    package blah.myPackage;
    class RR
    private String name;
    public RR() { }
    public RR(String name)
    this.name = name;
    public String getName()
    return this.name;
    public void setName(String name)
    this.name = name;
    I started with something that retrieved data from a database
    but watered it down just to try and get some kind of communication
    between Flex and Java.

Maybe you are looking for

  • Print quality problems with bluetooth Canon ip90 printer?

    I've had this problem on prior PBs and the canon website is decidely NOT helpful so here goes.... I have a pixma ip90v printer with a bluetooth adaptor added to my MBook. It prints fine and I had no problems adding it to my new computer (it was origi

  • Pdfs print fine with preview, not at all with adobe reader

    this is a relatively new issue that popped up sometime in the last month or so. when i try to print any pdf document with adobe reader, to my HP laserjet P1505, i get the following error: /usr/libexec/cups/filter/pstoraster failed if i open up the sa

  • Please answer fast as much as possible

    i m using hpdv6 and want to istall haxm  in it but error accured that visulization tecnology not supported what i do for it please answred me. me in so much trouble?????????????????????

  • Service application database 2010 migration to 2013

    If we want to migrate e.g. only Managed metadata service application database from 2010 to 2013 environment what will be exact steps? (I know for content db we have to use Powershell Mount command).  But I guess in case of service application databas

  • Problem to use SAPServer Class with load balancing

    Hello, We use the SAPServer Class from SAP .Net Connector 1.0. On our system, we want to start the RFC Server to use the logon group. I didn't find how to use ServerMessage and LogonGroup with one of constructors. When we start the SAPServer with the