Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

I dette afsnit gives eksempler på, hvordan man kan bruge et Java-baseret systemet til at kalde verifikationssnitfladen.

Kodeeksemplet er taget fra integrationstestene for servicen, og begge metodekald, variabler og parametre kommer fra integrationstesten.

Koden kan muligvis ikke være i stand til at kompilere eller køre i sin nuværende form, da den kun er beregnet som en guide til, hvordan man opretter et kald til tjenestenrequest/response ser ud når man skal kalde verifikationssnitfladen.

Der er ikke eksempler for ConsentForForeignersCheck, da den udgår.

...

Code Block
titleConsentForDataCheck Request
collapsetrue
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:medcom="http://www.medcom.dk/dgws/2006/04/dgws-1.0.xsd" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:sosi="http://www.sosi.dk/sosi/2006/04/sosi-1.0.xsd" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wst="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Envelope">
   <soapenv:Header>
      <wsse:Security>
         <wsu:Timestamp>
            <wsu:Created>2024-06-12T12:07:26Z</wsu:Created>
         </wsu:Timestamp>
         <saml:Assertion IssueInstant="2024-06-12T12:02:25Z" Version="2.0" id="IDCard">
            <saml:Issuer>TEST1-NSP-STS</saml:Issuer>
            <saml:Subject>
               <saml:NameID Format="medcom:other">SubjectDN={C=DK, OID.2.5.4.97=NTRDK-33257872, O=Sundhedsdatastyrelsen, SERIALNUMBER=UI:DK-O:G:8d3fa047-c77e-47e4-bdd2-e91488610ce6, CN=NSP Test Service Consumer},IssuerDN={C=DK, O=Den Danske Stat, OU=Test - cti, CN=Den Danske Stat OCES udstedende-CA 1},CertSerial={132335570455020580755596658041035235745819139305}</saml:NameID>
               <saml:SubjectConfirmation>
                  <saml:ConfirmationMethod>urn:oasis:names:tc:SAML:2.0:cm:holder-of-key</saml:ConfirmationMethod>
                  <saml:SubjectConfirmationData>
                     <ds:KeyInfo>
                        <ds:KeyName>OCESSignature</ds:KeyName>
                     </ds:KeyInfo>
                  </saml:SubjectConfirmationData>
               </saml:SubjectConfirmation>
            </saml:Subject>
            <saml:Conditions NotBefore="2024-06-12T12:02:25Z" NotOnOrAfter="2024-06-13T12:02:25Z" />
            <saml:AttributeStatement id="IDCardData">
               <saml:Attribute Name="sosi:IDCardID">
                  <saml:AttributeValue>jiwrBCsLP1toEkOzGJDK4Q==</saml:AttributeValue>
               </saml:Attribute>
               <saml:Attribute Name="sosi:IDCardVersion">
                  <saml:AttributeValue>1.0.1</saml:AttributeValue>
               </saml:Attribute>
               <saml:Attribute Name="sosi:IDCardType">
                  <saml:AttributeValue>system</saml:AttributeValue>
               </saml:Attribute>
               <saml:Attribute Name="sosi:AuthenticationLevel">
                  <saml:AttributeValue>3</saml:AttributeValue>
               </saml:Attribute>
               <saml:Attribute Name="sosi:OCESCertHash">
                  <saml:AttributeValue>f6ZdJ0CPmwpKVPZQ1NnkpDlB0KE=</saml:AttributeValue>
               </saml:Attribute>
            </saml:AttributeStatement>
            <saml:AttributeStatement id="SystemLog">
               <saml:Attribute Name="medcom:ITSystemName">
                  <saml:AttributeValue>Service Consumer Test</saml:AttributeValue>
               </saml:Attribute>
               <saml:Attribute Name="medcom:CareProviderID" NameFormat="medcom:cvrnumber">
                  <saml:AttributeValue>33257872</saml:AttributeValue>
               </saml:Attribute>
               <saml:Attribute Name="medcom:CareProviderName">
                  <saml:AttributeValue>Sundhedsdatastyrelsen</saml:AttributeValue>
               </saml:Attribute>
            </saml:AttributeStatement>
            <ds:Signature id="OCESSignature">
               <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="#IDCard">
                     <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>wtQej7iV7haBrC8Tr3aHZce5brU=</ds:DigestValue>
                  </ds:Reference>
               </ds:SignedInfo>
               <ds:SignatureValue>Uq9WQkDd45zQu0WEMNTIBwM6ydfV4xe5pigqbL8JabH8cfULKcXqw+whMtPUu3NjsXDf1DVDoj+m0UzET0Z/THSCmhgyLGh5+BU8vXGgnKZw+Y1+oeGVpKMw2EDdXbHLYnUqlrzKQW1fWhDBqEYxoEwX5GV6oTx8ZvZpjYacRzEvkmNJzz4lq7uGEcIfEAj8OGDTvoVf2+8VN4f4wXEVEgQf83XbJkfyTOTeRW/L0/02TEbDd+/fPqubc+8N6mAARB2vIhLPbPiThdHTJloWVX6LXCGdVqjks41CVQmUvPVMdJdrzIGFKJ5JTm3ExZ/xUFS0glCHtR+Ct1mzr9aiIeeHRNr5rFIJxSUkd5gW/+H6ou8b7/U2MKzMwhVkG8SPeJ6WUabT/oN54L+bonow9lXXBDlJTU+892vue6+9sBFbuGAPlVHj+i/xitB+YQwbGli9dsT/KE9vvmgPBQhZyJf4q/b6o8nAMWBRCet9FY6BEHFL1ysPoix6Gf4OV58w</ds:SignatureValue>
               <ds:KeyInfo>
                  <ds:X509Data>
                     <ds:X509Certificate>MIIGiDCCBLygAwIBAgIUR5IfpZdXnxp/UHxA0KWAcKzWcm4wQQYJKoZIhvcNAQEKMDSgDzANBglghkgBZQMEAgEFAKEcMBoGCS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Certificate>
                  </ds:X509Data>
               </ds:KeyInfo>
            </ds:Signature>
         </saml:Assertion>
      </wsse:Security>
      <medcom:Header>
         <medcom:SecurityLevel>3</medcom:SecurityLevel>
         <medcom:Linking>
            <medcom:FlowID>049e7650-8bd6-4d11-a60a-7d9b00f826b4</medcom:FlowID>
            <medcom:MessageID>AAABkAxYhQoQrkam3+AcolNPU0k=</medcom:MessageID>
         </medcom:Linking>
         <medcom:RequireNonRepudiationReceipt>no</medcom:RequireNonRepudiationReceipt>
      </medcom:Header>
      <HsuidHeader xmlns="http://www.nsi.dk/hsuid/2016/08/hsuid-1.1.xsd">
         <Assertion IssueInstant="2024-06-12T12:07:24.190Z" Version="2.0" id="HSUID">
            <Issuer>issuer</Issuer>
            <AttributeStatement id="HSUIDdata">
               <Attribute Name="nsi:UserType">
                  <AttributeValue>nsi:Citizen</AttributeValue>
               </Attribute>
               <Attribute Name="nsi:ActingUserCivilRegistrationNumber">
                  <AttributeValue>0804610417</AttributeValue>
               </Attribute>
               <Attribute Name="nsi:SystemOwnerName">
                  <AttributeValue>System owner</AttributeValue>
               </Attribute>
               <Attribute Name="nsi:SystemName">
                  <AttributeValue>System name</AttributeValue>
               </Attribute>
               <Attribute Name="nsi:SystemVersion">
                  <AttributeValue>0.0</AttributeValue>
               </Attribute>
               <Attribute Name="nsi:OrgResponsibleName">
                  <AttributeValue>Responsible org</AttributeValue>
               </Attribute>
            </AttributeStatement>
         </Assertion>
      </HsuidHeader>
   </soapenv:Header>
   <soapenv:Body>
      <ns3:ConsentForDataCheck xmlns:ns3="urn:dk:nsi:consentservices:verification:service:1" xmlns:ns2="urn:dk:nsi:consentservices:types">
         <ConsentDataRegistrations>
            <ns2:identifier>1</ns2:identifier>
            <ns2:origin>
               <OrganizationID>441531000016008</OrganizationID>
               <OrganizationType>SOR</OrganizationType>
            </ns2:origin>
            <ns2:createdTime>2024-06-12T14:07:24.184+02:00</ns2:createdTime>
         </ConsentDataRegistrations>
         <ConsentDataRegistrations>
            <ns2:identifier>2</ns2:identifier>
            <ns2:origin>
               <OrganizationID>441541000016001</OrganizationID>
               <OrganizationType>SOR</OrganizationType>
            </ns2:origin>
            <ns2:createdTime>2024-06-12T14:07:24.184+02:00</ns2:createdTime>
         </ConsentDataRegistrations>
         <ConsentDataRegistrations>
            <ns2:identifier>3</ns2:identifier>
            <ns2:origin>
               <OrganizationID>943171000016001</OrganizationID>
               <OrganizationType>SOR</OrganizationType>
            </ns2:origin>
            <ns2:createdTime>2024-06-12T14:07:24.184+02:00</ns2:createdTime>
         </ConsentDataRegistrations>
         <ConsentDataRegistrations>
            <ns2:identifier>4</ns2:identifier>
            <ns2:origin>
               <OrganizationID>885611000016001</OrganizationID>
               <OrganizationType>SOR</OrganizationType>
            </ns2:origin>
            <ns2:createdTime>2024-06-12T14:07:24.185+02:00</ns2:createdTime>
         </ConsentDataRegistrations>
         <ConsentDataRegistrations>
            <ns2:identifier>5</ns2:identifier>
            <ns2:origin>
               <OrganizationID>1024291000016004</OrganizationID>
               <OrganizationType>SOR</OrganizationType>
            </ns2:origin>
            <ns2:createdTime>2024-06-12T14:07:24.185+02:00</ns2:createdTime>
         </ConsentDataRegistrations>
         <HealthcareProfessionalIdentifier>0203014953</HealthcareProfessionalIdentifier>
         <HealthcareProfessionalOrganization>
            <OrganizationID>357681000016005</OrganizationID>
            <OrganizationType>SOR</OrganizationType>
         </HealthcareProfessionalOrganization>
         <PatientPersonCivilRegistrationIdentifier>0804610417</PatientPersonCivilRegistrationIdentifier>
      </ns3:ConsentForDataCheck>
   </soapenv:Body>
