Bug #881
CN.resolve() returns invalid error message
100%
Description
Calling CN.resolve() on an identifier that does not exist returns an XML response that is not well formed, and that does not follow the error message syntax specified in the architecture documents.
Here's what one gets from the current resolve():
$ curl -H "Accept: text/xml" http://cn-dev.dataone.org/cn/resolve/THIS_ID_IS_BOGUS
<?xml version="1.0" encoding="UTF-8"?>
Document not found:THIS_ID_IS_BOGUS
This needs to be changed to use the normal error message format expected by clients. The java D1Client test will fail one test until this is fixed, as it tests for a proper error response on an ID not in use.
History
#1 Updated by Rob Nahf over 14 years ago
testing with the call:
$ curl -H "Accept: text/xml" http://cn-dev.dataone.org/cn/meta/THIS_ID_IS_BOGUS
yields a valid xml return:
<?xml version="1.0"?>
Document not found:THIS_ID_IS_BOGUS
So, the resolve-filter-xml.xslt is not handling the error XML returned. Need to adapt.
#2 Updated by Rob Nahf over 14 years ago
- Status changed from New to In Progress
#3 Updated by Rob Nahf over 14 years ago
added xsl template to correctly pass through the error xml coming from the sysmetadata call. Unit tested with saxon9he. Produces identical transformations as previous version for systemMetadata documents, and produces nearly identical error xml document as the one input. (leaves off final linefeed, and adds 'encoding="UTF-8"' attribute to the leading <?xml> element. Still need to deploy the new version.
#4 Updated by Rob Nahf over 14 years ago
- Status changed from In Progress to Closed
Hudson tests passed.
Proper response via curl now.