From 7a5b350a93990956106d91679240b6e8326cb110 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 5 Nov 2014 08:07:15 +0100 Subject: change more client implementations to APACHE CXF --- src/main/java/at/gv/util/client/szr/SZRClient.java | 47 +++++++++++++++++----- 1 file changed, 38 insertions(+), 9 deletions(-) (limited to 'src/main/java/at/gv/util/client') diff --git a/src/main/java/at/gv/util/client/szr/SZRClient.java b/src/main/java/at/gv/util/client/szr/SZRClient.java index 956cebc..159f718 100644 --- a/src/main/java/at/gv/util/client/szr/SZRClient.java +++ b/src/main/java/at/gv/util/client/szr/SZRClient.java @@ -31,8 +31,16 @@ import at.gv.util.wsdl.szr.SZRException; import at.gv.util.wsdl.szr.SZRService; import at.gv.util.xsd.szr.FremdBPKRequestType; import at.gv.util.xsd.szr.FremdBPKType; +import at.gv.util.xsd.szr.GetBPK; +import at.gv.util.xsd.szr.GetBPKResponse; +import at.gv.util.xsd.szr.GetIdentityLink; +import at.gv.util.xsd.szr.GetIdentityLinkResponse; +import at.gv.util.xsd.szr.GetStammzahl; +import at.gv.util.xsd.szr.GetStammzahlResponse; import at.gv.util.xsd.szr.IdentityLinkType; import at.gv.util.xsd.szr.PersonInfoType; +import at.gv.util.xsd.szr.TransformBPK; +import at.gv.util.xsd.szr.TransformBPKResponse; import at.gv.util.xsd.szr.pvp.PvpTokenType; import at.gv.util.xsd.szr.xmldsig.KeyValueType; @@ -55,12 +63,22 @@ public class SZRClient { public IdentityLinkType getIdentityLink(PersonInfoType personInfo, List keyValue, Boolean insertERnP) throws SZRException { MiscUtil.assertNotNull(personInfo, "personInfo"); MiscUtil.assertNotNull(keyValue, "keyValue"); - return this.szr.getIdentityLink(personInfo, keyValue, insertERnP); + + GetIdentityLink idlReq = new GetIdentityLink(); + idlReq.setInsertERnP(insertERnP); + idlReq.setPersonInfo(personInfo); + idlReq.getKeyValue().addAll(keyValue); + + GetIdentityLinkResponse idlResp = this.szr.getIdentityLink(idlReq); + return idlResp.getGetIdentityLinkReturn(); } - public String getStammzahl(PersonInfoType personInfo) throws SZRException { - MiscUtil.assertNotNull(personInfo, "personInfo"); - return this.szr.getStammzahl(personInfo); + public String getStammzahl(PersonInfoType personInfo) throws SZRException { + MiscUtil.assertNotNull(personInfo, "personInfo"); + GetStammzahl req = new GetStammzahl(); + req.setPersonInfo(personInfo); + GetStammzahlResponse resp = this.szr.getStammzahl(req ); + return resp.getStammzahl(); } public String getBPK(PersonInfoType personInfo, String target, String vkz) throws SZRException, EgovUtilException { @@ -75,11 +93,15 @@ public class SZRClient { } else { targetString = target; } - Holder returnBPK = new Holder(); - this.szr.getBPK(personInfo, targetString, vkz, null, false, returnBPK, null, null); - - return returnBPK.value; + GetBPK req = new GetBPK(); + req.setPersonInfo(personInfo); + req.setBereichsKennung(targetString); + req.setVKZ(vkz); + req.setListMultiplePersons(false); + GetBPKResponse resp = this.szr.getBPK(req); + return resp.getGetBPKReturn(); + } public String transformBPK(PersonInfoType personInfo, String inputBpk, String inputTarget, String target, String vkz) throws SZRException, EgovUtilException { @@ -100,7 +122,14 @@ public class SZRClient { rt.setVKZ(vkz); List list = new ArrayList(); list.add(rt); - List response = this.szr.transformBPK(personInfo, inputBpk, inputTarget, "kt", list); + + TransformBPK req = new TransformBPK(); + req.setPersonInfo(personInfo); + req.setInputBereichsKennung(targetString); + req.setInputBPK(inputBpk); + req.setBegruendung("kt"); + TransformBPKResponse resp = this.szr.transformBPK(req ); + List response = resp.getTransformBPKReturn(); if (response == null) { return null; } -- cgit v1.2.3