</soapenv:Envelope>
Code Block
titleConsentForDataCheck Response
collapsetrue
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Header>
      <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsu:Created>2024-06-12T12:07:50Z</wsu:Created>
         </wsu:Timestamp>
      </wsse:Security>
      <ns3:Header xmlns:ns3="http://www.medcom.dk/dgws/2006/04/dgws-1.0.xsd" xmlns:ns2="urn:dk:nsi:consentservices:types" xmlns:ns4="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ns5="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:ns6="http://www.w3.org/2000/09/xmldsig#" xmlns:ns7="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns8="http://www.nsi.dk/hsuid/2016/08/hsuid-1.1.xsd" xmlns:ns9="urn:dk:nsi:consentservices:verification:service:1">
         <ns3:SecurityLevel>3</ns3:SecurityLevel>
         <ns3:Linking>
            <ns3:FlowID>049e7650-8bd6-4d11-a60a-7d9b00f826b4</ns3:FlowID>
            <ns3:MessageID>AAABkAxYhQoQrkam3+AcolNPU0k=</ns3:MessageID>
         </ns3:Linking>
         <ns3:RequireNonRepudiationReceipt>no</ns3:RequireNonRepudiationReceipt>
      </ns3:Header>
   </soap:Header>
   <soap:Body>
      <ns9:PositiveConsentDataRegistrations xmlns:ns9="urn:dk:nsi:consentservices:verification:service:1" xmlns:ns2="urn:dk:nsi:consentservices:types" xmlns:ns3="http://www.medcom.dk/dgws/2006/04/dgws-1.0.xsd" xmlns:ns4="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ns5="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:ns6="http://www.w3.org/2000/09/xmldsig#" xmlns:ns7="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns8="http://www.nsi.dk/hsuid/2016/08/hsuid-1.1.xsd">
         <DataIdentifiers>5</DataIdentifiers>
      </ns9:PositiveConsentDataRegistrations>
   </soap:Body>
