Hi,
I was not aware that multiple typeNames in a wfs request was possible
(and yes Andrea, next week I'm going to try the db linking to see how
that performes)
The reason I was not aware is that I use the post version and tried to
do a <wfs:Query typeName="Namespace1:Table1,Namespace2:Table1"
xmlns:Namesapce1= etc. etc....
This gives an error from geoserver: could not locate {http://path to
namespace}Table1, Namespace2:Table1
But trying it with 2 separate wfs:Query segments in the request gave a
wonderfull result.
Now I only have to figure out how the WFS protocol of OpenLayers needs
to be changed to create such a request 
Thanks for this help
Cheers Kris
-----Original Message-----
From: Andrea Aime [mailto:aaime@anonymised.com]
Sent: Friday, April 03, 2009 11:32 AM
To: Kris Geusebroek
Cc: geoserver-users@lists.sourceforge.net; Justin Deoliveira
Subject: Re: [Geoserver-users] Need to create a WFS request with
multiple Layers: How to code that?
Kris Geusebroek ha scritto:
Hi,
I have multiple databases with the same tables and need to create a
WFS
request to get data from all databases.
My featuretypes are created exactly the same with a separate
namespace.
For example Namespace1:Table1 and Namespace2:Table1
In WMS I can declare a basemapgroup so that I only need 1 request from
my client to get all data.
I want to create a similar concept in the WFS part of geoserver
(because
I don't want to get all data by firing 60 wfs requests from my client.
Can somebody tell me if something similar exists or how to start
coding
this in geoserver.
WFS standard does not have, and does not allow for, layer groups.
But you can list multiple layers in a request and get back a composite
feature collection.
For example (live request, you can try it out):
http://geo.openplans.org:8080/geoserver/wfs?request=GetFeature&version=1
.0.0&typeName=topp:tasmania_cities,topp:tasmania_water_bodies,topp:tasma
nia_roads
I also suggested in a previous mail you can use the database linking
abilities various database provide to build a single view out
of various database tables.
Introducing real layer group support _may_ be possible, but you'd
have to modify all the code that deals with describeFeatureType,
GetFeature, GetCapabilites, and we'd have to move the layer
group concept out of wms too. To make it right it would have to
be a huge patch 
Justin, what do you think? I guess DFT could return all the schemas
for all the types in the layer group, and GetFeature filters
could be replicated onto all ft as we do in GetFeature.
Basically, make WFS act a bit like WMS, where we do the
expansion from the single layer to the group inside the request
parsers, leaving the actual code oblivious the layer group even
exists. Makes for some clunky code in the KVP parser, and I'm
not sure how to fix the XML ones...
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.