diff options
Diffstat (limited to 'moaSig/moa-sig-lib/src/main/java/at')
-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; +// } } |