Restlet GAE Router Template matching
I'm using Restlet (2.1 rc4) on GAE and Android. On GAE, I'm using the following Router, which isn't working regarding the PatientServerResource:

    public class Server extends Application {

    @Override
    public Restlet createInboundRoot() {
        
        Router router = new Router(getContext());
        
        //routes should be matched by uri_starts_with
        router.setRoutingMode(Router.MODE_FIRST_MATCH);
        router.setDefaultMatchingMode(Template.MODE_STARTS_WITH);
        //router.setDefaultMatchingQuery(false);

        router.attach("/save", WrapperServerResource.class);
        TemplateRoute route = router.attach("/query/{name}?{gdat}?{svnr}", PatientServerResource.class);
        Map<String, Variable> routeVariables = route.getTemplate().getVariables();
        routeVariables.put("name", new Variable(Variable.TYPE_URI_QUERY_PARAM));
        routeVariables.put("gdat", new Variable(Variable.TYPE_URI_QUERY_PARAM));
        routeVariables.put("svnr", new Variable(Variable.TYPE_URI_QUERY_PARAM));
        router.attachDefault(StandardResource.class);

        return router;
    }
}

Client Code:

    public class PatientFetcher {
	
	private String name, gdat, svnr;
    
	public PatientFetcher(String name, String gdat, String svnr) {
		this.name = name;
		this.gdat = gdat;
		this.svnr = svnr;
	}
	
	public List<Patient> fetch(Context ctx) {

		Engine.getInstance().getRegisteredConverters().add(new JacksonConverter());
		Engine.getInstance().getRegisteredClients().clear();
		Engine.getInstance().getRegisteredClients().add(new HttpClientHelper(null)); 
		if(name == null && gdat == null && svnr == null) return null;
		ClientResource cr = new ClientResource(DataUtil.getUriFetcher(ctx));
		cr.setRequestEntityBuffering(true);
		cr.addQueryParameter("name", name);
		cr.addQueryParameter("gdat", gdat);
		cr.addQueryParameter("svnr", svnr);

		PatientResource resource = cr.wrap(PatientResource.class);
		try {
			JacksonRepresentation<PatientList> repPList = new JacksonRepresentation<PatientList>(resource.search(), PatientList.class);
			StringWriter writer = new StringWriter();
			repPList.write(writer);
			writer.flush();
			Log.i("PatientFetcher", "jackson json: "+writer.toString());
			return repPList.getObject();
		} catch (IOException e) {
			Log.e("PatientFetcher", e.getMessage());
			e.printStackTrace();
			return null;
		}
	}
}


According to the GAE Log, the called URI (in this example svnr=1234, other fields are blank - but even if all fields are non-null, it isn't working) is `/query/?name=&gdat=&svnr=1234` which seems to be correct, but the Server's response (in `writer.toString()`) is the Default Route's `StandardResource.represent()` String, so I guess the issue is that Router does not match the calling URI to the PatientResource - what am I doing wrong?

There are no errors/warnings in the GAE log/android logcat except for a EOFException resulting from jackson not being able to deserialize the result string. The other route ("/save") is working fine.
(The `router.setDefaultMatchingQuery(false);` line does not seem to have any effect on the result, therefore it's commented out) 
Restlet GAE Router Template matching
===

I'm using Restlet (2.1 rc4) on GAE and Android. On GAE, I'm using the following Router, which isn't working regarding the PatientServerResource:

    public class Server extends Application {

    @Override
    public Restlet createInboundRoot() {
        
        Router router = new Router(getContext());
        
        //routes should be matched by uri_starts_with
        router.setRoutingMode(Router.MODE_FIRST_MATCH);
        router.setDefaultMatchingMode(Template.MODE_STARTS_WITH);
        //router.setDefaultMatchingQuery(false);

        router.attach("/save", WrapperServerResource.class);
        TemplateRoute route = router.attach("/query/{name}?{gdat}?{svnr}", PatientServerResource.class);
        Map<String, Variable> routeVariables = route.getTemplate().getVariables();
        routeVariables.put("name", new Variable(Variable.TYPE_URI_QUERY_PARAM));
        routeVariables.put("gdat", new Variable(Variable.TYPE_URI_QUERY_PARAM));
        routeVariables.put("svnr", new Variable(Variable.TYPE_URI_QUERY_PARAM));
        router.attachDefault(StandardResource.class);

        return router;
    }
}

Client Code:

    public class PatientFetcher {
	
	private String name, gdat, svnr;
    
	public PatientFetcher(String name, String gdat, String svnr) {
		this.name = name;
		this.gdat = gdat;
		this.svnr = svnr;
	}
	
	public List<Patient> fetch(Context ctx) {

		Engine.getInstance().getRegisteredConverters().add(new JacksonConverter());
		Engine.getInstance().getRegisteredClients().clear();
		Engine.getInstance().getRegisteredClients().add(new HttpClientHelper(null)); 
		if(name == null && gdat == null && svnr == null) return null;
		ClientResource cr = new ClientResource(DataUtil.getUriFetcher(ctx));
		cr.setRequestEntityBuffering(true);
		cr.addQueryParameter("name", name);
		cr.addQueryParameter("gdat", gdat);
		cr.addQueryParameter("svnr", svnr);

		PatientResource resource = cr.wrap(PatientResource.class);
		try {
			JacksonRepresentation<PatientList> repPList = new JacksonRepresentation<PatientList>(resource.search(), PatientList.class);
			StringWriter writer = new StringWriter();
			repPList.write(writer);
			writer.flush();
			Log.i("PatientFetcher", "jackson json: "+writer.toString());
			return repPList.getObject();
		} catch (IOException e) {
			Log.e("PatientFetcher", e.getMessage());
			e.printStackTrace();
			return null;
		}
	}
}


According to the GAE Log, the called URI (in this example svnr=1234, other fields are blank - but even if all fields are non-null, it isn't working) is `/query/?name=&gdat=&svnr=1234` which seems to be correct, but the Server's response (in `writer.toString()`) is the Default Route's `StandardResource.represent()` String, so I guess the issue is that Router does not match the calling URI to the PatientResource - what am I doing wrong?

There are no errors/warnings in the GAE log/android logcat except for a EOFException resulting from jackson not being able to deserialize the result string. The other route ("/save") is working fine.
(The `router.setDefaultMatchingQuery(false);` line does not seem to have any effect on the result, therefore it's commented out) 