Thread: station and SelectedNumberStations out of order

Started: 2011-07-13 20:08:15
Last activity: 2011-07-21 17:25:05
Topics: Web Services
Philip Crotwell
2011-07-13 20:08:15
Hi

The StationXML schema says that the Network element should be a sequence of:
StartDate
EndDate
Description
TotalNumberStations
SelectedNumberStations
Station
...
Station

However, the current iris station web service currently sends back
StartDate
EndDate
Description
TotalNumberStations
Station
...
Station
SelectedNumberStations

which makes the resulting XML document invalid. This is kind of a pain
if you actually go to the trouble of validating the document before
parsing (sometimes a good idea) but also the "SelectedNumberStations"
element is kind of pointless in that the client has already parsed all
the station elements by that point and so already knows how many there
are.

At any rate, this out of order causes an error in my seisFile library
as it doesn't expect to find elements inside a Network element after
the Station elements. The result is that only one network in the file
is parsed and all further ones are ignored.

thanks,
Philip

  • Yazan Suleiman
    2011-07-13 23:07:15
    Hello Philip and thank you for the feedback. I am aware of this issue and will address it in a future release. Thanks again for your time and effort. Yazan


    On Jul 13, 2011, at 10:08 AM, Philip Crotwell wrote:

    Hi

    The StationXML schema says that the Network element should be a sequence of:
    StartDate
    EndDate
    Description
    TotalNumberStations
    SelectedNumberStations
    Station
    ...
    Station

    However, the current iris station web service currently sends back
    StartDate
    EndDate
    Description
    TotalNumberStations
    Station
    ...
    Station
    SelectedNumberStations

    which makes the resulting XML document invalid. This is kind of a pain
    if you actually go to the trouble of validating the document before
    parsing (sometimes a good idea) but also the "SelectedNumberStations"
    element is kind of pointless in that the client has already parsed all
    the station elements by that point and so already knows how many there
    are.

    At any rate, this out of order causes an error in my seisFile library
    as it doesn't expect to find elements inside a Network element after
    the Station elements. The result is that only one network in the file
    is parsed and all further ones are ignored.

    thanks,
    Philip
    _______________________________________________
    webservices mailing list
    webservices<at>iris.washington.edu
    http://www.iris.washington.edu/mailman/listinfo/webservices



    • Hi,
      Could you take me off this email list. Gary Fuis (fuis<at>usgs.gov)

      Hello Philip and thank you for the feedback. I am aware of this issue and will address it in a future release. Thanks again for your time and effort. Yazan


      On Jul 13, 2011, at 10:08 AM, Philip Crotwell wrote:

      Hi

      The StationXML schema says that the Network element should be a sequence of:
      StartDate
      EndDate
      Description
      TotalNumberStations
      SelectedNumberStations
      Station
      ...
      Station

      However, the current iris station web service currently sends back
      StartDate
      EndDate
      Description
      TotalNumberStations
      Station
      ...
      Station
      SelectedNumberStations

      which makes the resulting XML document invalid. This is kind of a pain
      if you actually go to the trouble of validating the document before
      parsing (sometimes a good idea) but also the "SelectedNumberStations"
      element is kind of pointless in that the client has already parsed all
      the station elements by that point and so already knows how many there
      are.

      At any rate, this out of order causes an error in my seisFile library
      as it doesn't expect to find elements inside a Network element after
      the Station elements. The result is that only one network in the file
      is parsed and all further ones are ignored.

      thanks,
      Philip
      _______________________________________________
      webservices mailing list
      webservices<at>iris.washington.edu
      http://www.iris.washington.edu/mailman/listinfo/webservices


      _______________________________________________
      webservices mailing list
      webservices<at>iris.washington.edu
      http://www.iris.washington.edu/mailman/listinfo/webservices


Page built 23:21:18 | v.090361a2