Error calling drools REST API with data object contains a list
I'm running into an issue where I'm trying to call drools using the REST API and as part of my layload I'm passing the main data object, plus a 2nd data object which will be my response object. So, the idea is to have an empty response object in working memory that I can update. My XML looks something like this:
<com.test.package.RequestData>
ValueOne
ValueTwo
ValueThree
</com.test.package.RequestData>
<com.test.package.ResponseData>
</com.test.package.ResponseData>
Where, in my data object "responseList" is defined as "private java.util.List<java.lang.String> responseList". Because it's defined as a list I get the following error trying to call the API:
<org.kie.server.api.model.ServiceResponse>
FAILURE
Error calling container TestContainer: No such field com.test.package.ResponseData.responseList
---- Debugging information ----
message : No such field com.test.package.ResponseData.responseList
field : responseList
class : com.test.package.ResponseData
required-type : com.test.package.ResponseData
converter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
path : /batch-execution/insert[2]/com.test.package.ResponseData/responseList
line number : 17
class[1] : org.drools.core.command.runtime.rule.InsertObjectCommand
converter-type[1] : org.drools.core.runtime.help.impl.XStreamXML$InsertConverter
class[2] : org.drools.core.command.runtime.BatchExecutionCommandImpl
version : 6.5.0.Final-redhat-2
-------------------------------
</org.kie.server.api.model.ServiceResponse>
So, my question is....
How do I properly represent my List attribute in the request payload so that it properly instantiates the response object instead of throwing this error?
Any help would be greatly appreciated.
Thanks.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
