Revision 6927
Added by Chris Jones almost 13 years ago
src/edu/ucsb/nceas/metacat/restservice/MNResourceHandler.java | ||
---|---|---|
1003 | 1003 |
File objFile = files.get("object"); |
1004 | 1004 |
object = new FileInputStream(objFile); |
1005 | 1005 |
|
1006 |
// ensure we have the object bytes |
|
1007 |
if ( objFile == null ) { |
|
1008 |
throw new InvalidRequest("1102", "The object param must contain the object bytes."); |
|
1009 |
|
|
1010 |
} |
|
1011 |
|
|
1012 |
// ensure we have the system metadata |
|
1013 |
if ( smFile == null ) { |
|
1014 |
throw new InvalidRequest("1102", "The sysmeta param must contain the system metadata document."); |
|
1015 |
|
|
1016 |
} |
|
1017 |
|
|
1006 | 1018 |
if (action.equals(FUNCTION_NAME_INSERT)) { |
1007 | 1019 |
// handle inserts |
1008 | 1020 |
logMetacat.debug("Commence creation..."); |
Also available in: Unified diff
Ensure we have the object and sysmeta params for MN.create(). We were getting a fatal SAX parsing error encapsulated in a ServiceFailure when a science metadata object param was null. Cut it off at the pass after parsing the MMP entity.