[Geoserver-users] XSLT WFS output format issue

Hi,

I am trying to transform gml2 wfs to html format (and eventually custom xml
format), following the instructions described on:

http://docs.geoserver.org/stable/en/user/extensions/xslt/index.html

I put two config files for a specific feature type in
$GEOSERVER_DATA_DIR/wfs/transform folder:
     quake.xml
     gml2html.xslt

the transformation works fine for the HTML output:

http://localhost:8081/geoserver/gns/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=quake&maxFeatures=50&outputFormat=HTML

However, the request for GML itself no longer works for all feature types:

http://localhost:8081/geoserver/sf/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=sf:roads&maxFeatures=50&outputFormat=GML2

the messages is:

<ServiceExceptionReport version="1.2.0"
xsi:schemaLocation="http://www.opengis.net/ogc
http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd&quot;&gt;
<ServiceException>
      java.lang.RuntimeException: Multiple responses: (class
org.geoserver.wfs.request.FeatureCollectionResponse$WFS11)
Multiple responses: (class
org.geoserver.wfs.request.FeatureCollectionResponse$WFS11)
</ServiceException>
</ServiceExceptionReport>

Is it possible to keep the gml output while still be able to get the
transformed output?

Thanks,

Sige

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/XSLT-WFS-output-format-issue-tp5051082.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Fri, May 3, 2013 at 1:09 AM, Sige <sigenz@anonymised.com> wrote:

Hi,

I am trying to transform gml2 wfs to html format (and eventually custom xml
format), following the instructions described on:

http://docs.geoserver.org/stable/en/user/extensions/xslt/index.html

I put two config files for a specific feature type in
$GEOSERVER_DATA_DIR/wfs/transform folder:
     quake.xml

Can you share the contents of this file?

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Hi Andrea,

Thank you for your response. It magically worked after restarting tomcat.

BTW. is it possible to transform a feature to multiple output format, like:

<transform>
    <sourceFormat>text/xml; subtype=gml/2.1.2</sourceFormat>
    <outputFormat>html</outputFormat>
    <outputMimeType>text/html</outputMimeType>
    <fileExtension>html</fileExtension>
    <xslt>gml2table.xslt</xslt>
    <featureType>
        <id>topp:states</id>
    </featureType>
</transform>

<transform>
    <sourceFormat>text/xml; subtype=gml/2.1.2</sourceFormat>
    <outputFormat>xml</outputFormat>
    <outputMimeType>text/xml</outputMimeType>
    <fileExtension>html</fileExtension>
    <xslt>gml2xml.xslt</xslt>
    <featureType>
        <id>topp:states</id>
    </featureType>
</transform>

Cheers,

Sige

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/XSLT-WFS-output-format-issue-tp5051082p5051457.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi,

We are encountering similar behaviour:

When we run geoserver-2.3.1 with XSLT-plugin in Classpath every simple WFS
GetFeature (notice: without XSLT Transformation) ends up with a WFS
ServiceException saying:

java.lang.RuntimeException: Multiple responses: (class
org.geoserver.wfs.request.FeatureCollectionResponse$WFS11)
Multiple responses: (class
org.geoserver.wfs.request.FeatureCollectionResponse$WFS11)

If the xslt-plugin is removed and geoserver restarted, WFS works just fine
again.

cheers Rudi

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/XSLT-WFS-output-format-issue-tp5051082p5051509.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Ciao Rudolf,
this should get fixed early next week. Please, watch the JIRA created by andrea.

Regards,
Simone Giannecchini

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

On Mon, May 6, 2013 at 10:21 AM, Rudolf <rudolf.hochmeister@anonymised.com> wrote:

Hi,

We are encountering similar behaviour:

When we run geoserver-2.3.1 with XSLT-plugin in Classpath every simple WFS
GetFeature (notice: without XSLT Transformation) ends up with a WFS
ServiceException saying:

java.lang.RuntimeException: Multiple responses: (class
org.geoserver.wfs.request.FeatureCollectionResponse$WFS11)
Multiple responses: (class
org.geoserver.wfs.request.FeatureCollectionResponse$WFS11)

If the xslt-plugin is removed and geoserver restarted, WFS works just fine
again.

cheers Rudi

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/XSLT-WFS-output-format-issue-tp5051082p5051509.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

On Sun, May 5, 2013 at 11:16 PM, Sige <sigenz@anonymised.com> wrote:

Hi Andrea,

Thank you for your response. It magically worked after restarting tomcat.

BTW. is it possible to transform a feature to multiple output format, like:

<transform>
    <sourceFormat>text/xml; subtype=gml/2.1.2</sourceFormat>
    <outputFormat>html</outputFormat>
    <outputMimeType>text/html</outputMimeType>
    <fileExtension>html</fileExtension>
    <xslt>gml2table.xslt</xslt>
    <featureType>
        <id>topp:states</id>
    </featureType>
</transform>

<transform>
    <sourceFormat>text/xml; subtype=gml/2.1.2</sourceFormat>
    <outputFormat>xml</outputFormat>
    <outputMimeType>text/xml</outputMimeType>
    <fileExtension>html</fileExtension>
    <xslt>gml2xml.xslt</xslt>
    <featureType>
        <id>topp:states</id>
    </featureType>
</transform>

Yes, you can do that. Mind, text/xml might be a bit generic, it might end
colliding with another
output format in the future, it that happens the requests will stop working.
Maybe use something looking like:
text/xml; subtype=giveItANameHere

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Hi,

I’ve seen the updates of GeoServer for SQL server on http://blog.geoserver.org/. But I can’t find any information if it is compatible with SQL server 2012. Any one got GeoServer Working with SQL Server 2012? I need to make sure it works before we purchase SQL server 2012 license.

“A couple of changes in the SQL Server data increase performance, provided you enable the relevant flags. One is the ability to transfer geometries in SQL Server native format, as opposed to using WKB, which avoids the slow WKB generation routines included in SQL Server, the other allows to disable native paging, which can sometimes lead the SQL Server query planner to create bad data access plans (GEOS-5750 and GEOS-5314). The native geometry serialization was sponsored by Norwegian Directorate for Nature Management and performed by Bouvet, thanks to Stewart Loving-Gibbard for the paging patch.”

Thanks!
Meichun

On Fri, May 17, 2013 at 4:55 PM, Meichun Li <pcloudy2005@anonymised.com> wrote:

Hi,****
I’ve seen the updates of GeoServer for SQL server on
http://blog.geoserver.org/. But I can’t find any information if it is
compatible with SQL server 2012. Any one got GeoServer Working with SQL
Server 2012? I need to make sure it works before we purchase SQL server
2012 license.****
“A couple of changes in the SQL Server data increase performance, provided
you enable the relevant flags. One is the ability to transfer geometries in
SQL Server native format, as opposed to using WKB, which avoids the slow
WKB generation routines included in SQL Server, the other allows to disable
native paging, which can sometimes lead the SQL Server query planner to
create bad data access plans (GEOS-5750<http://jira.codehaus.org/browse/GEOS-5750&gt;and
GEOS-5314 <http://jira.codehaus.org/browse/GEOS-5314&gt;\). The native
geometry serialization was sponsored by Norwegian Directorate for Nature
Management and performed by Bouvet, thanks to Stewart Loving-Gibbard for
the paging patch.”

Eh, don't know. I only have SQL Server 2008 locally, maybe Bouvet or
Stewart have more recent news...

Cheers
Andrea

--

GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------