msgBroker.addErrorMessage("publication.uploadMetadata.err.file.required");
} else if (sXml.length() == 0) {
msgBroker.addErrorMessage("publication.uploadMetadata.err.file.empty");
} else if (bValidateOnly) {
ValidationRequest request = new ValidationRequest(context,sFileName,sXml);
request.verify();
msgBroker.addSuccessMessage("catalog.publication.success.validated");
} else {
Publisher publisher = getSelectablePublishers().selectedAsPublisher(context,false);
UploadRequest request = new UploadRequest(context,publisher,sFileName,sXml);
request.publish();