- Timestamp:
- 04/16/09 09:54:22 (11 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
tools/routingservice/branches/wrs-2.0/src/WRS.java
r295 r296 256 256 } 257 257 }; 258 component.getDefaultHost().attach("/ ", restlet);258 component.getDefaultHost().attach("/{version}/{profile}/{service}", restlet); 259 259 component.start(); 260 260 … … 266 266 InvalidTemplateException 267 267 { 268 String url = req.getResourceRef().getRemainingPart().split("\\?")[0];269 268 // http://<servicedomain>:<port>/<version>/<profile>/<service>.<format>?<input>={<data>} 270 String urlSplit[] = url.split("/"); 271 272 byte urlIndex = 0; 273 String cVersion = urlSplit[urlIndex]; 269 270 String cVersion = (String) req.getAttributes().get("version"); 274 271 275 272 if (!this.conf.getVersion().equals(cVersion)) … … 278 275 } 279 276 280 // Next token (assumed to be profile name) 281 ++urlIndex; 282 283 String pName = urlSplit[urlIndex]; 277 String pName = (String) req.getAttributes().get("profile"); 284 278 Profile cProfile = this.profiles.get(pName); 285 279 … … 289 283 } 290 284 291 // Next token (assumed to be service.format) 292 ++urlIndex; 293 294 String sName = urlSplit[urlIndex].split("\\.")[0]; 285 String sName = ((String) req.getAttributes().get("service")).split("\\.")[0]; 295 286 ArrayList csList = (ArrayList) cProfile.getServices().get(sName); 296 287 // TODO implement a rule … … 302 293 } 303 294 304 String tName = urlSplit[urlIndex].split("\\.")[1].split("\\?")[0]; 295 String tName = ((String) req.getAttributes().get("service")).split("\\.")[1]; 296 305 297 Template cTemplate = cService.getTemplates().get(tName); 306 298
