[webservices] stationXML and responses

Philip Crotwell crotwell at seis.sc.edu
Thu Oct 20 07:50:25 PDT 2011


Hi

I am looking into pulling responses via the stationXML XML web
service, and am getting a <Response> that contains only a
<StageSensitiviy> but the docs in the xschema it should have one of
<PolesZeros>, <Coefficients>, etc. From the xschema:
<xs:documentation>Choose one of these responses. There should be one
response per stage.</xs:documentation>
				</xs:annotation>

An example is <Response stage="2"> in:

http://www.iris.edu/ws/station/query?net=II&sta=AAK&loc=00&cha=BH1&timewindow=1990-11-30%2C1990-11-30&level=resp

The resp file via seismoquery for this same channel has a "polezero"
blockette with zero poles and zeros. I suppose this is essentially the
same as not having one at all, but seems confusing. Should either the
docs should be changed to allow a <Response> element without a
response inside it, or should this one should include a <PolesZeros>
with no poles or zeros?

On this subject, the xml is actually valid because the xschema doesn't
enforce the "at least one of" rule. This is because some of the
elements inside of the <xs:choice> have minOccurs="0", so it is valid
to choose to put nothing inside the choice. Just seems like a bad way
to specify the schema. The schema also doesn't limit the number, so it
would be completely valid to put 27 <PolesZeros> elements inside a
<Response>, which also seems wrong, at least by seed conventions.
Perhaps the choice should have a minOccurs=1 maxOccurs=1 on it???

I know this doesn't really effect the meaning of the response, but
small ambiguities like this make writing software to use stationXML
harder.

thanks,
Philip


More information about the webservices mailing list