[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ecf-dev] Remote callable parameter order not preserved

Hi,

should the order of the method parameters in the service interface correspond to the order of the parameters as they are defined for the remote callable?

I have a method with the signature.

createProject(String project_name, Collection<String> project_requirements, String language, String annotation_format)

The corresponding remote callable is built with:

RemoteCallParameter.Builder parameterBuilder = new RemoteCallParameter.Builder()
      .addParameter("project_name")
      .addParameter("project_requirements")
      .addParameter("language")
      .addParameter("annotation_format");
   ÂÂ
RemoteCallable.Builder callableBuilder = new RemoteCallable.Builder("createProject", "/server/project")
      .setDefaultParameters(parameterBuilder.build())
      .setRequestType(new HttpPostRequestType(HttpPostRequestType.STRING_REQUEST_ENTITY, "application/json"));
   ÂÂ
callableBuilder.build();

Due to the HashMap in defaultParameters, there is a mismatch in the ordering of default params and the actual params. This one maintains the order:

RemoteCallParameter.Builder()
      .addParameter("phrase")
      .addParameter("language")
      .addParameter("annotation_format");
ÂÂÂ
But this one does not:

RemoteCallParameter.Builder parameterBuilder = new RemoteCallParameter.Builder()
      .addParameter("project_name")
      .addParameter("project_requirements")
      .addParameter("language")
      .addParameter("annotation_format");

Is my assumption that the order should match correct? It seems to be assumed in AbstractClientContainer.prepareParameters().

Thanks,
ÂMarin

Eclipse Luna SR2
ECF 3.9.2