Commit 3b6e5167 authored by Franck Desaize's avatar Franck Desaize
Browse files

Fix mapping issue

parent 471725c8
Pipeline #264073 failed with stages
in 6 minutes and 44 seconds
......@@ -16,6 +16,7 @@ import net.ihe.gazelle.lib.gitbutils.adapter.MapperObjectToAnyContent;
import net.ihe.gazelle.lib.gitbutils.adapter.MappingException;
import javax.inject.Inject;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
......@@ -58,7 +59,7 @@ public class CrossReferenceSearchProcessingService {
}
try {
patientAliases = crossReferenceSearch.search(mapper.getObject(searchParameter.get(0), EntityIdentifier.class),
mapper.getObjectCollection(searchParameter.get(1), List.class,String.class));
mapper.getObjectCollection(searchParameter.get(1), ArrayList.class,String.class));
return createPatientSearchProcessResponse(patientAliases);
} catch (MappingException e) {
throw new IllegalArgumentException("Cannot decode Request inputs as SourceIdentifier !", e);
......
......@@ -57,7 +57,7 @@ public class XRefSearchClient implements PatientCrossReferenceSearch {
sourceIdentifier);
AnyContent targetDomainsAnyContent =
new MapperObjectToAnyContent().getAnyContent(CrossReferenceProcessingWebServiceConstants.CROSS_REFERENCE_INPUT_TARGET_NAME,
sourceIdentifier);
targetDomains);
processRequest.getInput().add(sourceIdentifierAnyContent);
processRequest.getInput().add(targetDomainsAnyContent);
ProcessResponse processResponse = processingClient.process(processRequest);
......
......@@ -25,6 +25,7 @@ public class TestClientWithUrl {
entityIdentifier.setType("ISO");
entityIdentifier.setValue("1610749172368102389526");
List<String> targetDomain = new ArrayList<>();
targetDomain.add("test");
try {
PatientAliases patientAliases = xRefSearchClient.search(entityIdentifier,targetDomain);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment