[webservices] stationXML and responses
Philip Crotwell
crotwell at seis.sc.edu
Fri Oct 21 07:21:06 PDT 2011
Hi
I realized I was incorrect about the 27 PolesZeros elements.
> 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???
You cannot have 27 PolesZeros elements, but you can have an unbounded
number of FIR elements. I presume that if there are multiple FIR
filters, then each should be contained in a separate Response element,
and hence the maxOccurs should not be here.
<xs:element name="FIR" minOccurs="0" maxOccurs="unbounded"
type="StaXml:FIRType"/>
thanks,
Philip
On Thu, Oct 20, 2011 at 10:50 AM, Philip Crotwell <crotwell at seis.sc.edu> wrote:
> 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