<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope 
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2003/05/soap-envelope http://www.w3.org/2003/05/soap-envelope/"
xmlns:saml="urn:oasis:names:tc:SAML:2.0"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:medcom="http://www.medcom.dk">
	<soap:Header>
		<wsse:Security soap:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
			<!-- SOAP beskedens gyldighed (5 minutter) -->
			<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
				<wsu:Created>2006-01-04T08:03:46.918Z</wsu:Created>
				<wsu:Expires>2006-01-04T08:08:46.918Z</wsu:Expires>
			</wsu:Timestamp>

			<!-- START SOSI ID-kort -->
			<saml:Assertion
				AssertionID="_a75adf55-01d7-40cc-929f-dbd8372ebdfc"
				IssueInstant="2006-01-05T07:53:00Z"
				Issuer ="www.sundhed.dk"
				MajorVersion="1"
				MinorVersion="1"
				 id="SOSIIDCard"
			>
				<!-- ID-kortets gyldighedsperiode (24t) -->
				<saml:Conditions
					NotBefore="2006-01-05T07:53:00.00Z"
					NotOnOrAfter="2006-01-06T07:53:00.000Z"
					id="IDCardValidityToBeSignedByIdP"
				/>
				<saml:AttributeStatement id="IDCardAttributesToBeSignedByIdP">
					<saml:Subject>
						<saml:NameID Format="SOSI-OCES-ID">
							SERIALNUMBER=CVR:12345678-RID:234284, CN=Jan Riis, O=Ribeamt // CVR:12345678, C=DK
						</saml:NameID>
						<saml:SubjectConfirmation>
							<saml:ConfirmationMethod>
								urn:oasis:names:tc:SAML:1.0:cm:holder-of-key
							</saml:ConfirmationMethod>
							<saml:SubjectConfirmationData xsi:type="saml:KeyInfoConfirmationDataType">
								<ds:KeyInfo>
									<ds:KeyName>CVR:...-RID:...</ds:KeyName>
								</ds:KeyInfo>
							</saml:SubjectConfirmationData>
						</saml:SubjectConfirmation>
					</saml:Subject>
					
					<!-- Her følger alle attributterne på "ID-kortet" -->
					<saml:Attribute AttributeName="sosi:IDCardVersion">
						<saml:AttributeValue>1.0</saml:AttributeValue>
					</saml:Attribute>
					<saml:Attribute AttributeName="sosi:IDCardVersion">
						<saml:AttributeValue>1.0</saml:AttributeValue>
					</saml:Attribute>
					<saml:Attribute AttributeName="sosi:IDCardType">
						<saml:AttributeValue>user</saml:AttributeValue>
					</saml:Attribute>
					<saml:Attribute AttributeName="sosi:AuthenticationLevel">
						<saml:AttributeValue>3</saml:AttributeValue>
					</saml:Attribute>
					<saml:Attribute AttributeName="sosi:publicRSAKey">
						<saml:AttrbuteValue>
								<ds:RSAKeyValue>
									 <ds:Modulus>
										 xA7SEU+e0yQH5rm9kbCDN9o3aPIo7HbP7tX6WOocLZAtNfyxSZDU16ksL6W
										 jubafOqNEpcwR3RdFsT7bCqnXPBe5ELh5u4VEy19MzxkXRgrMvavzyBpVRgBUwUlV
										 5foK5hhmbktQhyNdy/6LpQRhDUDsTvK+g9Ucj47es9AQJ3U=
									 </ds:Modulus>
									 <ds:Exponent>AQAB</ds:Exponent>
							   </ds:RSAKeyValue>
						</saml:AttrbuteValue>
					</saml:Attribute>
					<!-- ... osv. med
					   medcom:UserCivilRegistrationNumber - CPR-nr
					   medcom:UserOccupation - Ansættelse
					   medcom:UserGivenName - Fornavn
					   medcom:UserSurName - Efternavn
					   medcom:UserEMailAdress - Email adresse
					   medcom:UserRole - Brugerrolle jf. kommende klassifikation fra sundhed.dk's brugerkatalogprojekt
					   medcom:UserITSystem - Afsendersystem ID
					   medcom:UserOrganisationName - Organisationsnavn
					   medcom:UserOrganisationCVR - Organisations CVR nr.
					-->
				</saml:AttributeStatement>
				
				<!-- IdP'ens signatur af ID-kortet -->
				<ds:Signature>
					<ds:SignedInfo>
						<ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
						<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
						<ds:Reference URI="#IDCardAttributesToBeSignedByIdP">
							<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
							<ds:DigestValue>vUp8WhN8DeXtbEffhQRnIuZYtcQ=</ds:DigestValue>
						</ds:Reference>
						<ds:Reference URI="#IDCardValidityToBeSignedByIdP">
							<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
							<ds:DigestValue>EffhQRnIuZYtcQvUp8WhN8DeXtb=</ds:DigestValue>
						</ds:Reference>
					</ds:SignedInfo>
					<ds:SignatureValue>
						OaG4RVdBKBKpB5q27OqBhi9NW9n4b5mHhBpoJXKDt8sVF3nT3aR9lsORK10
						zjnZjBi8kI1QVBG8jFkDkvPBEgJXBLaVkHf6oK5iVDUaBY+CxbXfPWo qB0JItwbcDnc8Aj6Od0=
					</ds:SignatureValue>
					<ds:KeyInfo>
						<ds:KeyName>CVR:....-RID:....</ds:KeyName>
					</ds:KeyInfo>
				</ds:Signature>
			</saml:Assertion>
			<!-- SLUT SOSI ID-kort -->

			<!-- START MedCom "konvolut" data -->
			<saml:Assertion
				AssertionID="_27akjj-75adf55-01d7-40cc-a78ekdi4bage"
				IssueInstant="2006-01-05T08:03:00Z"
				Issuer ="www.ribeamt.dk"
				MajorVersion="1"
				MinorVersion="1"
			>
				<saml:AttributeStatement
					id="EnvelopeToBeSigned"
				>
					<!-- Her følger alle attributterne på "konvolutten" -->

					<saml:Attribute AttributeName="sosi:RequireNonRepudiationReceipt">yes</saml:Attribute>
					
					<saml:Attribute AttributeName="medcom:SecurityType"> ... </saml:Attribute>
					<saml:Attribute AttributeName="medcom:PatientConsentCode"> ... </saml:Attribute>
					<saml:Attribute AttributeName="medcom:PatientConsentRemark"> ... </saml:Attribute>
					<saml:Attribute AttributeName="medcom:SenderEANIdentifier"> ... </saml:Attribute>
					<saml:Attribute AttributeName="medcom:SenderDepartmentIdentifier"> ... </saml:Attribute>
					<saml:Attribute AttributeName="medcom:SenderPersonIdentifier"> ... </saml:Attribute>
					<saml:Attribute AttributeName="medcom:ReceiverEANIdentifier"> ... </saml:Attribute>
					<saml:Attribute AttributeName="medcom:ReceiverDepartmentIdentifier"> ... </saml:Attribute>
					<saml:Attribute AttributeName="medcom:ReceiverPersonIdentifier"> ... </saml:Attribute>
					<!-- ... osv. -->
				</saml:AttributeStatement>
			</saml:Assertion>
			<!-- SLUT MedCom "konvolut" data -->			
			
			<!-- START Digital signatur af konvolut og meddelelse -->
			<ds:Signature>
				<ds:SignedInfo>
					<ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
					<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
					<ds:Reference URI="#EnvelopeToBeSigned">
						<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
						<ds:DigestValue>VBG8jFkDkvPBEgJXBLaVkHf6oK5i=</ds:DigestValue>
					</ds:Reference>
					<ds:Reference URI="#MessageToBeSigned">
						<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
						<ds:DigestValue>vUp8WhN8DeXtbEffhQRnIuZYtcQ=</ds:DigestValue>
					</ds:Reference>
				</ds:SignedInfo>
				<ds:SignatureValue>
					NFAnBZLz/jOaG4RVdBKBKpB5q27OqBhi9NW9n4b5mHhBpoJXKDt8sVF3nT3aRlWklYCyzNO6fiUYqWEJcNFJmFHs
					/9lsORK10zjnZjBi8kI1QVBG8jFkDkvPBEgJXBLaVkHf6oK5iVDUaBY+CxbXfPWo qB0JItwbcDnc8Aj6Od0=
				</ds:SignatureValue>
				<ds:KeyInfo>
					<!-- jf. "SAML Token Profile 3.3.2 SAML Assertion Referenced from KeyInfo" -->
					<wsse:SecurityTokenReference>
						<wsse:KeyIdentifier ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID">
							_a75adf55-01d7-40cc-929f-dbd8372ebdfc
						</wsse:KeyIdentifier>
				</wsse:SecurityTokenReference>
				</ds:KeyInfo>
			</ds:Signature>
			<!-- SLUT Digital signatur af konvolut og meddelelse -->
		</wsse:Security>
	</soap:Header>
	<soap:Body>
		<XYZ>Some message</XYZ>
	</soap:Body>
</soap:Envelope>
