Changeset 2206 for trunk/grails-app/services
- Timestamp:
- Apr 3, 2012, 3:59:02 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/services/api/ApiService.groovy
r2203 r2206 4 4 * Description of my service 5 5 * 6 * @author your email (+name?)7 * @since 201 0mmdd8 * @package ???6 * @author Jeroen Wesbeek <work@osx.eu> 7 * @since 20120328 8 * @package api 9 9 * 10 10 * Revision information: … … 114 114 def serviceURL = "${assay.module.url}/rest/getMeasurements" 115 115 def serviceArguments = "assayToken=${assay.assayUUID}" 116 def json 116 117 117 118 // call module method 118 def json = moduleCommunicationService.callModuleMethod( 119 assay.module.url, 120 serviceURL, 121 serviceArguments, 122 "POST", 123 user 124 ); 119 try { 120 json = moduleCommunicationService.callModuleMethod( 121 assay.module.url, 122 serviceURL, 123 serviceArguments, 124 "POST", 125 user 126 ); 127 } catch (Exception e) { 128 println "api.getMeasurements failed :: ${e.getMessage()}" 129 json = new org.codehaus.groovy.grails.web.json.JSONArray() 130 } 125 131 126 132 return json … … 137 143 def serviceURL = "${assay.module.url}/rest/getMeasurementData" 138 144 def serviceArguments = "assayToken=${assay.assayUUID}&verbose=true" 145 def json 139 146 140 147 // call module method 141 def json = moduleCommunicationService.callModuleMethod( 142 assay.module.url, 143 serviceURL, 144 serviceArguments, 145 "POST", 146 user 147 ); 148 try { 149 json = moduleCommunicationService.callModuleMethod( 150 assay.module.url, 151 serviceURL, 152 serviceArguments, 153 "POST", 154 user 155 ); 156 } catch (Exception e) { 157 println "api.getMeasurementData failed :: ${e.getMessage()}" 158 json = new org.codehaus.groovy.grails.web.json.JSONArray() 159 } 148 160 149 161 return json … … 172 184 ); 173 185 } catch (Exception e) { 174 println e.getMessage()186 println "api.getMeasurementMetaData failed :: ${e.getMessage()}" 175 187 json = new org.codehaus.groovy.grails.web.json.JSONArray() 176 188 }
Note: See TracChangeset
for help on using the changeset viewer.