diff options
author | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2017-06-28 12:33:25 +0200 |
---|---|---|
committer | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2017-06-28 12:33:25 +0200 |
commit | ae378f2293528188235be596af8d68504803e082 (patch) | |
tree | 60135a03d5cbd4c8e5376992833522101e3dab5d /moaSig/moa-sig-lib/src/main/java/at/gv | |
parent | 8911eecba03b45e95579c6ed76deb1867c6c609b (diff) | |
download | moa-sig-ae378f2293528188235be596af8d68504803e082.tar.gz moa-sig-ae378f2293528188235be596af8d68504803e082.tar.bz2 moa-sig-ae378f2293528188235be596af8d68504803e082.zip |
fix problem in CMS response builder
Diffstat (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv')
-rw-r--r-- | moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateCMSSignatureResponseBuilder.java | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateCMSSignatureResponseBuilder.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateCMSSignatureResponseBuilder.java index d808f2b..7ce0871 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateCMSSignatureResponseBuilder.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateCMSSignatureResponseBuilder.java @@ -80,22 +80,35 @@ public class CreateCMSSignatureResponseBuilder { public Document build(CreateCMSSignatureResponse response) { Iterator iter; - + + + for (iter = response.getResponseElements().iterator(); iter.hasNext();) { - CreateCMSSignatureResponseElement responseElement = - (CreateCMSSignatureResponseElement) iter.next(); - switch (responseElement.getResponseType()) { - case CreateCMSSignatureResponseElement.CMS_SIGNATURE : - CMSSignatureResponse cmsSignatureResponse = (CMSSignatureResponse) responseElement; + Object responseObj = iter.next(); + + if (responseObj instanceof ErrorResponse) { + ErrorResponse errorResponse = (ErrorResponse) responseObj; + addErrorResponse(errorResponse); + + } else if (responseObj instanceof CreateCMSSignatureResponseElement) { + CMSSignatureResponse cmsSignatureResponse = (CMSSignatureResponse) responseObj; addCMSSignature(cmsSignatureResponse); - break; - - case CreateCMSSignatureResponseElement.ERROR_RESPONSE : - ErrorResponse errorResponse = (ErrorResponse) responseElement; - addErrorResponse(errorResponse); - break; - } + + } + +// CreateCMSSignatureResponseElement responseElement = +// (CreateCMSSignatureResponseElement) iter.next(); +// +// switch (responseElement.getResponseType()) { +// case CreateCMSSignatureResponseElement.CMS_SIGNATURE : +// +// break; +// +// case CreateCMSSignatureResponseElement.ERROR_RESPONSE : +// +// break; +// } } |