Hi,

There is an issue that discuss the MIME type override:
https://osgeo-org.atlassian.net/browse/GEOS-8224

Resuming the discussing,  MIME type and file extensions are related but are two 
different things.
The fix made for WFS 2.0 changed the default MIME type for WFS 2.0 GML32 
responses, but didn't
do anything about the file extension.

The browser and pretty much any other client that needs to something with the 
content
will look at the MIME type to interpret the content.

So changing the MIME type should make your browser show the response content 
but will not do
nothing about the file extension (that's another issue).

So if you select let's say 'text\xml' as the override MIME type and do a 
GetFeature request does the
response get display in the browser ? and if not which MIME does you response 
have ?

Regarding the drop-down menu in the WFS settings. In GeoServer it is possible 
to configure a
service settings per workpsace (virtual services). The blank represents the 
global service configuration
and the other values (in your case sar) should correspond to existing 
workspaces and allows
you to configure those workspaces virtual service settings.

You can read more about GeoServer virtual services here:
http://docs.geoserver.org/stable/en/user/configuration/virtual-services.html

Regards,

Nuno Oliveira

On 07/21/2017 06:48 PM, Gavin Medley wrote:
Hi Ben,

With regards to the GML 3.2 MIME type issue, your solution didn't work for me 
using 2.12 nightly build from mid June. However I believe that the issue is 
that changing the MIME type via the dropdown menu in WFS settings doesn't seem 
to do anything. I get .application files no matter what I select. However, I 
have not tried restarting Geoserver after applying settings. Does changing 
these settings require a restart???

Also, I've noticed that there is a workspace dropdown menu in the WFS settings page but it only 
offers "    " and "sar" as options. What is that dropdown for?

-Gavin


On Thu, Jun 22, 2017 at 1:38 PM, Ben Caradoc-Davies <[email protected] 
<mailto:[email protected]>> wrote:

    Gavin,

    I have not looked at the types involved in your case, but one of the new 
changes on master is more thorough searching of substitution groups when 
encoding properties of complex types:

    [GEOT-5667] Fix app-schema property substitution group support
    https://osgeo-org.atlassian.net/browse/GEOT-5667 
<https://osgeo-org.atlassian.net/browse/GEOT-5667>

    This has not yet been backported to stable (2.11.x). I was wondering about 
performance and would like to benchmark it before backporting.

    The new default "application/gml+xml; version=3.2" MIME type is a recent 
fix on master to conform to WFS 2.0:

    [GEOS-8140] GeoServer uses invalid mime type for GML 3.2 responses
    https://osgeo-org.atlassian.net/browse/GEOS-8140 
<https://osgeo-org.atlassian.net/browse/GEOS-8140>

    You can change the MIME type back to "text/xml; subtype=gml/3.2" or 
"text/xml" in the global WFS settings, which will cause it to be displayed in your 
browser:
    
http://docs.geoserver.org/latest/en/user/services/wfs/webadmin.html#override-gml-3-2-mime-type
 
<http://docs.geoserver.org/latest/en/user/services/wfs/webadmin.html#override-gml-3-2-mime-type>

    Kind regards,
    Ben.

    On 23/06/17 02:46, medley wrote:

        Hi everyone,

        I just wanted to follow up on the subject of using Geoserver App Schema 
to
        output WFS requests in the GeodesyML schema. I found a solution but I 
can't
        explain why it works.

        First, in the example mapping file I provided (quoted down below) my
        <targetAttribute> XPath was incorrect. It should have read
        geo:siteLog/geo:siteIdentification/geo:siteName. However, upon 
implementing
        the correct XPath the output still didn't resolve. *I upgraded my 
Geoserver
        instance from 2.11.1 to 2.12 SNAPSHOT and suddenly it worked.* Perhaps

        someone else can explain why but it seems that 2.11 has problems 
resolving
        XPaths when abstract XML types are involved.

        Lastly, for some reason the GeodesyML output file gets automatically
        downloaded with a .application extension rather than displaying in the
        browser; also not sure why. I hope this can save someone frustration 
down
        the line.

        -Gavin

        On Sat, Jun 17, 2017 at 9:34 PM, Ben Caradoc-Davies-2 [via OSGeo.org] <
        [email protected] 
<mailto:ml%[email protected]>> wrote:

            Gavin,

            it looks to me like GeodesyML is a GML 3.2.1 application schema:
            https://github.com/GeoscienceAustralia/GeodesyML/ 
<https://github.com/GeoscienceAustralia/GeodesyML/>

            This means that it will only work with GML 3.2 output from 
GeoServer.
            Either select a GML 3.2 output format, use WFS 2.0 (which defaults 
to
            GML 3.2), or manually add outputformat=gml32 to a WFS 1.1 request.

            You will likely also have to define secondary namespaces:
            http://docs.geoserver.org/latest/en/user/data/app- 
<http://docs.geoserver.org/latest/en/user/data/app->
            schema/supported-gml-versions.html
            http://docs.geoserver.org/latest/en/user/data/app- 
<http://docs.geoserver.org/latest/en/user/data/app->
            schema/secondary-namespaces.ht <http://secondary-namespaces.ht>ml

            schemaUri must be a URL. You can have multiple elements. The 
top-level
            one might be this, but I do not know if it includes 
monumentInfo.xsd:
            https://github.com/GeoscienceAustralia/GeodesyML/ 
<https://github.com/GeoscienceAustralia/GeodesyML/>
            blob/master/schemas/geodesyML.xsd

            app-schema will cache it for you. Use a better URL if you have one 
(e.g.
            from geodesyml.org <http://geodesyml.org>).

            I do not know GeodesyML and do not know what type you should choose.
            Perhaps geo:Site? This is the thing that goes on targetElement.

            Where is the siteName you mentioned? Could you use the gml:name
            inherited from gml:AbstractFeatureType? The property name goes in
            targetAttribute.

            Deciding how to map your database to the XML schema is, according to
            reports, 2/3 of the work.

            Kind regards,
            Ben.

            On 16/06/17 10:53, medley wrote:

                Hi,

                I am trying to have a Geoserver display GML its output in the 
GeodesyML
                schema, outlined  here
                <https://geoscienceaustralia.github.io/GeodesyML-Github-Pages/ 
<https://geoscienceaustralia.github.io/GeodesyML-Github-Pages/>> . In
                particular, I am working with GPS monument meta data. For now 
I'm trying

            to

                just output the siteName in GeodesyML schema when I click GML 
in the

            Layers

                Preview in Geoserver. The relevant XML schema definition file 
for

            GeodesyML

                is called monumentInfo.xsd. Unfortunately, I can't seem to get 
the

            mapping

                correct from my database schema to GeodesyML. In particular I 
think the
                problem is in the <targetElement> or <targetAttribute> fields 
within
                <FeatureTypeMapping>. I concluded that I should use 
geo:GeodesyML as the
                argument to schemaUri because it is the only xsd file with a 
top level
                element (type GeodesyMLType).

                How can I use the schema outlined in the monumentInfo.xsd schema

            definition?

                Specifically here, how can I map site_name in my database 
schema to

            siteName

                in the GeodesyML schema?

                Any help is sincerely appreciated and I apologize if my lack of

            familiarity

                with XML is causing me to ask a silly question. I have done a 
fair bit

            of

                Google research. The tutorial I followed to get this far is  
here
                <http://docs.geoserver.org/latest/en/user/data/app-schema/tutorial.html 
<http://docs.geoserver.org/latest/en/user/data/app-schema/tutorial.html>>

              ,

                with supporting documentation  here
                <http://docs.geoserver.org/stable/en/user/data/app- 
<http://docs.geoserver.org/stable/en/user/data/app->

            schema/mapping-file.html>

                but they are using GeoscienceML, not GeodesyML.

                -Gavin Medley


                *The view I am querying, called geoml_monuments contains:*
                id | station_code | site_name | geolocation | iers_domex | 
country_name
                I am pretty sure this is fine.



                *The monumentsInfo.xsd file:*
                https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/ 
<https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/>

            monumentInfo.xsd

                
<https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/ 
<https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/>

            monumentInfo.xsd>




                *The GeodesyML.xsd file:*
                https://github.com/GeoscienceAustralia/GeodesyML/ 
<https://github.com/GeoscienceAustralia/GeodesyML/>

            blob/master/schemas/geodesyML.xsd

                <https://github.com/GeoscienceAustralia/GeodesyML/ 
<https://github.com/GeoscienceAustralia/GeodesyML/>

            blob/master/schemas/geodesyML.xsd>





                *My mapping file:*



                <?xml version="1.0" encoding="UTF-8"?>
                <as:AppSchemaDataAccess
                xmlns:as="http://www.geotools.org/app-schema 
<http://www.geotools.org/app-schema>"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 
<http://www.w3.org/2001/XMLSchema-instance>"
                xsi:schemaLocation="http://www.geotools.org/app-schema 
<http://www.geotools.org/app-schema>
                AppSchemaDataAccess.xsd">
                <namespaces>
                <Namespace>
                <prefix>geo</prefix>
                <uri>urn:xml-gov-au:icsm:egeodesy:0.4</uri>
                </Namespace>
                <Namespace>
                <prefix>gml</prefix>
                <uri>http://www.opengis.net/gml/3.2 
<http://www.opengis.net/gml/3.2></uri>
                </Namespace>
                <Namespace>
                <prefix>gmd</prefix>
                <uri>http://www.isotc211.org/2005/gmd 
<http://www.isotc211.org/2005/gmd></uri>
                </Namespace>
                </namespaces>
                <includedTypes></includedTypes>
                <sourceDataStores>
                <DataStore>
                <id>thedb</id>
                <parameters>
                <Parameter>
                            <name>dbtype</name>
                            <value>postgisng</value>
                        </Parameter>
                        <Parameter>
                            <name>host</name>
                            <value>thedatabaselocation.unavco.org 
<http://thedatabaselocation.unavco.org></value>
                        </Parameter>
                        <Parameter>
                            <name>port</name>
                            <value>5432</value>
                        </Parameter>
                        <Parameter>
                            <name>database</name>
                            <value>tst3</value>
                        </Parameter>
                        <Parameter>
                            <name>user</name>
                            <value>theuser</value>
                        </Parameter>
                        <Parameter>
                            <name>passwd</name>
                <value>thepassword</value>
                        </Parameter>
                    </parameters>
                </DataStore>
                </sourceDataStores>
                <catalog></catalog>
                <targetTypes>
                <FeatureType>
                <schemaUri>http://localhost/geodesyML_schemas/geodesyML.xsd 
<http://localhost/geodesyML_schemas/geodesyML.xsd></schemaUri>
                </FeatureType>
                </targetTypes>
                <typeMappings>
                <FeatureTypeMapping>
                <sourceDataStore>thedb</sourceDataStore>
                <sourceType>geoml_monuments</sourceType>

                <targetElement>geo:GeodesyML</targetElement>

                <attributeMappings>
                <AttributeMapping>


                
<targetAttribute>geo:siteIdentificationType/geo:siteName</targetAttribute>


                <sourceExpression><OCQL>site_name</OCQL></sourceExpression>
                </AttributeMapping>

                </attributeMappings>
                </FeatureTypeMapping>
                </typeMappings>
                </as:AppSchemaDataAccess>




                *The output upon clicking GML from Layer Preview:*

                <ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema 
<http://www.w3.org/2001/XMLSchema>"
                xmlns:ows="http://www.opengis.net/ows 
<http://www.opengis.net/ows>"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 
<http://www.w3.org/2001/XMLSchema-instance>" version="1.0.0"
                xsi:schemaLocation="http://www.opengis.net/ows 
<http://www.opengis.net/ows>
                http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd 
<http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd>">


                <ows:Exception exceptionCode="NoApplicableCode">
                <ows:ExceptionText>
                java.lang.RuntimeException: Error applying mapping with 
targetAttribute
                geo:siteIdentificationType/geo:siteName Error applying mapping 
with
                targetAttribute geo:siteIdentificationType/geo:siteName
                geo:siteIdentificationType is not a valid location path for type
                urn:xml-gov-au:icsm:egeodesy:0.4:GeodesyMLType.

            geo:siteIdentificationType

                ns: urn:xml-gov-au:icsm:egeodesy:0.4, GeodesyMLType properties:
                http://www.opengis.net/gml/3.2#metaDataProperty 
<http://www.opengis.net/gml/3.2#metaDataProperty>,
                http://www.opengis.net/gml/3.2#description 
<http://www.opengis.net/gml/3.2#description>,
                http://www.opengis.net/gml/3.2#descriptionReference 
<http://www.opengis.net/gml/3.2#descriptionReference>,
                http://www.opengis.net/gml/3.2#identifier 
<http://www.opengis.net/gml/3.2#identifier>,
                http://www.opengis.net/gml/3.2#name 
<http://www.opengis.net/gml/3.2#name>,
                http://www.opengis.net/gml/3.2#boundedBy 
<http://www.opengis.net/gml/3.2#boundedBy>,
                http://www.opengis.net/gml/3.2#location 
<http://www.opengis.net/gml/3.2#location>,
                http://www.opengis.net/gml/3.2#validTime 
<http://www.opengis.net/gml/3.2#validTime>,
                urn:xml-gov-au:icsm:egeodesy:0.4#Node,
                urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPosition,
                urn:xml-gov-au:icsm:egeodesy:0.4#PositionPairCovariance,
                urn:xml-gov-au:icsm:egeodesy:0.4#Site,
                urn:xml-gov-au:icsm:egeodesy:0.4#siteVisit,
                urn:xml-gov-au:icsm:egeodesy:0.4#Monument,
                urn:xml-gov-au:icsm:egeodesy:0.4#SupplementaryMark,
                urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurement,
                urn:xml-gov-au:icsm:egeodesy:0.4#Instrument,
                urn:xml-gov-au:icsm:egeodesy:0.4#Sensor,
                urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPositionSource,
                urn:xml-gov-au:icsm:egeodesy:0.4#AbstractPositionEstimator,
                urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurementSource,
                urn:xml-gov-au:icsm:egeodesy:0.4#AbstractMeasurementOperation,
                urn:xml-gov-au:icsm:egeodesy:0.4#AbstractDefinitionSource,
                urn:xml-gov-au:icsm:egeodesy:0.4#AbstractDefinitionOperation,
                urn:xml-gov-au:icsm:egeodesy:0.4#AbstractSiteLog,
                urn:xml-gov-au:icsm:egeodesy:0.4#Project,
                urn:xml-gov-au:icsm:egeodesy:0.4#Document,
                urn:xml-gov-au:icsm:egeodesy:0.4#Setup,
                urn:xml-gov-au:icsm:egeodesy:0.4#TerrestrialReferenceFrame,
                urn:xml-gov-au:icsm:egeodesy:0.4#DynamicTransformation,
                http://www.opengis.net/gml/3.2#AbstractCRS 
<http://www.opengis.net/gml/3.2#AbstractCRS>, null#FEATURE_LINK,
                null#FEATURE_LINK
                </ows:ExceptionText>
                </ows:Exception>
                </ows:ExceptionReport>



                --
                View this message in context: http://osgeo-org.1560.x6.

            nabble.com/App-Schema-Mapping-File-to-GeodesyML-tp5324416.html 
<http://nabble.com/App-Schema-Mapping-File-to-GeodesyML-tp5324416.html>

                Sent from the GeoServer - User mailing list archive at 
Nabble.com.

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


                Check out the vibrant tech community on one of the world's most
                engaging tech sites, Slashdot.org! http://sdm.link/slashdot
                _______________________________________________
                Geoserver-users mailing list
                [hidden email] 
<http:///user/SendEmail.jtp?type=node&node=5324569&i=0>
                https://lists.sourceforge.net/lists/listinfo/geoserver-users 
<https://lists.sourceforge.net/lists/listinfo/geoserver-users>


            --
            Ben Caradoc-Davies <[hidden email]
            <http:///user/SendEmail.jtp?type=node&node=5324569&i=1>>
            Director
            Transient Software Limited <http://transient.nz/>
            New Zealand

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

            Check out the vibrant tech community on one of the world's most
            engaging tech sites, Slashdot.org! http://sdm.link/slashdot
            _______________________________________________
            Geoserver-users mailing list
            [hidden email] 
<http:///user/SendEmail.jtp?type=node&node=5324569&i=2>
            https://lists.sourceforge.net/lists/listinfo/geoserver-users 
<https://lists.sourceforge.net/lists/listinfo/geoserver-users>


            ------------------------------
            If you reply to this email, your message will be added to the 
discussion
            below:
            http://osgeo-org.1560.x6.nabble.com/App-Schema-Mapping-File-to-GeodesyML- 
<http://osgeo-org.1560.x6.nabble.com/App-Schema-Mapping-File-to-GeodesyML->
            tp5324416p5324569.html
            To unsubscribe from App-Schema Mapping File to GeodesyML, click here
            
<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5324416&code=bWVkbGV5QHVuYXZjby5vcmd8NTMyNDQxNnwyNTQxODQ1NDQ=
 
<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5324416&code=bWVkbGV5QHVuYXZjby5vcmd8NTMyNDQxNnwyNTQxODQ1NDQ=>>
            .
            NAML
            
<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
 
<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>>






        
------------------------------------------------------------------------------
        Check out the vibrant tech community on one of the world's most
        engaging tech sites, Slashdot.org! http://sdm.link/slashdot



        _______________________________________________
        Geoserver-users mailing list
        [email protected] 
<mailto:[email protected]>
        https://lists.sourceforge.net/lists/listinfo/geoserver-users 
<https://lists.sourceforge.net/lists/listinfo/geoserver-users>


-- Ben Caradoc-Davies <[email protected] <mailto:[email protected]>>

    Director
    Transient Software Limited <http://transient.nz/>
    New Zealand




--
*Gavin Medley*
/USIP Intern/
*/UNAVCO/*
[email protected] <mailto:[email protected]>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Regards,
Nuno Oliveira
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V 
for more information.
==

Nuno Miguel Carvalho Oliveira
@nmcoliveira
Software Engineer

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:      +39 0584 1660272

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

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i 
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo 
è consentito esclusivamente al destinatario del messaggio, per le finalità 
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne 
il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di 
procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro 
sistema. Conservare il messaggio stesso, divulgarlo anche in parte, 
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, 
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to