1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.openehealth.ipf.commons.ihe.hl7v3;
17
18 import org.apache.cxf.frontend.ServerFactoryBean;
19 import org.apache.cxf.interceptor.InterceptorProvider;
20 import org.openehealth.ipf.commons.audit.AuditContext;
21 import org.openehealth.ipf.commons.ihe.core.atna.AuditStrategy;
22 import org.openehealth.ipf.commons.ihe.hl7v3.audit.Hl7v3AuditDataset;
23 import org.openehealth.ipf.commons.ihe.ws.JaxWsAsyncResponseServiceFactory;
24 import org.openehealth.ipf.commons.ihe.ws.correlation.AsynchronyCorrelator;
25 import org.openehealth.ipf.commons.ihe.ws.cxf.databinding.plainxml.PlainXmlDataBinding;
26 import org.openehealth.ipf.commons.ihe.ws.cxf.payload.InNamespaceMergeInterceptor;
27 import org.openehealth.ipf.commons.ihe.ws.cxf.payload.InPayloadExtractorInterceptor;
28 import org.openehealth.ipf.commons.ihe.ws.cxf.payload.InPayloadInjectorInterceptor;
29
30 import static org.openehealth.ipf.commons.ihe.ws.cxf.payload.StringPayloadHolder.PayloadType.SOAP_BODY;
31
32
33
34
35
36 public class Hl7v3AsyncResponseServiceFactory extends JaxWsAsyncResponseServiceFactory<Hl7v3AuditDataset> {
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51 public Hl7v3AsyncResponseServiceFactory(
52 Hl7v3WsTransactionConfiguration wsTransactionConfiguration,
53 String serviceAddress,
54 AuditStrategy<Hl7v3AuditDataset> auditStrategy,
55 AuditContext auditContext,
56 AsynchronyCorrelator<Hl7v3AuditDataset> correlator,
57 InterceptorProvider customInterceptors)
58 {
59 super(wsTransactionConfiguration, serviceAddress, auditStrategy, auditContext, customInterceptors, correlator);
60 }
61
62 @Override
63 protected void configureInterceptors(ServerFactoryBean svrFactory) {
64 super.configureInterceptors(svrFactory);
65 svrFactory.getInInterceptors().add(new InPayloadExtractorInterceptor(SOAP_BODY));
66 svrFactory.getInInterceptors().add(new InNamespaceMergeInterceptor());
67 svrFactory.getInInterceptors().add(new InPayloadInjectorInterceptor(0));
68 svrFactory.setDataBinding(new PlainXmlDataBinding());
69 }
70
71 }