</soap:Envelope>


Samtykkeservicen Administration

...

I dette afsnit gives eksempler på, hvordan man kan bruge et Java-baseret systemet til at kalde de to services.

Kodeeksemplet er taget fra integrationstestene for servicen, og begge metodekald, variabler og parametre kommer fra integrationstesten.

Koden kan muligvis ikke være i stand til at kompilere eller køre i sin nuværende form, da den kun er beregnet som en guide til, hvordan man opretter et kald til tjenestenrequest/response ser ud når man skal kalde administrationssnitfladerne med hhv. IDWS og DGWS kald.

Eksempler på IDWS kald request og response

...

Code Block
languagexml
titleConsentModifyConstraint Request
linenumberstrue
collapsetrue
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
    xmlns:sbf="urn:liberty:sb" xmlns:sbfprofile="urn:liberty:sb:profile"
    xmlns:wsa="http://www.w3.org/2005/08/addressing"
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns:wst="http://schemas.xmlsoap.org/ws/2005/02/trust"
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header>
        <wsse:Security mustUnderstand="1" wsu:Id="security">
            <wsu:Timestamp wsu:Id="ts">
                <wsu:Created>2024-06-06T06:12:05Z</wsu:Created>
            </wsu:Timestamp>
            <saml:Assertion xmlns:xs="http://www.w3.org/2001/XMLSchema"
                ID="_ab90d15f-f08a-4453-ac1f-03a7e21b34d6" IssueInstant="2024-06-06T06:12:05Z"
                Version="2.0" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
                xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <saml:Issuer>TEST1-NSP-STS</saml:Issuer>
                <ds:Signature Id="OCESSignature">
                    <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="#_ab90d15f-f08a-4453-ac1f-03a7e21b34d6">
                            <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>JV+IRJ8WcND6FnB5d7DYcdZXcUo=</ds:DigestValue>
                        </ds:Reference>
                    </ds:SignedInfo>
                    <ds:SignatureValue>
                        I8tdrdw0v7o7vlT4s1DjnYjub9cR91OH++AV+wejhoZRmi8M5WsiJQHekEat1jspkNr+9GgozE1ehI2HBEHeRSPajzOUGSHTp72yvPN3BFQZKsR9oCWJSg+MrOsz3PBsTQD7WrOuQ65gJANVPjLMb8Czai7sI+H32k8q2A9hGCPrCZX6gajIAu/xPTIOSVnXsvfv1TmslIthf1Mws+bQDJI2NeY4KMXrK1dTxO49nr6dvbo4xaXk1TOOiJ3VKrYxwemJbLRkjchy6/tktQiHsCdKeNQ5JixiP2KJjgwy5djyd7Tb4Qvy4IdqaXwV5HtObAeaX9wE1uGtCf0vxKwlDR24/CAqx4ieOeKRpnoWp+xl3jINjww5DKiW+kPJ/X2WCUjGFytZ6VeazzZHiDUlTz0CRvcmpxcwXgCSuwT+Po6zjJtUjjyU6gt1VYOu0ZNSZgs2CZVLLM0yDgNfUF/HU+TNirz7D6QPDaiXofVYzBCtdv/jMEw9VvTRd6mypgq3</ds:SignatureValue>
                    <ds:KeyInfo>
                        <ds:X509Data>
                            <ds:X509Certificate>
                                MIIGiDCCBLygAwIBAgIUR5IfpZdXnxp/UHxA0KWAcKzWcm4wQQYJKoZIhvcNAQEKMDS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QZ32QWX3ij0VkX2mE2Pw=</ds:X509Certificate>
                        </ds:X509Data>
                    </ds:KeyInfo>
                </ds:Signature>
                <saml:Subject>
                    <saml:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent">
                        dk:gov:saml:attribute:CprNumberIdentifier:0707787777</saml:NameID>
                    <saml:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:holder-of-key">
                        <saml:SubjectConfirmationData NotOnOrAfter="2024-06-06T06:17:05Z"
                            Recipient="https://audience.nspop.dk/minspaerring">
                            <ds:KeyInfo>
                                <ds:X509Data>
                                    <ds:X509Certificate>
                                        MIIGjTCCBMGgAwIBAgIUFy4h2LTxF4eZW2LC1kay4XM2HOkwQQYJKoZIhvcNAQEKMDSgDzANBglghkgBZQMEAgEFAKEcMBoGCSqGSIb3DQEBCDANBglghkgBZQMEAgEFAKIDAgEgMGsxLTArBgNVBAMMJERlbiBEYW5za2UgU3RhdCBPQ0VTIHVkc3RlZGVuZGUtQ0EgMTETMBEGA1UECwwKVGVzdCAtIGN0aTEYMBYGA1UECgwPRGVuIERhbnNrZSBTdGF0MQswCQYDVQQGEwJESzAeFw0yMjExMjkwOTMwMjVaFw0yNTExMjgwOTMwMjRaMIGjMSIwIAYDVQQDDBlOU1AgVGVzdCBTZXJ2aWNlIENvbnN1bWVyMTcwNQYDVQQFEy5VSTpESy1POkc6OGQzZmEwNDctYzc3ZS00N2U0LWJkZDItZTkxNDg4NjEwY2U2MR4wHAYDVQQKDBVTdW5kaGVkc2RhdGFzdHlyZWxzZW4xFzAVBgNVBGEMDk5UUkRLLTMzMjU3ODcyMQswCQYDVQQGEwJESzCCAaIwDQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBALyJRrV1jHkQtPZ5Yb1BQsVv7CsH2G7xMebZh6o7Opm/Pb2+u8QKnPK2dkPXtFDn4efC6adwMN7EeDulIOC+6S/2yNcUQvD9Nbk40TBX6wqHjcQoMA9a725m1cqQiHPGxlHhQVMRzeJLjpE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jETLKLNbmgrDm1oFtnw4rVRdKtpy06D0Zh5hKmR3KDjfXt/+KiHtjqs5fmB8GVo3TxFHGnS4sOmph6l/KG4tOPhMabVWcX7vJQfIBVJMak1QHWzig4ooREvupqefYTpvP13GIG4DsyRabAlR2M3pyvdrSAU899gxASvWI6LBQlEdd4tPodAvdEEb3fHS2pnWmI56Im881jOdVtmmjWMCyPD4kP6SaBUxs7XhqZMwH8X98d5NMwPUYyyKwOVJfPrsWdfhupshcdyn2AWpVLU5GfhdRkmSdLdTKzzJOt7pPH+fS95R5MyV0febSJnSOXgNq7ICdQdiKO/HQ8/zmePRq8Ax/7DGrEA0zXENH2un6AV+7bZtELmNoU+B0MoN/AuSteAxmfTTnc8Xu45rTIXh3Vx1OS3NFggGSBvawlVkE7kWKej3o2sKtfot8a+ILzw==</ds:X509Certificate>
                                </ds:X509Data>
                            </ds:KeyInfo>
                        </saml:SubjectConfirmationData>
                    </saml:SubjectConfirmation>
                </saml:Subject>
                <saml:Conditions NotBefore="2024-06-06T06:07:05Z"
                    NotOnOrAfter="2024-06-06T06:17:05Z">
                    <saml:AudienceRestriction>
                        <saml:Audience>https://audience.nspop.dk/minspaerring</saml:Audience>
                    </saml:AudienceRestriction>
                </saml:Conditions>
                <saml:AttributeStatement>
                    <saml:Attribute Name="dk:gov:saml:attribute:SpecVer"
                        NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
                        <saml:AttributeValue xsi:type="xs:string">DK-SAML-2.0</saml:AttributeValue>
                    </saml:Attribute>
                    <saml:Attribute Name="dk:gov:saml:attribute:AssuranceLevel"
                        NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
                        <saml:AttributeValue xsi:type="xs:string">3</saml:AttributeValue>
                    </saml:Attribute>
                    <saml:Attribute Name="dk:gov:saml:attribute:CprNumberIdentifier"
                        NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:basic">
                        <saml:AttributeValue xsi:type="xs:string">0707787777</saml:AttributeValue>
                    </saml:Attribute>
                </saml:AttributeStatement>
            </saml:Assertion>
            <wsse:SecurityTokenReference
                xmlns:wsse11="http://docs.oasis-open.org/wss/oasis-wsswssecurity-secext-1.1.xsd"
                wsse11:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0"
                wsu:Id="str">
                <wsse:KeyIdentifier
                    ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLID">
                    _ab90d15f-f08a-4453-ac1f-03a7e21b34d6</wsse:KeyIdentifier>
            </wsse:SecurityTokenReference>
            <ds:Signature>
                <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="#body">
                        <ds:Transforms>
                            <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
                    Det er også muligt selv at generere en klient baseret  en WSDL.

   < </ds:Transforms>
                        <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
                        <ds:DigestValue>rrKWaW78KRA8ZlYUssBf7fAIdDU=</ds:DigestValue>
                    </ds:Reference>
                    <ds:Reference URI="#ts">
                        <ds:Transforms>
                            <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>/5bkNvVCepRJ/FDxCQ178HmcOv0=</ds:DigestValue>
                    </ds:Reference>
                    <ds:Reference URI="#str">
                        <ds:Transforms>
                            <ds:Transform
                                Algorithm="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#STR-Transform">
                                <wsse:TransformationParameters>
                                    <ds:CanonicalizationMethod
                                        Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
                                </wsse:TransformationParameters>
                            </ds:Transform>
                        </ds:Transforms>
                        <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
                        <ds:DigestValue>GeLxBItdETcTl5+4ptzc+LZ6RJM=</ds:DigestValue>
                    </ds:Reference>
                    <ds:Reference URI="#messageID">
                        <ds:Transforms>
                            <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>HS4Q58bxzY37YuAL1KnboF6nbbY=</ds:DigestValue>
                    </ds:Reference>
                    <ds:Reference URI="#action">
                        <ds:Transforms>
                            <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>sB8Zv8kw1/5/UbSq+Kn9WoMqPfw=</ds:DigestValue>
                    </ds:Reference>
                    <ds:Reference URI="#sbf">
                        <ds:Transforms>
                            <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>DrMuEoWp7Uik1KTUOuvtisxvpXA=</ds:DigestValue>
                    </ds:Reference>
                </ds:SignedInfo>
                <ds:SignatureValue>
                    I1e0zGKDfVmWaxNc38W8/hFyQfz2yYevjsG0EMk1DaT6ORsrVE6OYaoVJ1y5zGXJ7cjhlV278oWjBXx0N+xoI99d4/yxWwnVOxgVcGks46FHCeCgEd66c17rfHLmyG1cJFhKxLM0MduZD4iCiCo6e+bsECo3FSNuTfcLeuHucfmUCxzujDxG0/dkyfwKcIWgTBKZUesgrrEZXcoUZyYiXDQMhHUpNmC/M28BuSxyqUNl/6ej3/8j9bDEbNAN8tlvO60qWQ+ONCcuzRGoKfHZ6aYm0NHWXWiL86QmZ5oAf7HPP3NKS/lso0IDC8+D5A6dKf/EAcbknF88jTJEo9HcrBpJdBEa2ANG9daLgFuHvsC7dNc4Oe8nWRKFjKkSSpf6lvyRjSB+FLwCknPHX/Q2nxkOKMz4hjlZKaDn9V05kW0NxWKBWDdgLYw8uwkUTjuP3hv35L63iJcHgalBNxSUnjNac8T21CO19WwCitENX67M1CZz8Sz+Lk9qJeOzGIO1</ds:SignatureValue>
                <ds:KeyInfo>
                    <wsse:SecurityTokenReference
                        xmlns:wsse11="http://docs.oasis-open.org/wss/oasis-wsswssecurity-secext-1.1.xsd"
                        wsse11:TokenType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0"
                        wsu:Id="sigStr">
                        <wsse:KeyIdentifier
                            ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLID">
                            _ab90d15f-f08a-4453-ac1f-03a7e21b34d6</wsse:KeyIdentifier>
                    </wsse:SecurityTokenReference>
                </ds:KeyInfo>
            </ds:Signature>
        </wsse:Security>
        <wsa:MessageID wsu:Id="messageID">9fbc6a35-3f0c-4f14-b83e-945225fa0eef</wsa:MessageID>
        <wsa:Action wsu:Id="action">
            http://sundhedsdatastyrelsen.dk/minspaerring/2020/11/04#ConsentModifyConstraint</wsa:Action>
        <sbf:Framework sbfprofile:profile="urn:liberty:sb:profile:basic" version="2.0" wsu:Id="sbf" />
    </soapenv:Header>
    <soapenv:Body wsu:Id="body">
        <ns3:ConsentModifyConstraint
            xmlns:ns3="http://sundhedsdatastyrelsen.dk/minspaerring/2020/11/04"
            xmlns:ns2="urn:dk:nsi:consentservices:types">
            <ConsentModifications>
                <ns2:consentId>123498765532117</ns2:consentId>
                <ns2:citizenCPR>0707787777</ns2:citizenCPR>
                <ns2:what>
                    <ns2:includeSubOrganizations>false</ns2:includeSubOrganizations>
                    <ns2:organizationIdentifier>8041000016000</ns2:organizationIdentifier>
                    <ns2:referralEnd>2024-06-07T00:00:00.000+02:00</ns2:referralEnd>
                    <ns2:referralStart>2024-06-06T08:12:03.995+02:00</ns2:referralStart>
                </ns2:what>
                <ns2:validFromDate>2024-06-05T21:30:06.000+02:00</ns2:validFromDate>
            </ConsentModifications>
        </ns3:ConsentModifyConstraint>
    </soapenv:Body>
