If I have a parameter to a FunctionImport of type Integer, a call to the function import throws a IllegalArgumentException.
Here is the Function Import:
@EdmFunctionImport(name = "AssignedScopes", returnType = @ReturnType(type = Type.COMPLEX, isCollection = true)) public List<AssignedScopes> assignedScopes( @EdmFunctionImportParameter(name = "IdProfile", type = EdmType.INT32) Integer idProfile) {
I call it with URL /AssignedScopes?IdProfile=1. Apparently the parameter internally gets converted into a Byte. The call to invoke then fails, it does not automatically convert from Byte to Integer.
It works if the parameter has the type "int". However it should be an optional parameter which can be null. For this I need the type Integer.
If I have a parameter to a FunctionImport of type Integer, a call to the function import throws a IllegalArgumentException.
Here is the Function Import:
@EdmFunctionImport(name = "AssignedScopes", returnType = @ReturnType(type = Type.COMPLEX, isCollection = true)) public List<AssignedScopes> assignedScopes( @EdmFunctionImportParameter(name = "IdProfile", type = EdmType.INT32) Integer idProfile) {I call it with URL
/AssignedScopes?IdProfile=1. Apparently the parameter internally gets converted into a Byte. The call to invoke then fails, it does not automatically convert from Byte to Integer.It works if the parameter has the type "int". However it should be an optional parameter which can be null. For this I need the type Integer.