aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz
diff options
context:
space:
mode:
authorChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-10-07 13:52:43 +0200
committerChristof Rabensteiner <christof.rabensteiner@iaik.tugraz.at>2019-10-07 13:52:43 +0200
commitee244162599b676d17d1974101ded38f74ea2898 (patch)
tree989b1c9a981fae4d7d2daec940583db79d8d9d50 /src/main/java/at/gv/egiz
parentfdb4a2ad85f94edb406ab993ca76230050b4c769 (diff)
downloadmoa-zs-ee244162599b676d17d1974101ded38f74ea2898.tar.gz
moa-zs-ee244162599b676d17d1974101ded38f74ea2898.tar.bz2
moa-zs-ee244162599b676d17d1974101ded38f74ea2898.zip
Fixes in app2mzs Schema and Code
app2mzs Schema Changes: - mzs:MessageType/ZSDeliveryID was mandatory. However, in certain cases the ZSDeliveryID does not exist (Example: perform QueryPersonRequest, request fails > no ZSDeliveryID). This element is now optional. - mzs:Error/Code was of type xs:integer, is now xs:string. Reason: msg:Code is also of type string. Incorporate app2mzs schema changes into code base.
Diffstat (limited to 'src/main/java/at/gv/egiz')
-rw-r--r--src/main/java/at/gv/egiz/moazs/scheme/Msg2MzsConverter.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/scheme/Msg2MzsConverter.java b/src/main/java/at/gv/egiz/moazs/scheme/Msg2MzsConverter.java
index 0a3afb5..0e01e03 100644
--- a/src/main/java/at/gv/egiz/moazs/scheme/Msg2MzsConverter.java
+++ b/src/main/java/at/gv/egiz/moazs/scheme/Msg2MzsConverter.java
@@ -21,6 +21,7 @@
*******************************************************************************/
package at.gv.egiz.moazs.scheme;
+import at.gv.egiz.moazs.util.NullCoalesce;
import at.gv.zustellung.app2mzs.xsd.DeliveryNotificationType;
import at.gv.zustellung.app2mzs.xsd.*;
import at.gv.zustellung.msg.xsd.*;
@@ -89,6 +90,7 @@ public class Msg2MzsConverter {
}
private ErrorType convert(DeliveryRequestStatusType.Error error, Optional<byte[]> signedStatus, RelayedViaERV relayed) {
+
var builder = errorTypeBuilder()
.withAppDeliveryID(error.getAppDeliveryID())
.withDeliverySystem(error.getDeliverySystem())
@@ -97,9 +99,9 @@ public class Msg2MzsConverter {
.withSignedDeliveryRequestStatus(signedStatus.orElse(null))
.withPreAdviceNoteSent(error.getPreAdviceNoteSent())
.withRelayedViaERV(relayed)
- .withCode(new BigInteger(error.getErrorInfo().getCode()));
+ .withCode(error.getErrorInfo().getCode());
- if(error.getErrorInfo().getText() != null) builder.withText(error.getErrorInfo().getText());
+ if (error.getErrorInfo().getText() != null) builder.withText(error.getErrorInfo().getText());
return builder.build();
}
@@ -142,7 +144,7 @@ public class Msg2MzsConverter {
.withZSDeliveryID(msgNotification.getZSDeliveryID())
.withGZ(msgNotification.getGZ())
.withSignedDeliveryRequestStatus(signedNotification.orElse(null))
- .withCode(new BigInteger(error.getErrorInfo().getCode()))
+ .withCode(error.getErrorInfo().getCode())
.withText(error.getErrorInfo().getText())
.build();
}