Page History
...
Som klient sender man et ReplicationRequest til servicen.
Forespørgsel:
...
| Code Block | ||
|---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?> |
...
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> |
...
<S:Header> |
...
… |
...
</S:Header> |
...
<S:Body> |
...
<ns1:ReplicationRequest xmlns:ns1="http://nsi.dk/2011/10/21/StamdataKrs/"> |
...
<register>cpr</register> |
...
<datatype>person</datatype> |
...
<version>1</version> |
...
<registerVersion>1</registerVersion> |
...
<offset>0</offset> |
...
</ns1:ReplicationRequest> |
...
</S:Body> |
...
</S:Envelope> |
Headeren skal indeholde en DGWS 1.0.1 header.
...
Hvis alt går som forventet og forespørgslen bliver godkendt modtages et svar:
Svar:
| Code Block | ||
|---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?> |
...
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> |
...
<S:Header> |
...
… |
...
</S:Header> |
...
<S:Body> |
...
<ns1:ReplicationResponse xmlns:ns1="http://nsi.dk/2011/10/21/StamdataKrs/"> |
...
<atom:feed xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://nsi.dk/-/stamdata/3.0/cpr"> |
...
<atom:id>tag:nsi.dkersonLookupWithSubscriptionIntegrationTest.java,2011:cpr/person/v1</atom:id> |
...
<atom:updated>2011-10-25T07:02:08.045Z</atom:updated> |
...
<atom:title>Stamdata Registry Feed</atom:title> |
...
<atom:author> |
...
<atom:name>National Sundheds IT</atom:name> |
...
</atom:author> |
...
… |
...
</atom:feed> |
...
</ns1:ReplicationResponse> |
...
</S:Body> |
...
</S:Envelope> |
Opstår der derimod en fejl, bliver en DGWS 1.0.1 Fault sendt tilbage, f.eks.:
Fejl:
...
| Code Block | ||
|---|---|---|
| ||
<soapenv:Envelope ...> |
...
<soapenv:Header>...</soapenv:Header> |
...
<soapenv:Body> |
...
<soapenv:Fault> |
...
<faultcode>Server</faultcode> |
...
<detail> |
...
<medcom:FaultCode>expired_idcard</medcom:FaultCode> |
...
</detail> |
...
<faultstring>The ID card has expired.</faultstring> |
...
</soapenv:Fault> |
...
</soapenv:Body> |
...
</soapenv:Envelope> |
3.5.2 Eksempel på kald til RFS
Som klient sender man et ReplicationRequest til servicen.
Forespørgsel:
...
| Code Block | ||
|---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?> |
...
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> |
...
<S:Header> |
...
… |
...
</S:Header> |
...
<S:Body> |
...
<ns1:ReplicationRequest xmlns:ns1="http://nsi.dk/2021/03/03/StamdataRfs/"> |
...
<register>cpr</register> |
...
<datatype>person</datatype> |
...
<version>1</version> |
...
<registerVersion>1</registerVersion> |
...
<idList> |
...
<id>1112579876</id> |
...
<id>2211657418</id> |
...
</idList> |
...
<filter>filter 1</filter> |
...
</ns1:ReplicationRequest> |
...
</S:Body> |
...
</S:Envelope> |
Headeren skal indeholde en DGWS 1.0.1 header.
...
3.5.3 Eksempel på svar ved brug af et filter til RFS
| Code Block | ||
|---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?> |
...
<atom:feed xmlns:atom="http://www.w3.org/2005/Atom" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="http://www.medcom.dk/dgws/2006/04/dgws-1.0.xsd" xmlns:ns3="http://www.w3.org/2000/09/xmldsig#" xmlns:ns4="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:ns5="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns6="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ns7="http://nsi.dk/2024/02/27/StamdataRfs/"> |
...
<atom:id>tag:nsi.dk,2011:cpr/person/v1</atom:id> |
...
<atom:updated>2024-04-23T12:55:05.129Z</atom:updated> |
...
<atom:title>Stamdata Registry Feed</atom:title> |
...
<atom:author> |
...
<atom:name>National Sundheds IT</atom:name> |
...
</atom:author> |
...
<atom:entry> |
...
<atom:id>tag:nsi.dk,2011:cpr/person/v1/17136504000000005006</atom:id> |
...
<atom:title/> |
...
<atom:updated>2024-04-20T22:00:00.000Z</atom:updated> |
...
<atom:content type="application/xml"> |
...
<person:person xmlns="http://nsi.dk/-/stamdata/3.0/cpr" xmlns:person="http://nsi.dk/-/stamdata/3.0/cpr"> |
...
<cpr>0102451234</cpr> |
...
<koen>M</koen> |
...
<fornavn>Peter</fornavn> |
...
<mellemnavn>Sigurd</mellemnavn> |
...
</person:person> |
...
</atom:content> |
...
</atom:entry> |
...
</atom:feed> |
3.6 Detaljeret svar fra KRS
Her følger et mere detaljeret output fra KRS. Tolkning af dette er beskrevet i afsnittet efter.
...
| Code Block |
|---|
<atom:feed xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://nsi.dk/-/stamdata/3.0/cpr"> |
...
<atom:id>tag:nsi.dk,2011:cpr/person/v1</atom:id> |
...
<atom:updated>2011-11-07T09:56:12.278Z</atom:updated> |
...
<atom:title>Stamdata Registry Feed</atom:title> |
...
<atom:author> |
...
<atom:name>National Sundheds IT</atom:name> |
...
</atom:author> |
...
<atom:entry> |
...
<atom:id>tag:nsi.dk,2011:cpr/person/v1/13206597710000000085</atom:id> |
...
<atom:title/> |
...
<atom:updated>2011-11-07T09:56:11.000Z</atom:updated> |
...
<atom:content type="application/xml"> |
...
<person> |
...
<cpr>0102451234</cpr> |
...
<koen>M</koen> |
...
<fornavn>Hans</fornavn> |
...
<mellemnavn/> |
...
<efternavn>Hansen</efternavn> |
...
<coNavn></coNavn> |
...
<lokalitet/> |
...
<vejnavn>Ligustervænget</vejnavn> |
...
<bygningsnummer>42</bygningsnummer> |
...
<husnummer>123</husnummer> |
...
<etage>12</etage> |
...
<sideDoerNummer>th.</sideDoerNummer> |
...
<bynavn>Enby</bynavn> |
...
<postnummer>1448</postnummer> |
...
<postdistrikt>Nøddebo</postdistrikt> |
...
<status>01</status> |
...
<gaeldendeCPR>3105459876</gaeldendeCPR> |
...
<foedselsdato>1947-12-24T00:00:00+01:00</foedselsdato> |
...
<stilling/> |
...
<vejKode>740</vejKode> |
...
<kommuneKode>314</kommuneKode> |
...
<validFrom>2011-11-07T10:56:21+01:00</validFrom> |
...
<validTo>2012-11-07T10:56:11+01:00</validTo> |
...
</person> |
...
</atom:content> |
...
</atom:entry> |
...
</atom:feed> |
3.7 Parsing af output
Responset fra SKRS og SRFS består af et antal metadata-felter, som indeholder overordnet information om de data der er i responset, samt en række entry-elementer. Et entry-element beskriver hvordan et forretningsobjekt så ud i en bestemt periode, repræsenteret ved ValidFrom- og ValidTo-felterne. Med forretningsobjekt menes her en instans af en datatype. Et forretningsobjekt er f.eks. instansen af datatypen 'Person' i CPR-registret med cpr-nummer '0102451234'. Et forretningsobjekt beskrives således af et antal entry-elementer, ét for hver version.
...