I'm experimenting with MapServer and SOS but I'm not getting back any useful data from the GetObservation call I'm doing. My .map file uses a Postgres query to get data and when I run that same query in PGAdmin I get the four columns I expect: id, geom, date and total_alkalinity_value. All the columns have the right data. Below is the getObservation response in which I see only the gml:boundedBy and ms:msGeometry values, no sign of the date, id or total_alkalinity_value.
<om:ObservationCollection xmlns:gml="http://www.opengis.net/gml" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:swe="http://www.opengis.net/swe/1.0.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sos="http://www.opengis.net/sos/1.0" xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:om="http://www.opengis.net/om/1.0" gml:id="WQIS_TOTAL_ALKALINITY" xsi:schemaLocation="http://www.opengis.net/om/1.0 http://schemas.opengis.net/om/1.0.0/om.xsd http://mapserver.gis.umn.edu/mapserver http://wqis-sos.test.niwa.co.nz/cgi-bin/wqis-sos?service=WFS&version=1.1.0&request=DescribeFeatureType&typename=total_alkalinity">
<om:member>
<om:Observation>
<om:samplingTime>
<gml:TimeInstant>
<gml:timePosition>1989-04-12</gml:timePosition>
</gml:TimeInstant>
</om:samplingTime>
<om:procedure xlink:href="urn:ogc:def:procedure:ALKALINITY_SENSOR"80"/>
<om:observedProperty>
<swe:CompositePhenomenon gml:id="total_alkalinity_value" dimension="3">
<swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:id"/>
<swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:date"/>
<swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:total_alkalinity_value"/>
</swe:CompositePhenomenon>
</om:observedProperty>
<om:featureOfInterest xlink:href="http://wqis-sos.test.niwa.co.nz/cgi-bin/wqis-sos?service=WFS&version=1.1.0&request=DescribeFeatureType&typename=total_alkalinity"/>
<om:result>
<gml:featureMember>
<ms:total_alkalinity>
<gml:boundedBy>
<gml:Envelope srsName="urn:ogc:crs:epsg:4326" srsDimension="2">
<gml:lowerCorner>167.294382 -46.243591</gml:lowerCorner>
<gml:upperCorner>167.294382 -46.243591</gml:upperCorner>
</gml:Envelope>
</gml:boundedBy>
<ms:msGeometry>
<gml:Point srsName="urn:ogc:crs:epsg:4326" srsDimension="2">
<gml:pos>167.294382 -46.243591</gml:pos>
</gml:Point>
</ms:msGeometry>
</ms:total_alkalinity>
</gml:featureMember>
</om:result>
</om:Observation>
</om:member>
</om:ObservationCollection>
And here is the relevant stuff from the layer part of the .map file
LAYER
....
METADATA
....
"sos_timeitem" "date"
"sos_procedure" "ALKALINITY_SENSOR"
"sos_procedure_item" "total_alkalinity_value"
"sos_offering_id" "WQIS_TOTAL_ALKALINITY"
"sos_observedproperty_id" "Total Alkalinity"
"sos_describesensor_url" "http://wqis-sos.test.niwa.co.nz/ALKALINITY_SENSOR.xml"
So my question is: How do I get date, id and total_alkalinity_value in my getObservation response?
updated to show more of the .map file and add sos_dateitem