views:

109

answers:

1

Flex newb here. I'm working in flashbuilder 4 (flex4?), and am being asked to create the client-side data services integration 'layer' in a flex app. There is another team working on the actual UI/Presentation. Both parts must be deployed in a single swf.

If I use the data/services wizard to build out my service connections (and generate the ActionScript), is it possible to export these 'connections' so that they can easily be imported into another project? Or must they be defined through the wizard all over again? The other team wants to be able to see the connections appear in the new project's Data/Services inspector (IDE Tab).

Thanks!

+1  A: 

There is a way to do this but its a bit brutal. Go to the directory where your projects are located. Usually somewhere in your My Documents. And go to the directory of the project you want all the Data services from.

Find the ".model" directory and there you will find your "~project name~.fml" file. Now open a text editor and open that file. Copy past it in memory.

Make a new project. Then go to the new project folder, also to its ".model" folder and open the "~project name~.fml" file there. Delete what is inside and paste all that is in memory inside that file.

Don't forget to copy paste the valueObjects folder and the services folder from the old project. Within the new project you can then delete a service if you don't want to use it and from there on start your new project.

Hope this will help, and I hope Adobe will create a true import / export for this.

Richard
Yup! I found this also about a month ago by poking through those files. I ran into some weird problems in a project after doing this, so maybe it's a "user beware" approach. It would be nice if abode would let export these - but it appears that's reserved for only Live Cycle Data Service connections (of course). Ultimately, what I did was use the wizard to stub out the service api and response objects. Those AS files can easily be copied into another project (or module). Request objects were embedded as XML templates (we used xml over http), then just tostring into the service call.
mkraken