</soapenv:Envelope>

...

Medcom-headeren er pakket ind i et holderobjekt, da det er en request/response-parameter.

Eksempel på kald af Samtykkeservicen Verifikation

Et eksempel på kald af  ConsentForDataCheck er vist her.

Code Block
languagejava
List<ConsentDataRegistration> consentData; // the list must be populated elsewhere

ConsentForDataCheck consentForDataCheck =
new ConsentForDataCheck(citizen, healthcareProfessional, onBehalfOf,
organization, consentData);

ConsentForDataResponse consentForDataCheckResponse =
PORT.ConsentForDataCheck(consentForDataCheck, medcomHeader,
signedHeaders.getSecurityHeader(), hsuidHeader);

Elementet consentData skal være en liste over ConsentDataRegistration-objekter, se MinSpærring - Administration Service Interface Beskrivelse.

Servicen returnerer en liste af ID'er som den sundhedsfaglige har samtukke til at få vist.

Eksempel på kald af Samtykkeservicen Administration

Her vises et eksempel på et kald til ConsentAdd i administrationsservicen. Indholdet af det faktiske samtykkeobjekt vises ikke her:

Code Block
languagejava
Consent consentItem = new Consent();
consentItem.setCitizenCPR(citizen);
consentItem.setPositiveConsent(positive);
consentItem.setValidFromDate(validFrom);
consentItem.setValidToDate(validTo);
consentItem.setWho(who);
consentItem.setWhat(what);

PORT.ConsentAdd(Arrays.<Consent>asList(consentItem), medcomHeader,
signedHeaders.getSecurityHeader(), hsuidHeader);

Klient generering fra WSDL

Det er også muligt selv at generere en klient baseret på en WSDL.

Samtykkeservicen services versioner

...