Commit fe85a279 authored by Tony Schaller's avatar Tony Schaller

Refactorings in order to get DemoDocSource and DemoDocConsumer with Xua Assertions running on .Net.

git-svn-id: https://svn.code.sf.net/p/ehealthconnector/code/trunk@1688 e99adb7c-5e35-42fd-8d1b-cdb378af05e8
parent ae3392f9
......@@ -16,16 +16,18 @@
*/
using System;
using System.Text;
using java.text;
using org.ehealth_connector.common;
using org.ehealth_connector.communication;
using org.apache.commons.lang;
using java.util;
using org.opensaml.core.config;
using java.io;
using java.nio.file;
using org.ehealth_connector.security.saml2;
using org.ehealth_connector.security.deserialization.impl;
using org.ehealth_connector.security.serialization.impl;
using org.ehealth_connector.security.communication.ch.impl;
namespace eHealthConnectorDemo
{
......@@ -94,23 +96,48 @@ namespace eHealthConnectorDemo
public static DateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
/**
* Adds an assertion to the transaction, if it is provided correctly.
*
* @param conCom
* the convenience communication instance
* @param assertionFile
* the assertion file
* @return the string
* @throws IOException
* Signals that an I/O exception has occurred.
* @throws DeserializeException
* the deserialize exception
* @throws SerializeException
* the serialize exception
* @throws InitializationException
* the initialization exception
*/
public static String checkAndEnableXua(ConvenienceCommunication conCom, String assertionFile)
{
String outStr = "";
if (StringUtils.isNotEmpty(assertionFile))
{
outStr = dateFormat.format(new Date()) + ": add assertion\r\n";
byte[] aByteArray = readInputFile(assertionFile);
InitializationService.initialize();
if (int.Parse((new OpenSaml2SerializerImpl()).getLoadedMarshallerCount().toString()) < 612)
{
// This is to load the OpenSaml marshallers that are required
// for de-/serialization
ConvenienceUserAccessAuthenticationChImpl dummy = new ConvenienceUserAccessAuthenticationChImpl();
}
outStr = dateFormat.format(new Date())
+ ": adding X-User assertion to the transaction\r\n";
byte[] aByteArray = readInputFile(assertionFile);
Assertion assertion = new AssertionDeserializerImpl()
.fromXmlByteArray(aByteArray);
.fromXmlByteArray(aByteArray);
conCom.addXUserAssertion(assertion);
}
return outStr;
}
public static byte[] readInputFile(String assertionInputFile)
{
File file = new File(assertionInputFile);
......
......@@ -563,7 +563,7 @@ namespace eHealthConnectorDemo
}
/**
* <div class="en">Demonstrates the document consumer. It exectues first a
* <div class="en">Demonstrates the document consumer. It executes first a
* query to the registry and then retrieves the last PDF and XML document
* that are listed in the query result.
*
......
......@@ -398,8 +398,6 @@ namespace eHealthConnectorDemo
affinityDomain, null, org.ehealth_connector.communication.DocumentMetadata.DocumentMetadataExtractionMode.DEFAULT_EXTRACTION,
org.ehealth_connector.communication.SubmissionSetMetadata.SubmissionSetMetadataExtractionMode.NO_METADATA_EXTRACTION);
txtLog.AppendText(DemoDocCommon.checkAndEnableXua(conCom1, assertionFile));
// Sub-Step 1: Sending CDA Document to Repository (NON-TLS)
DocumentMetadata metaData1 = conCom1.addDocument(DocumentDescriptor.CDA_R2,
......@@ -411,6 +409,7 @@ namespace eHealthConnectorDemo
+ " Sending CDA Document to " + DemoDocCommon.NIST_TOOL_NAME
+ " Repository (NON-TLS, " + DemoDocCommon.NIST_REPOSITORY + ")...\r\n");
subStep++;
txtLog.AppendText(DemoDocCommon.checkAndEnableXua(conCom1, assertionFile));
SubmissionSetType subset = conCom1.generateDefaultSubmissionSetAttributes();
subset.setContentTypeCode(XdsMetadataUtil.convertEhcCodeToCodedMetadataType(
......@@ -435,12 +434,11 @@ namespace eHealthConnectorDemo
affinityDomainSec, null, org.ehealth_connector.communication.DocumentMetadata.DocumentMetadataExtractionMode.DEFAULT_EXTRACTION,
org.ehealth_connector.communication.SubmissionSetMetadata.SubmissionSetMetadataExtractionMode.NO_METADATA_EXTRACTION);
txtLog.AppendText(DemoDocCommon.checkAndEnableXua(conCom2, assertionFile));
txtLog.AppendText(DemoDocCommon.dateFormat.format(new Date()) + ": Step " + step + "." + subStep
+ " Sending CDA and PDF Document to " + DemoDocCommon.NIST_TOOL_NAME
+ " Repository (TLS, " + DemoDocCommon.NIST_REPOSITORY_SECURED + ")...\r\n");
subStep++;
txtLog.AppendText(DemoDocCommon.checkAndEnableXua(conCom2, assertionFile));
// Sub-Step 2: Sending CDA and PDF Document to Repository (TLS)
......@@ -536,8 +534,6 @@ namespace eHealthConnectorDemo
ConvenienceCommunicationCh conCom1 = new ConvenienceCommunicationCh(
affinityDomain);
txtLog.AppendText(DemoDocCommon.checkAndEnableXua(conCom1, assertionFile));
// Sub-Step 1: Sending CDA Document to Repository (NON-TLS)
DocumentMetadataCh metaData1 = conCom1
.addChDocument(DocumentDescriptor.CDA_R2, System.IO.Path.Combine(rscDir, CDA_FILE_PATH));
......@@ -547,6 +543,7 @@ namespace eHealthConnectorDemo
+ " Sending CDA Document to " + DemoDocCommon.SWISS_EPR_TOOL_NAME
+ " Repository (NON-TLS, " + DemoDocCommon.SWISS_EPR_REPOSITORY + ")...\r\n");
subStep++;
txtLog.AppendText(DemoDocCommon.checkAndEnableXua(conCom1, assertionFile));
// SwissEPR specific
SubmissionSetType subSet = conCom1.getTxnData().getSubmissionSet();
......@@ -572,13 +569,12 @@ namespace eHealthConnectorDemo
ConvenienceCommunicationCh conCom2 = new ConvenienceCommunicationCh(
affinityDomainSec);
txtLog.AppendText(DemoDocCommon.checkAndEnableXua(conCom2, assertionFile));
txtLog.AppendText(DemoDocCommon.dateFormat.format(new Date()) + ": Step " + step + "." + subStep
+ " Sending CDA and PDF Document to " + DemoDocCommon.SWISS_EPR_TOOL_NAME
+ " Repository (TLS, " + DemoDocCommon.SWISS_EPR_REPOSITORY_SECURED
+ ")...\r\n");
subStep++;
txtLog.AppendText(DemoDocCommon.checkAndEnableXua(conCom2, assertionFile));
// Sub-Step 2: Sending CDA and PDF Document to Repository (TLS)
......
<?xml version="1.0" encoding="UTF-8"?>
<saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xs="http://www.w3.org/2001/XMLSchema"
ID="_df08db13-3103-41f2-8597-87002a4d8277" IssueInstant="2018-06-21T09:19:51.599Z" Version="2.0">
<saml2:Issuer>https://ehealthsuisse.ihe-europe.net/STS</saml2:Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
<ds:Reference URI="#_df08db13-3103-41f2-8597-87002a4d8277">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<ds:DigestValue>7900XVkvMuUxliGYiAZUimA/cfM=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>hpatF6eCZSqcHlGLyca0QL2V4MaZrIiVmF5FiblqdttCFk3+3/fk9P/dnbkgqtaEbOVBJ7x93JQwhPUbzsgkZR/s3++7zLeJdwcZPJ5TPsG7STaqszcEOjvJsbn8QsKAUWuA5tIW86Y97Te6XA2FwDw9wntN+D0HPXB/fWG6RXg=</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>MIIDhjCCAu+gAwIBAgIBCzANBgkqhkiG9w0BAQ0FADBFMQswCQYDVQQGEwJDSDEMMAoGA1UECgwD
SUhFMSgwJgYDVQQDDB9laGVhbHRoc3Vpc3NlLmloZS1ldXJvcGUubmV0IENBMB4XDTE3MDMyMjE2
MDgyNFoXDTI3MDMyMjE2MDgyNFowQjELMAkGA1UEBhMCQ0gxDDAKBgNVBAoMA0lIRTElMCMGA1UE
AwwcZWhlYWx0aHN1aXNzZS5paGUtZXVyb3BlLm5ldDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkC
gYEAw5dTR17Y1w9cIhY0XSP9Cx7ThQ05YZTf4pKGgGb5ZZbFqm9Q5EKIrJT2EHE7MGO6D/miU3Jt
BUmexcf9ceftSXEW+FaNVAqDePBst4l2RSZeJvez0FmcbWcPeufsUumcGXGAJmNmSviMLd1IrMEh
whv6wuQvspY0Y2wAOvSkUmECAwEAAaOCAYcwggGDMEoGA1UdHwRDMEEwP6A9oDuGOWh0dHBzOi8v
ZWhlYWx0aHN1aXNzZS5paGUtZXVyb3BlLm5ldC9nc3MvY3JsLzIyL2NhY3JsLmNybDBIBglghkgB
hvhCAQQEOxY5aHR0cHM6Ly9laGVhbHRoc3Vpc3NlLmloZS1ldXJvcGUubmV0L2dzcy9jcmwvMjIv
Y2FjcmwuY3JsMEgGCWCGSAGG+EIBAwQ7FjlodHRwczovL2VoZWFsdGhzdWlzc2UuaWhlLWV1cm9w
ZS5uZXQvZ3NzL2NybC8yMi9jYWNybC5jcmwwCQYDVR0TBAIwADAOBgNVHQ8BAf8EBAMCBPAwEQYJ
YIZIAYb4QgEBBAQDAgXgMB0GA1UdDgQWBBSG1oKBcZvZJWlqKJ9i/67Htv7frDAfBgNVHSMEGDAW
gBQol+/d3jFYbFbyhkbiEeQ+OHFfLzAzBgNVHSUELDAqBggrBgEFBQcDAgYIKwYBBQUHAwQGCisG
AQQBgjcUAgIGCCsGAQUFBwMBMA0GCSqGSIb3DQEBDQUAA4GBAI1OT9P0oSrfNedZ4T4CfxPoUOFC
D1tU2X3iRAZFPoUHeFBiccsqMYnNlo3S2cKP6gxt+QPTGNSs171sS0MLa73aR8qrQC+vl5ZP7q4+
/3hYQLe+z3DjSflZNW6shSAp4vD43Dnd8OzgX41LRw1gSEWuAK/+7CedM6IkFEUV2NSF
</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</ds:Signature>
<saml2:Subject>
<saml2:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" NameQualifier="urn:gs1:gln">7601000080776</saml2:NameID>
<saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
<saml2:SubjectConfirmationData InResponseTo="_43ef3e4fefdb03a31781d7ea52617674bcd25a6c26"
NotOnOrAfter="2018-06-21T11:19:51.599Z" Recipient="https://sp.community.ch/epd" />
</saml2:SubjectConfirmation>
</saml2:Subject>
<saml2:Conditions NotBefore="2018-06-21T09:19:51.599Z" NotOnOrAfter="2018-06-21T11:19:51.599Z">
<saml2:AudienceRestriction>
<saml2:Audience>urn:e-health-suisse:token-audience:all-communities</saml2:Audience>
</saml2:AudienceRestriction>
</saml2:Conditions>
<saml2:AuthnStatement AuthnInstant="2018-06-21T09:19:51.599Z" SessionNotOnOrAfter="2018-06-21T11:19:51.599Z">
<saml2:AuthnContext>
<saml2:AuthnContextClassRef>http://bag.admin.ch/LoA/3</saml2:AuthnContextClassRef>
</saml2:AuthnContext>
</saml2:AuthnStatement>
<saml2:AttributeStatement>
<saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:subject:subject-id">
<saml2:AttributeValue>Alexander Maes</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="urn:oasis:names:tc:xacml:2.0:subject:role">
<saml2:AttributeValue>
<Role xmlns="urn:hl7-org:v3" code="HCP" codeSystem="2.16.756.5.30.1.127.3.10.4" codeSystemName="eHealth Suisse EPR Akteure"
displayName="Behandelnde(r)" xs:type="CE" />
</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:subject:organization">
<saml2:AttributeValue>Uni Spital Zurich</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:subject:organization-id">
<saml2:AttributeValue>7601001355781</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="urn:oasis:names:tc:xacml:2.0:resource:resource-id">
<saml2:AttributeValue>761337610435209810^^^SPID&amp;amp;2.16.756.5.30.1.127.3.10.3&amp;amp;ISO</saml2:AttributeValue>
</saml2:Attribute>
<saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:subject:purposeofuse">
<saml2:AttributeValue>
<PurposeOfUse xmlns="urn:hl7-org:v3" code="NORM" codeSystem="2.16.756.5.30.1.127.3.10.5"
codeSystemName="eHealth Suisse Verwendungszweck" displayName="Normalzugriff" xs:type="CE" />
</saml2:AttributeValue>
</saml2:Attribute>
</saml2:AttributeStatement>
</saml2:Assertion>
\ No newline at end of file
......@@ -28,12 +28,13 @@ import java.util.Date;
import org.apache.commons.lang.StringUtils;
import org.ehealth_connector.common.Identificator;
import org.ehealth_connector.communication.ConvenienceCommunication;
import org.ehealth_connector.security.communication.ch.impl.ConvenienceUserAccessAuthenticationChImpl;
import org.ehealth_connector.security.deserialization.impl.AssertionDeserializerImpl;
import org.ehealth_connector.security.exceptions.DeserializeException;
import org.ehealth_connector.security.exceptions.SerializeException;
import org.ehealth_connector.security.saml2.Assertion;
import org.ehealth_connector.security.serialization.impl.OpenSaml2SerializerImpl;
import org.opensaml.core.config.InitializationException;
import org.opensaml.core.config.InitializationService;
/**
* The Class DemoDocCommon contains elements that are used in both, Doc Demo
......@@ -99,15 +100,37 @@ public class DemoDocCommon {
public static final DateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
/**
* Adds an assertion to the transaction, if it is provided correctly.
*
* @param conCom
* the convenience communication instance
* @param assertionFile
* the assertion file
* @return the string
* @throws IOException
* Signals that an I/O exception has occurred.
* @throws DeserializeException
* the deserialize exception
* @throws SerializeException
* the serialize exception
* @throws InitializationException
* the initialization exception
*/
public static String checkAndEnableXua(ConvenienceCommunication conCom, String assertionFile)
throws IOException, DeserializeException, SerializeException, InitializationException {
String outStr = "";
if (StringUtils.isNotEmpty(assertionFile)) {
outStr = dateFormat.format(new Date()) + ": add assertion\n";
final byte[] aByteArray = readInputFile(assertionFile);
InitializationService.initialize();
if ((new OpenSaml2SerializerImpl()).getLoadedMarshallerCount() < 612) {
// This is to load the OpenSaml marshallers that are required
// for de-/serialization
ConvenienceUserAccessAuthenticationChImpl dummy = new ConvenienceUserAccessAuthenticationChImpl();
}
outStr = dateFormat.format(new Date())
+ ": adding X-User assertion to the transaction\r\n";
final byte[] aByteArray = readInputFile(assertionFile);
final Assertion assertion = new AssertionDeserializerImpl()
.fromXmlByteArray(aByteArray);
conCom.addXUserAssertion(assertion);
......
......@@ -529,7 +529,7 @@ public class DemoDocConsumer {
}
/**
* <div class="en">Demonstrates the document consumer. It exectues first a
* <div class="en">Demonstrates the document consumer. It executes first a
* query to the registry and then retrieves the last PDF and XML document
* that are listed in the query result.
*
......
......@@ -397,8 +397,6 @@ public class DemoDocSource {
affinityDomain, null, DocumentMetadataExtractionMode.DEFAULT_EXTRACTION,
SubmissionSetMetadataExtractionMode.NO_METADATA_EXTRACTION);
System.out.print(DemoDocCommon.checkAndEnableXua(conCom1, assertionFile));
// Sub-Step 1: Sending CDA Document to Repository (NON-TLS)
final InputStream inputStream1 = getClass()
.getResourceAsStream("/" + CDA_FILE_PATH);
......@@ -412,6 +410,7 @@ public class DemoDocSource {
+ "." + subStep + " Sending CDA Document to " + DemoDocCommon.NIST_TOOL_NAME
+ " Repository (NON-TLS, " + DemoDocCommon.NIST_REPOSITORY + ")...\n");
subStep++;
System.out.print(DemoDocCommon.checkAndEnableXua(conCom1, assertionFile));
SubmissionSetType subset = conCom1.generateDefaultSubmissionSetAttributes();
subset.setContentTypeCode(XdsMetadataUtil.convertEhcCodeToCodedMetadataType(
......@@ -433,13 +432,12 @@ public class DemoDocSource {
affinityDomainSec, null, DocumentMetadataExtractionMode.DEFAULT_EXTRACTION,
SubmissionSetMetadataExtractionMode.NO_METADATA_EXTRACTION);
System.out.print(DemoDocCommon.checkAndEnableXua(conCom2, assertionFile));
System.out.print(DemoDocCommon.dateFormat.format(new Date()) + ": Step " + step
+ "." + subStep + " Sending CDA and PDF Document to "
+ DemoDocCommon.NIST_TOOL_NAME + " Repository (TLS, "
+ DemoDocCommon.NIST_REPOSITORY_SECURED + ")...\n");
subStep++;
System.out.print(DemoDocCommon.checkAndEnableXua(conCom2, assertionFile));
// Sub-Step 2: Sending CDA and PDF Document to Repository (TLS)
final InputStream inputStream2 = getClass()
......@@ -529,8 +527,6 @@ public class DemoDocSource {
final ConvenienceCommunicationCh conCom1 = new ConvenienceCommunicationCh(
affinityDomain);
System.out.print(DemoDocCommon.checkAndEnableXua(conCom1, assertionFile));
// Sub-Step 1: Sending CDA Document to Repository (NON-TLS)
final InputStream inputStream1 = getClass()
.getResourceAsStream("/" + CDA_FILE_PATH);
......@@ -545,6 +541,7 @@ public class DemoDocSource {
+ DemoDocCommon.SWISS_EPR_TOOL_NAME + " Repository (NON-TLS, "
+ DemoDocCommon.SWISS_EPR_REPOSITORY + ")...\n");
subStep++;
System.out.print(DemoDocCommon.checkAndEnableXua(conCom1, assertionFile));
// SwissEPR specific
final SubmissionSetType subSet = conCom1.getTxnData().getSubmissionSet();
......@@ -567,13 +564,12 @@ public class DemoDocSource {
final ConvenienceCommunicationCh conCom2 = new ConvenienceCommunicationCh(
affinityDomainSec);
System.out.print(DemoDocCommon.checkAndEnableXua(conCom2, assertionFile));
System.out.print(DemoDocCommon.dateFormat.format(new Date()) + ": Step " + step
+ "." + subStep + " Sending CDA and PDF Document to "
+ DemoDocCommon.SWISS_EPR_TOOL_NAME + " Repository (TLS, "
+ DemoDocCommon.SWISS_EPR_REPOSITORY_SECURED + ")...\n");
subStep++;
System.out.print(DemoDocCommon.checkAndEnableXua(conCom2, assertionFile));
// Sub-Step 2: Sending CDA and PDF Document to Repository (TLS)
final InputStream inputStream2 = getClass()
......
......@@ -31,6 +31,13 @@ import org.w3c.dom.Element;
*/
public interface OpenSaml2Serializer {
/**
* Gets the number of loaded marshallers.
*
* @return the marshaller count
*/
public Integer getLoadedMarshallerCount();
/**
* <!-- @formatter:off -->
* <div class="en">Method to serialize an XMLObject to an byte array.</div>
......
......@@ -18,7 +18,9 @@
package org.ehealth_connector.security.serialization.impl;
import java.io.ByteArrayOutputStream;
import java.util.Map;
import javax.xml.namespace.QName;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
......@@ -52,6 +54,29 @@ public class OpenSaml2SerializerImpl implements OpenSaml2Serializer {
"org.apache.xerces.jaxp.DocumentBuilderFactoryImpl");
}
/**
*
* {@inheritDoc}
*
* @see org.ehealth_connector.security.serialization.OpenSaml2Serializer#getLoadedMarshallerCount()
*/
@Override
public Integer getLoadedMarshallerCount() {
Integer retVal = 0;
try {
final MarshallerFactory marshallerFactory = XMLObjectProviderRegistrySupport
.getMarshallerFactory();
if (marshallerFactory != null) {
Map<QName, Marshaller> map = marshallerFactory.getMarshallers();
if (map != null)
retVal = marshallerFactory.getMarshallers().size();
}
} catch (Exception e) {
// Do nothing
}
return retVal;
}
/**
*
* {@inheritDoc}
......
log4j config: /C:/src/ehc-trunk/scripts/testing/communication/../../testing/rsc/log4jConfigs/log4j.xml
Executing DemoDocSource withXua C:\src\ehc-trunk\demo\java\ehealthconnectorDemo\rsc\demoDocSource\security\ehs_assertion.xml ...
20.07.2018 13:21:10: XDS.b - Cross-Enterprise Document Sharing Demo - Document Source actor
-------------------------------------------------------------------------------------------------
20.07.2018 13:21:15: Step 1.1 Sending CDA Document to NIST Toolkit Repository (NON-TLS, http://hit-dev.nist.gov:12090/xdstools/sim/default__rg/rep/prb)...
20.07.2018 13:21:16: adding X-User assertion to the transaction
done. Response: Success
20.07.2018 13:21:22: Step 1.2 Sending CDA and PDF Document to NIST Toolkit Repository (TLS, https://hit-dev.nist.gov:12091/xdstools/sim/default__rg/rep/prb)...
20.07.2018 13:21:22: adding X-User assertion to the transaction
done. Response: Success
20.07.2018 13:21:26: Step 2.1 Sending Folder with CDA Document to NIST Toolkit Repository (NON-TLS)...
20.07.2018 13:21:28: adding X-User assertion to the transaction
done. Response: Success
20.07.2018 13:21:32: Step 2.2 Sending Folder with CDA Document to NIST Toolkit Repository (TLS)...
done. Response: Success
20.07.2018 13:21:39: Step 2.3 Sending Folder to NIST Toolkit Repository (TLS)...
done. Response: Success
20.07.2018 13:21:41: Step 2.3 Sending CDA Document associated with folder to NIST-Repository (TLS)...
done. Response: Success
20.07.2018 13:21:46: Step 3.1 Sending CDA Document to Swiss EPR reference environment Repository (NON-TLS, http://ehealthsuisse.ihe-europe.net:8481/xdstools4/sim/projectathon__gazelle_pat/rep/prb)...
20.07.2018 13:21:46: adding X-User assertion to the transaction
done. Response: Success
20.07.2018 13:21:50: Step 3.2 Sending CDA and PDF Document to Swiss EPR reference environment Repository (TLS, https://ehealthsuisse.ihe-europe.net:10443/xdstools4/sim/projectathon__gazelle_pat/rep/prb)...
20.07.2018 13:21:50: adding X-User assertion to the transaction
done. Response: Success
----------------------------------------
Demo finished
log4j config: /C:/src/ehc-trunk/scripts/testing/communication/../../testing/rsc/log4jConfigs/log4j.xml
Executing DemoDocSource withXua C:\src\ehc-trunk\demo\java\ehealthconnectorDemo\rsc\demoDocSource\security\ehs_assertion.xml ...
20.07.2018 13:20:50: XDS.b - Cross-Enterprise Document Sharing Demo - Document Source actor
-------------------------------------------------------------------------------------------------
20.07.2018 13:20:52: Step 1.1 Sending CDA Document to NIST Toolkit Repository (NON-TLS, http://hit-dev.nist.gov:12090/xdstools/sim/default__rg/rep/prb)...
20.07.2018 13:20:53: adding X-User assertion to the transaction
done. Response: Success
20.07.2018 13:20:55: Step 1.2 Sending CDA and PDF Document to NIST Toolkit Repository (TLS, https://hit-dev.nist.gov:12091/xdstools/sim/default__rg/rep/prb)...
20.07.2018 13:20:55: adding X-User assertion to the transaction
done. Response: Success
20.07.2018 13:20:56: Step 2.1 Sending Folder with CDA Document to NIST Toolkit Repository (NON-TLS)...
20.07.2018 13:20:57: adding X-User assertion to the transaction
done. Response: Success
20.07.2018 13:20:58: Step 2.2 Sending Folder with CDA Document to NIST Toolkit Repository (TLS)...
done. Response: Success
20.07.2018 13:20:59: Step 2.3 Sending Folder to NIST Toolkit Repository (TLS)...
done. Response: Success
20.07.2018 13:21:00: Step 2.3 Sending CDA Document associated with folder to NIST-Repository (TLS)...
done. Response: Success
20.07.2018 13:21:01: Step 3.1 Sending CDA Document to Swiss EPR reference environment Repository (NON-TLS, http://ehealthsuisse.ihe-europe.net:8481/xdstools4/sim/projectathon__gazelle_pat/rep/prb)...
20.07.2018 13:21:01: adding X-User assertion to the transaction
done. Response: Success
20.07.2018 13:21:02: Step 3.2 Sending CDA and PDF Document to Swiss EPR reference environment Repository (TLS, https://ehealthsuisse.ihe-europe.net:10443/xdstools4/sim/projectathon__gazelle_pat/rep/prb)...
20.07.2018 13:21:02: adding X-User assertion to the transaction
done. Response: Success
----------------------------------------
Demo finished
@echo off
SET ehc_testing_my_dir=%~dp0
SET ehc_testing_my_file=%~nx0
SET ehc_testing_my_scriptBase=%~dp0..\..
SET ehc_testing_my_log_dir=%ehc_testing_my_scriptBase%\logs
SET ehc_testing_my_out_dir_cur=%ehc_testing_my_scriptBase%\output\currentRelease
SET ehc_testing_my_out_dir_prev=%ehc_testing_my_scriptBase%\output\previousRelease
SET ehc_testing_my_doOneComand=%ehc_testing_my_scriptBase%\util\doOneComand.cmd
SET ehc_testing_my_rsc_dir=%~dp0..\..\..\demo\java\eHealthConnectorDemo\rsc
SET ehc_testing_my_jar_dir=%~dp0..\..\..\demo\java\eHealthConnectorDemo\target
SET ehc_testing_my_exe_dir=%~dp0..\..\..\demo\dotnet\eHealthConnectorDemo\bin\x64\Debug
SET ehc_testing_my_eHCDemoJar=%ehc_testing_my_jar_dir%\ehealthconnectorDemo.jar
SET ehc_testing_my_eHCDemoExe=%ehc_testing_my_exe_dir%\eHealthConnectorDemoConsole.exe
SET ehc_testing_my_logBehavior=clearlog
if NOT "%1"=="" SET ehc_testing_my_logBehavior=appendlog
if NOT "%1"=="" set ehc_testing_my_eHCDemoJar=%1
if NOT "%2"=="" set ehc_testing_my_log_dir=%2
if NOT "%3"=="" set ehc_testing_my_rsc_dir=%3
SET ehc_testing_my_logfile=%ehc_testing_my_log_dir%\%~n0.log
if not exist %ehc_testing_my_log_dir% mkdir %ehc_testing_my_log_dir%
if not exist %ehc_testing_my_out_dir_cur% mkdir %ehc_testing_my_out_dir_cur%
echo ////////////////////////////////////////////////////////////////////
echo ///////////////// %0 started
echo ehc_testing_my_dir=%ehc_testing_my_dir%
echo ehc_testing_my_scriptBase=%ehc_testing_my_scriptBase%
echo ehc_testing_current_dir=%ehc_testing_current_dir%
echo ehc_testing_my_out_dir_cur=%ehc_testing_my_out_dir_cur%
echo ehc_testing_my_out_dir_prev=%ehc_testing_my_out_dir_prev%
echo ================================================== >> %ehc_testing_my_logfile%
SET eHCTempPath=%ehc_testing_my_out_dir_cur%
if exist "%ehc_testing_my_out_dir_cur%\xdm_*_Java.zip" DEL "%ehc_testing_my_out_dir_cur%\xdm_*_Java.zip"
if exist "%ehc_testing_my_out_dir_cur%\xdm_nist_Java" rmdir /S /Q "%ehc_testing_my_out_dir_cur%\xdm_nist_Java"
if exist "%ehc_testing_my_out_dir_cur%\xdm_nist_Java_prev" rmdir /S /Q "%ehc_testing_my_out_dir_cur%\xdm_nist_Java_prev"
if exist "%ehc_testing_my_out_dir_cur%\xdm_swiss_Java" rmdir /S /Q "%ehc_testing_my_out_dir_cur%\xdm_swiss_Java"
if exist "%ehc_testing_my_out_dir_cur%\xdm_swiss_Java_prev" rmdir /S /Q "%ehc_testing_my_out_dir_cur%\xdm_swiss_Java_prev"
SET ehc_testing_my_out_file=DemoDocConsumerXdsWithXua_Java.txt
set EHC_COMMAND=java -Dehc_testing_my_logPath=%ehc_testing_my_log_dir:\=/% -Dlog4j.configuration=%ehc_testing_my_scriptBase%\testing\rsc\log4jConfigs\log4j.xml -jar %ehc_testing_my_eHCDemoJar% DemoDocConsumer xdsOnly C:\src\ehc-trunk\demo\java\ehealthconnectorDemo\rsc\demoDocSource\security\ehs_assertion.xml
call %ehc_testing_my_doOneComand% %ehc_testing_my_logBehavior% "%ehc_testing_my_logfile%" "%ehc_testing_my_out_dir_cur%\%ehc_testing_my_out_file%"
SET ehc_testing_my_out_file1=%ehc_testing_my_out_file%
SET ehc_testing_my_cmd=TortoiseMerge /base:"%ehc_testing_my_out_dir_prev%\%ehc_testing_my_out_file1%" /mine:"%ehc_testing_my_out_dir_cur%\%ehc_testing_my_out_file%"
if NOT "%1"=="" echo %ehc_testing_my_cmd% >> %ehc_testing_my_log_dir%\diff.cmd
if "%1"=="" echo diff %ehc_testing_my_out_file%
if "%1"=="" %ehc_testing_my_cmd%
SET ehc_testing_my_out_file1=%ehc_testing_my_out_file%
SET ehc_testing_my_out_file=DemoDocConsumerXdsWithXua_Dotnet.txt
set EHC_COMMAND=%ehc_testing_my_eHCDemoExe% -Dlog4j.configuration=%ehc_testing_my_scriptBase%\testing\rsc\log4jConfigs\log4j.xml -DrscDir=%ehc_testing_my_rsc_dir% -DrscDir=%ehc_testing_my_rsc_dir% DemoDocConsumer xdsOnly C:\src\ehc-trunk\demo\java\ehealthconnectorDemo\rsc\demoDocSource\security\ehs_assertion.xml
chcp 65001
call %ehc_testing_my_doOneComand% %ehc_testing_my_logBehavior% "%ehc_testing_my_logfile%" "%ehc_testing_my_out_dir_cur%\%ehc_testing_my_out_file%"
chcp 1252
SET ehc_testing_my_cmd=TortoiseMerge /base:"%ehc_testing_my_out_dir_cur%\%ehc_testing_my_out_file1%" /mine:"%ehc_testing_my_out_dir_cur%\%ehc_testing_my_out_file%"
if NOT "%1"=="" echo %ehc_testing_my_cmd% >> %ehc_testing_my_log_dir%\diff.cmd
if "%1"=="" echo diff %ehc_testing_my_out_file%
if "%1"=="" %ehc_testing_my_cmd%
echo %ehc_testing_my_file% complete!
echo ///////////////// %0 completed
echo ////////////////////////////////////////////////////////////////////
:ende
if "%1"=="" cd %ehc_testing_my_dir%
if NOT "%1"=="" cd %ehc_testing_current_dir%
SET eHCTempPath=
@echo off
SET ehc_testing_my_dir=%~dp0
SET ehc_testing_my_file=%~nx0
SET ehc_testing_my_scriptBase=%~dp0..\..
SET ehc_testing_my_log_dir=%ehc_testing_my_scriptBase%\logs
SET ehc_testing_my_out_dir_cur=%ehc_testing_my_scriptBase%\output\currentRelease
SET ehc_testing_my_out_dir_prev=%ehc_testing_my_scriptBase%\output\previousRelease
SET ehc_testing_my_doOneComand=%ehc_testing_my_scriptBase%\util\doOneComand.cmd
SET ehc_testing_my_rsc_dir=%~dp0..\..\..\demo\java\eHealthConnectorDemo\rsc
SET ehc_testing_my_jar_dir=%~dp0..\..\..\demo\java\eHealthConnectorDemo\target
SET ehc_testing_my_exe_dir=%~dp0..\..\..\demo\dotnet\eHealthConnectorDemo\bin\x64\Debug
SET ehc_testing_my_eHCDemoJar=%ehc_testing_my_jar_dir%\ehealthconnectorDemo.jar
SET ehc_testing_my_eHCDemoExe=%ehc_testing_my_exe_dir%\eHealthConnectorDemoConsole.exe
SET ehc_testing_my_logBehavior=clearlog
if NOT "%1"=="" SET ehc_testing_my_logBehavior=appendlog
if NOT "%1"=="" set ehc_testing_my_eHCDemoJar=%1
if NOT "%2"=="" set ehc_testing_my_log_dir=%2
if NOT "%3"=="" set ehc_testing_my_rsc_dir=%3
SET ehc_testing_my_logfile=%ehc_testing_my_log_dir%\%~n0.log
if not exist %ehc_testing_my_log_dir% mkdir %ehc_testing_my_log_dir%
if not exist %ehc_testing_my_out_dir_cur% mkdir %ehc_testing_my_out_dir_cur%
echo ////////////////////////////////////////////////////////////////////
echo ///////////////// %0 started
echo ehc_testing_my_dir=%ehc_testing_my_dir%
echo ehc_testing_my_scriptBase=%ehc_testing_my_scriptBase%
echo ehc_testing_current_dir=%ehc_testing_current_dir%
echo ehc_testing_my_out_dir_cur=%ehc_testing_my_out_dir_cur%
echo ehc_testing_my_out_dir_prev=%ehc_testing_my_out_dir_prev%
echo ================================================== >> %ehc_testing_my_logfile%
SET eHCTempPath=%ehc_testing_my_out_dir_cur%
if exist "%ehc_testing_my_out_dir_cur%\xdm_*_Java.zip" DEL "%ehc_testing_my_out_dir_cur%\xdm_*_Java.zip"
if exist "%ehc_testing_my_out_dir_cur%\xdm_nist_Java" rmdir /S /Q "%ehc_testing_my_out_dir_cur%\xdm_nist_Java"
if exist "%ehc_testing_my_out_dir_cur%\xdm_nist_Java_prev" rmdir /S /Q "%ehc_testing_my_out_dir_cur%\xdm_nist_Java_prev"
if exist "%ehc_testing_my_out_dir_cur%\xdm_swiss_Java" rmdir /S /Q "%ehc_testing_my_out_dir_cur%\xdm_swiss_Java"
if exist "%ehc_testing_my_out_dir_cur%\xdm_swiss_Java_prev" rmdir /S /Q "%ehc_testing_my_out_dir_cur%\xdm_swiss_Java_prev"
SET ehc_testing_my_out_file=DemoDocSourceXdsWithXua_Java.txt
set EHC_COMMAND=java -Dehc_testing_my_logPath=%ehc_testing_my_log_dir:\=/% -Dlog4j.configuration=%ehc_testing_my_scriptBase%\testing\rsc\log4jConfigs\log4j.xml -jar %ehc_testing_my_eHCDemoJar% DemoDocSource withXua C:\src\ehc-trunk\demo\java\ehealthconnectorDemo\rsc\demoDocSource\security\ehs_assertion.xml
call %ehc_testing_my_doOneComand% %ehc_testing_my_logBehavior% "%ehc_testing_my_logfile%" "%ehc_testing_my_out_dir_cur%\%ehc_testing_my_out_file%"
SET ehc_testing_my_out_file1=%ehc_testing_my_out_file%
SET ehc_testing_my_cmd=TortoiseMerge /base:"%ehc_testing_my_out_dir_prev%\%ehc_testing_my_out_file1%" /mine:"%ehc_testing_my_out_dir_cur%\%ehc_testing_my_out_file%"
if NOT "%1"=="" echo %ehc_testing_my_cmd% >> %ehc_testing_my_log_dir%\diff.cmd
if "%1"=="" echo diff %ehc_testing_my_out_file%
if "%1"=="" %ehc_testing_my_cmd%
SET ehc_testing_my_out_file1=%ehc_testing_my_out_file%
SET ehc_testing_my_out_file=DemoDocSourceXdsWithXua_Dotnet.txt
set EHC_COMMAND=%ehc_testing_my_eHCDemoExe% -Dlog4j.configuration=%ehc_testing_my_scriptBase%\testing\rsc\log4jConfigs\log4j.xml -DrscDir=%ehc_testing_my_rsc_dir% -DrscDir=%ehc_testing_my_rsc_dir% DemoDocSource withXua C:\src\ehc-trunk\demo\java\ehealthconnectorDemo\rsc\demoDocSource\security\ehs_assertion.xml
chcp 65001
call %ehc_testing_my_doOneComand% %ehc_testing_my_logBehavior% "%ehc_testing_my_logfile%" "%ehc_testing_my_out_dir_cur%\%ehc_testing_my_out_file%"
chcp 1252
SET ehc_testing_my_cmd=TortoiseMerge /base:"%ehc_testing_my_out_dir_cur%\%ehc_testing_my_out_file1%" /mine:"%ehc_testing_my_out_dir_cur%\%ehc_testing_my_out_file%"
if NOT "%1"=="" echo %ehc_testing_my_cmd% >> %ehc_testing_my_log_dir%\diff.cmd
if "%1"=="" echo diff %ehc_testing_my_out_file%
if "%1"=="" %ehc_testing_my_cmd%
echo %ehc_testing_my_file% complete!
echo ///////////////// %0 completed
echo ////////////////////////////////////////////////////////////////////
:ende
if "%1"=="" cd %ehc_testing_my_dir%
if NOT "%1"=="" cd %ehc_testing_current_dir%
SET eHCTempPath=
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