Changeset 7910 for RevitalizationWS


Ignore:
Timestamp:
25/03/11 11:24:57 (8 years ago)
Author:
mnagni
Message:

In case the csw:Query is not valid a proper mesage is sent to the process administrator

Location:
RevitalizationWS/ws/DPWS/trunk/src/main/java/ndg/services/revitalization
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • RevitalizationWS/ws/DPWS/trunk/src/main/java/ndg/services/revitalization/ejb/ManageError.java

    r7908 r7910  
    6464                MessageFormatter mf = new MessageFormatter(); 
    6565                String msg = ex.getBundlMessage() != null ? mf.getFormattedText(ex.getBundlMessage()) : ex.getMessage(); 
     66                msg = msg != null ? msg : ex.getCause().toString();  
    6667                return MessageFormatter.getFormattedText(failedMsg, new Object[] {processID, msg}); 
    6768        } 
  • RevitalizationWS/ws/DPWS/trunk/src/main/java/ndg/services/revitalization/harvest/csw/CSWHarvestRequest.java

    r7905 r7910  
    3535import javax.xml.namespace.QName; 
    3636 
     37import ndg.common.exception.NdgExecutionException; 
    3738import ndg.common.exception.ResourceNotAvailable; 
    3839import ndg.common.jaxb.JAXBManager; 
     
    6364        private final static Logger logger = Logger.getLogger(CSWHarvestRequest.class.getName()); 
    6465 
    65         public CSWHarvestRequest(HarvestRequest request, CswProvider provider) { 
     66        public CSWHarvestRequest(HarvestRequest request, CswProvider provider) throws NdgExecutionException { 
    6667                super(request.getProcess(), request.getEmailID()); 
    6768                JAXBManager manager = JAXBManager.getInstance(); 
     
    7374                                query = manager.unmarshall(IOUtils.toInputStream(provider.getQuery()), QueryType.class); 
    7475                        } catch (ResourceNotAvailable e) { 
    75                                 logger.info("Cannot set the ogc:Filter", e); 
     76                                throw new NdgExecutionException(e.getMessage(), e); 
    7677                        } catch (JAXBException e) { 
    77                                 logger.info("Cannot set the ogc:Filter", e); 
     78                                throw new NdgExecutionException(e.getMessage(), e); 
    7879                        } 
    7980                } 
Note: See TracChangeset for help on using the changeset viewer.