diff options
author | gregor <gregor@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2005-05-24 06:53:17 +0000 |
---|---|---|
committer | gregor <gregor@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2005-05-24 06:53:17 +0000 |
commit | e7eff78fc7203634be4744f8bff707201aa989d7 (patch) | |
tree | 1ad040fae44226b81440aa96eb1b018de667f8a3 /spss.handbook/clients/api/src/at/gv/egovernment/moa | |
parent | d2ab372857ec9165a069c5109328941a71b66739 (diff) | |
download | moa-id-spss-e7eff78fc7203634be4744f8bff707201aa989d7.tar.gz moa-id-spss-e7eff78fc7203634be4744f8bff707201aa989d7.tar.bz2 moa-id-spss-e7eff78fc7203634be4744f8bff707201aa989d7.zip |
Beispiel angepasst, sodass es dem XML-Request aus dem Anwenderhandbuch aus Abschnitt 2.1.1.1 entspricht.
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@328 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'spss.handbook/clients/api/src/at/gv/egovernment/moa')
-rw-r--r-- | spss.handbook/clients/api/src/at/gv/egovernment/moa/spss/handbook/clients/api/CreateXMLSignature.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spss.handbook/clients/api/src/at/gv/egovernment/moa/spss/handbook/clients/api/CreateXMLSignature.java b/spss.handbook/clients/api/src/at/gv/egovernment/moa/spss/handbook/clients/api/CreateXMLSignature.java index 33924bc01..2534e4913 100644 --- a/spss.handbook/clients/api/src/at/gv/egovernment/moa/spss/handbook/clients/api/CreateXMLSignature.java +++ b/spss.handbook/clients/api/src/at/gv/egovernment/moa/spss/handbook/clients/api/CreateXMLSignature.java @@ -61,22 +61,22 @@ public class CreateXMLSignature // Zu signierende Daten in ein Contentobjekt einbinden (die Daten werden hier explizit angegeben, // sollen aber in der Signatur mittels URL "http://uri.data.org" referenziert werden - byte[] data = "Dies sind Testdaten".getBytes("UTF-8"); + byte[] data = "Diese Daten werden signiert.".getBytes("UTF-8"); ByteArrayInputStream bis = new ByteArrayInputStream(data); - Content cont = spf.createContent(bis, "http://uri.data.org"); + Content cont = spf.createContent(bis, null); // Metainformationen zu den zu signierenden Daten erstellen - MetaInfo mi = spf.createMetaInfo("text/plain", "Testdaten", null, null); + MetaInfo mi = spf.createMetaInfo("text/plain", null, null, null); // Transformationen erstellen (hier werden keine Transformationen angewandt) CreateTransformsInfo cti = spf.createCreateTransformsInfo(null, mi); CreateTransformsInfoProfile ct = spf.createCreateTransformsInfoProfile(cti, null); // Datenobjekt aufbauen - DataObjectInfo doi = spf.createDataObjectInfo(DataObjectInfo.STRUCTURE_DETACHED, false, cont, ct); + DataObjectInfo doi = spf.createDataObjectInfo(DataObjectInfo.STRUCTURE_ENVELOPING, false, cont, ct); - // Erstellen eines SingleSignatureInfo-Containers (enthält alle Angaben zur Erstellung *einer* - // Signatur + // Erstellen eines SingleSignatureInfo-Containers + // Enthält alle Angaben zur Erstellung *einer* Signatur List dataobjectinfolist = new ArrayList(); dataobjectinfolist.add(doi); SingleSignatureInfo ssi = spf.createSingleSignatureInfo(dataobjectinfolist, null, false); |