Thread: Error fetching networks

Started: 2015-07-09 02:06:21
Last activity: 2015-07-09 02:06:21
Topics: Web Services
Kevin Frechette
2015-07-09 02:06:21
Hello web services,

The jAmaseis
<https://www.iris.edu/hq/programs/education_and_outreach/software/jamaseis
program has been using web services to fetch networks but we recently
discovered it is no longer working. I updated to the latest version of
the IRIS-WS library to make sure a new version was not required for
access now but I still see the same error.

Here is a simple test program based on the code that is used:

package edu.iris.epo.jamaseis.dmc;

import java.util.Date;
import java.util.List;

import edu.iris.dmc.criteria.OutputLevel;
import edu.iris.dmc.criteria.StationCriteria;
import edu.iris.dmc.fdsn.station.model.Network;
import edu.iris.dmc.service.ServiceUtil;
import edu.iris.dmc.service.StationService;

public class DmcSourceTest {
public static void main(String[] args) {
ServiceUtil serviceManager = ServiceUtil.getInstance();
StationService stationService = serviceManager.getStationService();
Date now = new Date();
StationCriteria stationCriteria = new StationCriteria()
.setEndAfter(now).setStartBefore(now);
try {
List<Network> networks = stationService.fetch(stationCriteria,
OutputLevel.NETWORK);
System.out.println("networks: " + networks);
} catch (Exception ex) {
ex.printStackTrace();
}
}
}

Here is the stack trace for the exception thrown on the fetch:

java.lang.IllegalArgumentException: unknown
at
edu.iris.dmc.fdsn.station.model.RestrictedStatusType.fromValue(RestrictedStatusType.java:58)
at
edu.iris.dmc.service.station.parser.StationXMLParser.parse(StationXMLParser.java:227)
at edu.iris.dmc.service.StationService.fetch(StationService.java:432)
at edu.iris.dmc.service.StationService.fetch(StationService.java:353)
at edu.iris.dmc.service.StationService.fetch(StationService.java:312)
at edu.iris.dmc.service.StationService.fetch(StationService.java:337)
at edu.iris.epo.jamaseis.dmc.DmcSourceTest.main(DmcSourceTest.java:20)

Are there additional criteria settings that are required now or should
this still work?

Thanks,
Kevin

Page built 21:00:20 | v.e7d5ec69