@Override
public void write(FeatureCollectionType results, GetFeatureInfoRequest fInfoReq,
OutputStream out) throws ServiceException, IOException {
// the 'response' object we'll pass to our OutputFormat
FeatureCollectionType features = WfsFactory.eINSTANCE.createFeatureCollectionType();
// the 'request' object we'll pass to our OutputFormat
GetFeatureType gfreq = WfsFactory.eINSTANCE.createGetFeatureType();
gfreq.setBaseUrl(fInfoReq.getBaseUrl());
for (Iterator i = results.getFeature().iterator(); i.hasNext();) {
SimpleFeatureCollection fc = (SimpleFeatureCollection) i.next();
features.getFeature().add(fc);
QueryType qt = WfsFactory.eINSTANCE.createQueryType();
String crs = GML2EncodingUtils.epsgCode(fc.getSchema().getCoordinateReferenceSystem());
if (crs != null) {
final String srsName = "EPSG:" + crs;