Here's a weird one. At least to me.
Leaving out much of the details, I have the following 2 mappings:
<mapping type-name="esdp:StationDiscoveryRequestType" abstract="true"
class="edu.iris.ws.esdp.StationDiscoveryRequest">
<value name="UserToken" field="userToken"/>
<structure name="StationFilter" field="filter"
map-as="esdp:StationFilterType"/>
</mapping>
<mapping type-name="esdp:StationFilterType" abstract="true"
class="edu.iris.ws.esdp.StationFilter">
<structure name="SpatialBounds" field="spatialBounds"
usage="optional">
<structure name="BoundingBox" map-as="ogc:BBOXType"
usage="optional"/>
</structure>
<structure name="TimeRange" usage="optional" field="timePeriod">
<structure name="TimePeriod" map-as="gml:TimePeriodType"
usage="optional"/>
</structure>
<collection field="stationIds" usage="optional" >
<structure name="StationIdentifierFilter"
map-as="ws:StationIdType"/>
</collection>
<collection field="stationDataClass" usage="optional">
<value name="StationDataClass" />
</collection>
</mapping>
and in another included mapping file:
<namespace uri="http://www.opengis.net/ogc" prefix="ogc"
default="elements"/>
<mapping type-name="ogc:BBOXType" abstract="true"
class="edu.iris.ws.ogc.BoundingBox">
<value name="PropertyName" field="propertyName"/>
<structure ns="http://www.opengis.net/gml" name="Envelope"
field="envelope" map-as="gml:EnvelopeType"/>
</mapping>
The StationFilterType objects contains an ogc:BBOXType under the
SpatialBounds element.
This correctly produces XML messages like:
<soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<esdp:getStations xmlns:gml="http://www.opengis.net/gml"
xmlns:esdp="http://portal.earthscope.org">
<esdp:UserToken>me</esdp:UserToken>
<esdp:StationFilter xmlns:ogc="http://www.opengis.net/ogc">
<esdp:SpatialBounds>
<esdp:BoundingBox>
<ogc:PropertyName />
<gml:Envelope>
<gml:lowerCorner>47.03 -112.6</gml:lowerCorner>
<gml:upperCorner>47.06 -112.5</gml:upperCorner>
</gml:Envelope>
</esdp:BoundingBox>
</esdp:SpatialBounds>
</esdp:StationFilter>
</esdp:getStations>
</soapenv:Body>
</soapenv:Envelope>
Note <ogc:PropertyName />
So, if I change the first mapping such that the StationFilter element to
usage="optional", I get XML like:
<soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<esdp:getStations xmlns:gml="http://www.opengis.net/gml"
xmlns:esdp="http://portal.earthscope.org">
<esdp:UserToken>me</esdp:UserToken>
<esdp:StationFilter xmlns:ogc="http://www.opengis.net/ogc">
<esdp:SpatialBounds>
<esdp:BoundingBox>
<PropertyName />
<gml:Envelope>
<gml:lowerCorner>47.03 -112.6</gml:lowerCorner>
<gml:upperCorner>47.06 -112.5</gml:upperCorner>
</gml:Envelope>
</esdp:BoundingBox>
</esdp:SpatialBounds>
</esdp:StationFilter>
</esdp:getStations>
</soapenv:Body>
</soapenv:Envelope>0
Note <PropertyName /> with no namespace.
What's up with that?!?
attached are all the binding files.
<?xml version="1.0" encoding="UTF-8"?>
<binding xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.iris.edu/schema/misc/jibx/binding.xsd"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc">
<namespace uri="http://www.opengis.net/ogc" prefix="ogc" default="elements"/>
<mapping type-name="ogc:BBOXType" abstract="true" class="edu.iris.ws.ogc.BoundingBox">
<value name="PropertyName" field="propertyName"/>
<structure ns="http://www.opengis.net/gml" name="Envelope" field="envelope" map-as="gml:EnvelopeType"/>
</mapping>
</binding>
<?xml version="1.0" encoding="UTF-8"?>
<binding
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:gml="http://www.opengis.net/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.iris.edu/schema/misc/jibx/binding.xsd"
>
<namespace uri="http://www.opengis.net/gml" prefix="gml" default="elements"/>
<mapping type-name="gml:TimePeriodType" abstract="true"
class="edu.iris.ws.gml.TimePeriod">
<value field="start" name="beginPosition"/>
<value field="end" name="endPosition"/>
</mapping>
<mapping type-name="gml:EnvelopeType" abstract="true"
class="edu.iris.ws.gml.Envelope" >
<value field="lowerCorner" name="lowerCorner"
serializer="edu.iris.ws.gml.GeoPoint.serializePoint"
deserializer="edu.iris.ws.gml.GeoPoint.deserializePointString"/>
<value field="upperCorner" name="upperCorner"
serializer="edu.iris.ws.gml.GeoPoint.serializePoint"
deserializer="edu.iris.ws.gml.GeoPoint.deserializePointString"/>
</mapping>
</binding>
<binding add-constructors="true" force-classes="true"
xmlns:esdp="http://portal.earthscope.org"
xmlns:ws="http://www.iris.edu/ws/xsd">
<!-- include path="/Users/linus/workspace/IRIS_Schema/resources/bindings/base-binding.xml"/ -->
<!-- include path="/Users/linus/workspace/IRIS_Schema/resources/bindings/core-binding.xml"/ -->
<include path="esdp-binding.xml"/>
<include path="ogc-binding.xml"/>
<include path="gml-binding.xml"/>
</binding>
<?xml version="1.0" encoding="UTF-8"?>
<binding xmlns:esdp="http://portal.earthscope.org"
xmlns:ws="http://www.iris.edu/ws"
xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.iris.edu/schema/misc/jibx/binding.xsd">
<namespace uri="http://www.opengis.net/gml" prefix="gml"/>
<namespace uri="http://portal.earthscope.org" prefix="esdp" default="elements"/>
<mapping type-name="ws:StationIdType" abstract="true" class="edu.iris.ws.core.StationId">
<value name="networkCode" field="networkCode" style="attribute"/>
<value name="stationCode" field="stationCode" style="attribute"/>
</mapping>
<mapping type-name="esdp:DataType" abstract="true" class="edu.iris.ws.esdp.DataType">
<structure name="DataType">
<value name="id" field="id" style="attribute"/>
</structure>
</mapping>
<mapping type-name="esdp:DataProductType" abstract="true"
class="edu.iris.ws.esdp.DataProductType">
<structure name="DataProduct">
<value field="url" name="URL"/>
<structure field="timePeriod" name="TimePeriod" map-as="gml:TimePeriodType"/>
<value field="dataProductTypeId" name="dataProductTypeIdentifier" style="attribute"/>
<value field="dataTypeId" name="dataTypeIdentifier" style="attribute"/>
</structure>
</mapping>
<mapping type-name="esdp:DataProductTypeType" abstract="true"
class="edu.iris.ws.esdp.DataProductTypeType">
<value name="id" field="id" style="attribute"/>
</mapping>
<!--
<xs:sequence>
<xs:element name="SpatialBounds"
type="esdp:SpatialBoundsType" minOccurs="0" maxOccurs="1" />
<xs:element name="TimeRange"
type="esdp:TemporalBoundsType" minOccurs="0" maxOccurs="1" />
<xs:element name="StationIdentifierFilter"
type="esdp:WildcardableStationIdentifierType" minOccurs="0"
maxOccurs="unbounded" />
<xs:element name="StationDataClass"
type="data:DataClassNameType" maxOccurs="unbounded" minOccurs="0" />
</xs:sequence>
-->
<mapping type-name="esdp:StationFilterType" abstract="true"
class="edu.iris.ws.esdp.StationFilter">
<structure name="SpatialBounds" field="spatialBounds" usage="optional">
<structure name="BoundingBox" map-as="ogc:BBOXType" usage="optional"/>
</structure>
<structure name="TimeRange" usage="optional" field="timePeriod">
<structure name="TimePeriod" map-as="gml:TimePeriodType" usage="optional"/>
</structure>
<collection field="stationIds" usage="optional" >
<structure name="StationIdentifierFilter" map-as="ws:StationIdType"/>
</collection>
<collection field="stationDataClass" usage="optional">
<value name="StationDataClass" />
</collection>
</mapping>
<mapping class="java.lang.String" type-name="esdp:UserTokenType" abstract="true"/>
<mapping class="edu.iris.ws.esdp.StationDiscoveryRequest" name="getStations">
<structure map-as="esdp:StationDiscoveryRequestType"/>
</mapping>
<mapping type-name="esdp:StationDiscoveryRequestType" abstract="true"
class="edu.iris.ws.esdp.StationDiscoveryRequest">
<value name="UserToken" field="userToken"/>
<structure name="StationFilter" field="filter" map-as="esdp:StationFilterType"/>
</mapping>
<mapping class="edu.iris.ws.esdp.StationDiscoveryResponse" name="getStationsResponse">
<structure map-as="esdp:StationDiscoveryResponseType"/>
</mapping>
<mapping type-name="esdp:StationDiscoveryResponseType" abstract="true"
class="edu.iris.ws.esdp.StationDiscoveryResponse">
<structure name="Stations">
<collection field="stations" usage="optional">
<structure name="Station" map-as="esdp:StationInfoType"/>
</collection>
</structure>
</mapping>
<mapping class="edu.iris.ws.esdp.StationInfo" abstract="true" type-name="esdp:StationInfoType">
<structure ns="http://www.opengis.net/gml" name="boundedBy" >
<value name="lowerCorner" field="location" ns="http://www.opengis.net/gml"
serializer="edu.iris.ws.gml.GeoPoint.serializePointReducedPrecision"
deserializer="edu.iris.ws.gml.GeoPoint.deserializePointString"/>
<value name="upperCorner" field="location" ns="http://www.opengis.net/gml"
serializer="edu.iris.ws.gml.GeoPoint.serializePointReducedPrecision"
deserializer="edu.iris.ws.gml.GeoPoint.deserializePointString"/>
</structure>
<structure name="StationIdentifier" field="id" map-as="ws:StationIdType"/>
<!-- XXX This should not be constant. -->
<value name="DataClass" field="dataClassType" />
</mapping>
<!--
<mapping class="edu.iris.ws.esdp.StationInfo" abstract="true" type-name="esdp:StationInfoType">
<structure ns="http://www.opengis.net/gml" name="location" field="location">
<value ns="http://www.opengis.net/gml" name="latitude" field="lat"/>
<value ns="http://www.opengis.net/gml" name="longitude" field="lon"/>
</structure>
<structure name="StationIdentifier" field="id" map-as="ws:StationIdType"/>
</mapping>
-->
<mapping class="edu.iris.ws.esdp.DataDiscoveryRequest" name="getData">
<structure map-as="esdp:DataDiscoveryRequestType"/>
</mapping>
<mapping type-name="esdp:DataDiscoveryRequestType" abstract="true"
class="edu.iris.ws.esdp.DataDiscoveryRequest">
<structure name="TemporalBounds" usage="optional">
<structure field="timePeriod" name="TimePeriod" map-as="gml:TimePeriodType"/>
</structure>
<structure name="SpatialBounds" usage="optional">
<structure field="boundingBox" name="BoundingBox" map-as="ogc:BBOXType"/>
</structure>
<collection name="DataProductTypes" field="productTypes" usage="optional">
<structure name="DataProductType" map-as="esdp:DataProductTypeType"/>
</collection>
</mapping>
<mapping class="edu.iris.ws.esdp.DataDiscoveryResponse" name="getDataResponse">
<structure map-as="esdp:DataDiscoveryResponseType"/>
</mapping>
<mapping type-name="esdp:DataDiscoveryResponseType" abstract="true"
class="edu.iris.ws.esdp.DataDiscoveryResponse">
<collection field="productTypes" name="DataProducts" usage="optional">
<structure name="DataProduct" map-as="esdp:DataProductType"/>
</collection>
<collection field="dataTypes" name="DataTypes" usage="optional">
<structure name="DataType" map-as="esdp:DataType"/>
</collection>
</mapping>
</binding>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users