Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dataset create web-service requires id param, docs state this is an optional param #1

Open
lachlanhurst opened this issue Aug 19, 2013 · 0 comments

Comments

@lachlanhurst
Copy link
Contributor

Documentation states a new dataset can be created without an id, yet calls to this webservice fail without this URL param.
https://github.com/VPAC/rsa/blob/master/doc/spatialcubeservice.md

Workaround is to include the id param in the URL with no value.
ie, make post with URL such as;

 http://localhost:8181/spatialcubeservice/Dataset.json?precision=1&dataAbstract=a&name=clientCreate1&resolution=m25&id=

Issue traced to line 108 of DatasetController. The if statement throws a null pointer exception as getId() returns null as the dataset does not exist (it can't as it is being created).

if(dr.getId().isEmpty()) {
        Dataset newDataset = new Dataset(dr.getName(), dr.getDataAbstract(), dr.getResolution(), precision);
        datasetDao.create(newDataset);
        model.addAttribute(ControllerHelper.RESPONSE_ROOT, new DatasetResponse(newDataset));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant