1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.openehealth.ipf.platform.camel.ihe.hl7v3.iti56;
17
18 import lombok.extern.slf4j.Slf4j;
19 import org.apache.camel.Exchange;
20 import org.apache.cxf.interceptor.Fault;
21 import org.openehealth.ipf.commons.ihe.hl7v3.iti56.Iti56PortType;
22 import org.openehealth.ipf.platform.camel.core.util.Exchanges;
23 import org.openehealth.ipf.platform.camel.ihe.ws.AbstractWebService;
24
25
26
27
28
29 @Slf4j
30 public class Iti56Service extends AbstractWebService implements Iti56PortType {
31
32 @Override
33 public String locatePatients(String request) {
34 Exchange result = process(request);
35 Exception exception = Exchanges.extractException(result);
36 if (exception != null) {
37 log.debug("ITI-56 service failed", exception);
38 throw new Fault(exception);
39 }
40
41 return Exchanges.resultMessage(result).getBody(String.class);
42 }
43
44 }