Expose your data layer as RESTful services using one of many tools, such as the JAX-RS server Jersey or other of the many toolkits (I am assuming that you have your data services written in Java given the reference to GWS).
Hook up the GWT and Flex to the restful services, eg using How to access REST service in Actionscript 3? or for GWT, see How to call RESTFUL services from GWT?
Then GWT and Flex both operate on the same data layer in a MVP pattern, where GWT/Flex is VP and the RESTful services are M.
I was involved in several projects that did this to great success.
The following question is also worth reviewing: Should I build a REST backend for GWT application