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]>
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
>
> 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
>
> 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/webadm
> in.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]> wrote:
>>
>> Gavin,
>>>
>>> it looks to me like GeodesyML is a GML 3.2.1 application schema:
>>> 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-
>>> schema/supported-gml-versions.html
>>> http://docs.geoserver.org/latest/en/user/data/app-
>>> schema/secondary-namespaces.html
>>>
>>> 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/
>>> 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).
>>>
>>> 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/>  . 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
>>>> >
>>>>
>>>   ,
>>>
>>>> with supporting documentation  here
>>>> <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/
>>>>
>>> monumentInfo.xsd
>>>
>>>> <https://github.com/GeoscienceAustralia/GeodesyML/blob/master/schemas/
>>>>
>>> monumentInfo.xsd>
>>>
>>>>
>>>>
>>>>
>>>> *The GeodesyML.xsd file:*
>>>> https://github.com/GeoscienceAustralia/GeodesyML/
>>>>
>>> blob/master/schemas/geodesyML.xsd
>>>
>>>> <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";
>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>>> xsi:schemaLocation="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</uri>
>>>> </Namespace>
>>>> <Namespace>
>>>> <prefix>gmd</prefix>
>>>> <uri>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</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</schemaUri>
>>>> </FeatureType>
>>>> </targetTypes>
>>>> <typeMappings>
>>>> <FeatureTypeMapping>
>>>> <sourceDataStore>thedb</sourceDataStore>
>>>> <sourceType>geoml_monuments</sourceType>
>>>>
>>>> <targetElement>geo:GeodesyML</targetElement>
>>>>
>>>> <attributeMappings>
>>>> <AttributeMapping>
>>>>
>>>>
>>>> <targetAttribute>geo:siteIdentificationType/geo:siteName</ta
>>>> rgetAttribute>
>>>>
>>>
>>> <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";
>>>> xmlns:ows="http://www.opengis.net/ows";
>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="1.0.0"
>>>> xsi:schemaLocation="http://www.opengis.net/ows
>>>> http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExcepti
>>>> onReport.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#description,
>>>> http://www.opengis.net/gml/3.2#descriptionReference,
>>>> http://www.opengis.net/gml/3.2#identifier,
>>>> http://www.opengis.net/gml/3.2#name,
>>>> http://www.opengis.net/gml/3.2#boundedBy,
>>>> http://www.opengis.net/gml/3.2#location,
>>>> 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, 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
>>>
>>>> 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
>>>>
>>>>
>>> --
>>> 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
>>>
>>>
>>> ------------------------------
>>> 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-
>>> tp5324416p5324569.html
>>> To unsubscribe from App-Schema Mapping File to GeodesyML, click here
>>> <http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jt
>>> p?macro=unsubscribe_by_code&node=5324416&code=bWVkbGV5QHVuYX
>>> Zjby5vcmd8NTMyNDQxNnwyNTQxODQ1NDQ=>
>>> .
>>> NAML
>>> <http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jt
>>> p?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&b
>>> ase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.
>>> template.NabbleNamespace-nabble.view.web.template.NodeNamesp
>>> ace&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]
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>
> --
> Ben Caradoc-Davies <[email protected]>
>
> Director
> Transient Software Limited <http://transient.nz/>
> New Zealand
>



-- 
*Gavin Medley*
*USIP Intern*
*UNAVCO*
[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

Reply via email to