diff options
author | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2014-11-05 08:07:15 +0100 |
---|---|---|
committer | Thomas Lenz <thomas.lenz@egiz.gv.at> | 2014-11-05 08:07:15 +0100 |
commit | 7a5b350a93990956106d91679240b6e8326cb110 (patch) | |
tree | 138196b56fb04f186f05387f8f68be6bd91a0e85 /src/main/java/at/gv/util/client | |
parent | e2150f22562b4bc06307f4ac7b842687390e4856 (diff) | |
download | egovutils-7a5b350a93990956106d91679240b6e8326cb110.tar.gz egovutils-7a5b350a93990956106d91679240b6e8326cb110.tar.bz2 egovutils-7a5b350a93990956106d91679240b6e8326cb110.zip |
change more client implementations to APACHE CXF
Diffstat (limited to 'src/main/java/at/gv/util/client')
-rw-r--r-- | src/main/java/at/gv/util/client/szr/SZRClient.java | 47 |
1 files changed, 38 insertions, 9 deletions
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<KeyValueType> 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<String> returnBPK = new Holder<String>(); - 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<FremdBPKRequestType> list = new ArrayList<FremdBPKRequestType>(); list.add(rt); - List<FremdBPKType> 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<FremdBPKType> response = resp.getTransformBPKReturn(); if (response == null) { return null; } |