这是 Apache Camel 2.18.4 实施开放eHealth集成平台3.3.0 XDS.b 其中文档消费者< / strong>使用 JUnit 测试用例执行 XDS.b Registry 的以下查询:
@RunWith(SpringRunner.class)
@SpringBootTest(classes = BootstrapApplication.class)
public class GetDocumentsQueryTest implements HL7V3Constraint {
private static final Logger log = LoggerFactory.getLogger(GetDocumentsQueryTest .class);
@EndpointInject(uri = "xds-iti18://ihexds.nist.gov:12090/tf6/services/xdsregistryb")
private ProducerTemplate producer;
@Test
public void query() throws Exception {
GetDocumentsQuery query = new GetDocumentsQuery();
String approved = AvailabilityStatus.APPROVED.getQueryOpcode();
QueryRegistryTransformer transformer = new QueryRegistryTransformer();
EbXMLAdhocQueryRequest ebxmlRequest = transformer.toEbXML(new QueryRegistry(query));
ebxmlRequest.addSlot(QueryParameter.DOC_ENTRY_STATUS.getSlotName(), StringUtils.join(new String[]{"('", "')"}, approved));
ebxmlRequest.addSlot(QueryParameter.DOC_ENTRY_PATIENT_ID.getSlotName(), "'0becc4deeb6042a^^^&1.3.6.1.4.1.21367.2005.13.20.3000&ISO'");
ebxmlRequest.setReturnType(XDSReturnType.LeafClass.getOpcode());
ebxmlRequest.setHome("urn:oid:1.19.6.24.109.42.1.3");
AdhocQueryRequest adhocRequest = (AdhocQueryRequest) ebxmlRequest.getInternal();
AdhocQueryResponse adhocResponse = producer.requestBody(adhocRequest, AdhocQueryResponse.class);
EbXMLQueryResponse30 ebxmlResponse = new EbXMLQueryResponse30(adhocResponse);
String requestId = adhocResponse.getRequestId();
BigInteger totalResultCount = adhocResponse.getTotalResultCount();
String status = ebxmlResponse.getStatus().getOpcode30();
log.info("RequestId: {}, Status: {}, TotalResultCount: {}", requestId, status, totalResultCount);
if(Status.FAILURE == ebxmlResponse.getStatus()){
//TODO
}
if(Status.SUCCESS == ebxmlResponse.getStatus()){
log.info("Query Success: {}", ebxmlResponse.getStatus().getOpcode30());
}
}
}
导致以下错误可能属于 Syslog(ATNA审核),无法修复
org.openhealthtools.ihe.atna.nodeauth.NoSecurityDomainException: No DEFAULT Security Domain available for host ovh3.ihe-europe.net and port 3202
at org.openhealthtools.ihe.atna.nodeauth.SecurityDomainManager.getSecurityDomain(SecurityDomainManager.java:201)
at org.openhealthtools.ihe.atna.nodeauth.handlers.AbstractSecureSocketHandler.getSocket(AbstractSecureSocketHandler.java:116)
at org.openhealthtools.ihe.atna.auditor.sender.TLSSyslogSenderImpl.getTLSSocket(TLSSyslogSenderImpl.java:179)
at org.openhealthtools.ihe.atna.auditor.sender.TLSSyslogSenderImpl.sendAuditEvent(TLSSyslogSenderImpl.java:140)
at org.openhealthtools.ihe.atna.auditor.queue.SynchronousAuditQueue.doSend(SynchronousAuditQueue.java:43)
at org.openhealthtools.ihe.atna.auditor.queue.AbstractAuditMessageQueue.sendAuditEvent(AbstractAuditMessageQueue.java:65)
at org.openhealthtools.ihe.atna.auditor.queue.SynchronousAuditQueue.sendAuditEvent(SynchronousAuditQueue.java:26)
at org.openhealthtools.ihe.atna.auditor.IHEAuditor.audit(IHEAuditor.java:240)
at org.openhealthtools.ihe.atna.auditor.XDSAuditor.auditQueryEvent(XDSAuditor.java:92)
at org.openhealthtools.ihe.atna.auditor.XDSConsumerAuditor.auditRegistryStoredQueryEvent(XDSConsumerAuditor.java:110)
at org.openehealth.ipf.commons.ihe.xds.iti18.Iti18ClientAuditStrategy.doAudit(Iti18ClientAuditStrategy.java:34)
at org.openehealth.ipf.commons.ihe.xds.iti18.Iti18ClientAuditStrategy.doAudit(Iti18ClientAuditStrategy.java:26)
at org.openehealth.ipf.commons.ihe.ws.cxf.audit.AuditResponseInterceptor.process(AuditResponseInterceptor.java:155)
more ...
是否可以帮助我们为 IPF 配置默认安全域?如果有任何机构指导我们解决问题,那将是值得注意的。
答案 0 :(得分:0)
以下是 IPF默认安全域的atnaModuleContext
,atnaTlsConfig
配置如下:
<bean id="atnaModuleContext" class="org.openhealthtools.ihe.atna.auditor.context.AuditorModuleContext" factory-method="getContext">
<property name="queue">
<bean class="org.openhealthtools.ihe.atna.auditor.queue.SynchronousAuditQueue"/>
</property>
</bean>
<bean id="atnaTlsConfig" class="org.openhealthtools.ihe.atna.auditor.AuditorTLSConfig" init-method="init">
<constructor-arg ref="atnaModuleConfig"/>
<constructor-arg ref="atnaProperties"/>
<property name="securityDomainName" value="_DEFAULT_"/>
</bean>
<bean id="atnaModuleConfig" factory-method="getConfig" factory-bean="atnaModuleContext">
<property name="auditEnterpriseSiteId" value="dev.chorke.org"/>
<property name="auditSourceId" value="dev.chorke.org"/>
<property name="auditRepositoryHost" value="188.165.194.55"/>
<property name="auditRepositoryPort" value="3202"/>
<property name="auditRepositoryTransport" value="TLS"/>
</bean>
<bean id="atnaProperties" class="java.util.Properties" >
<constructor-arg>
<props>
<prop key="https.ciphersuites">SSL_RSA_WITH_NULL_SHA,TLS_RSA_WITH_AES_128_CBC_SHA</prop>
<prop key="javax.net.ssl.trustStore">${user.home}/.chorke/jks/2222.jks</prop>
<prop key="javax.net.ssl.keyStore">${user.home}/.chorke/jks/2222.jks</prop>
<prop key="javax.net.ssl.trustStorePassword">storepasswd</prop>
<prop key="javax.net.ssl.keyStorePassword">storepasswd</prop>
<prop key="https.protocols">TLSv1</prop>
</props>
</constructor-arg>
</bean>
这将解决问题(在 MacOS Sierra 上测试)。如果您在 Windows 7,8,10
等其他平台上取得成功,请告诉我们。