@Test public void findTvlLoetelu2V1() throws Exception { Set<String> isikukoodid = new HashSet<String>( Arrays.asList("46111030234", "38606132730", "48703220267", "48702160305", "48809083723", "47205076025", "38611122787", "48702160305", "37203312721", "46805252737", "47710130255")); Calendar alates = Calendar.getInstance(); alates.set(2007, Calendar.JANUARY, 1); Calendar kuni = Calendar.getInstance(); kuni.set(2016, Calendar.DECEMBER, 31); TvlLoetelu2ResponseType response = kirstXTeeServiceImpl.findTvlLoetelu2V1(isikukoodid, alates.getTime(), kuni.getTime()); Assert.assertNotNull(response); Assert.assertNotNull(response.getTvlid()); }
public TvlLoetelu2ResponseType findTvlLoetelu2V1(Set<String> isikukoodid, Date alates, Date kuni) throws XRoadServiceConsumptionException { if (CollectionUtils.isEmpty(isikukoodid)) { throw new IllegalArgumentException("At least one 'isikukood' must be provided"); } TvlLoetelu2RequestType request = createTvlLoetelu2V1Request(isikukoodid, alates, kuni); XRoadMessage<XmlObject> response = send(new XmlBeansXRoadMessage<TvlLoetelu2RequestType>(request), "tvl_loetelu2", "v1"); try { return TvlLoetelu2ResponseType.Factory.parse(response.getContent().xmlText()); } catch (XmlException e) { throw new XRoadServiceConsumptionException(new NonTechnicalFaultException("", "Unable to parse response"), "kirst", "tvl_loetelu2", "v1"); } }
KirstXTeeServiceImpl extends XRoadDatabaseService implements KirstXTeeService { public TvlLoetelu2ResponseType findTvlLoetelu2V1(Set<String> isikukoodid, Date alates, Date kuni) throws XRoadServiceConsumptionException { if (CollectionUtils.isEmpty(isikukoodid)) { throw new IllegalArgumentException("At least one 'isikukood' must be provided"); } TvlLoetelu2RequestType request = createTvlLoetelu2V1Request(isikukoodid, alates, kuni); XRoadMessage<XmlObject> response = send(new XmlBeansXRoadMessage<TvlLoetelu2RequestType>(request), "tvl_loetelu2", "v1"); try { return TvlLoetelu2ResponseType.Factory.parse(response.getContent().xmlText()); } catch (XmlException e) { throw new XRoadServiceConsumptionException(new NonTechnicalFaultException("", "Unable to parse response"), "kirst", "tvl_loetelu2", "v1"); } } }
KirstXTeeServiceImpl extends XRoadDatabaseService implements KirstXTeeService { public TvlLoetelu2ResponseType findTvlLoetelu2V1(Set<String> isikukoodid, Date alates, Date kuni) throws XRoadServiceConsumptionException { if (CollectionUtils.isEmpty(isikukoodid)) { throw new IllegalArgumentException("At least one 'isikukood' must be provided"); } TvlLoetelu2RequestType request = createTvlLoetelu2V1Request(isikukoodid, alates, kuni); XRoadMessage<XmlObject> response = send(new XmlBeansXRoadMessage<TvlLoetelu2RequestType>(request), "tvl_loetelu2", "v1"); try { return TvlLoetelu2ResponseType.Factory.parse(response.getContent().xmlText()); } catch (XmlException e) { throw new XRoadServiceConsumptionException(new NonTechnicalFaultException("", "Unable to parse response"), "kirst", "tvl_loetelu2", "v1"); } }  }
KirstXTeeServiceImpl extends XRoadDatabaseService implements KirstXTeeService { public TvlLoetelu2ResponseType findTvlLoetelu2V1(Set<String> isikukoodid, Date alates, Date kuni) throws XRoadServiceConsumptionException { if (CollectionUtils.isEmpty(isikukoodid)) { throw new IllegalArgumentException("At least one 'isikukood' must be provided"); } TvlLoetelu2RequestType request = createTvlLoetelu2V1Request(isikukoodid, alates, kuni); XRoadMessage<XmlObject> response = send(new XmlBeansXRoadMessage<TvlLoetelu2RequestType>(request), "tvl_loetelu2", "v1"); try { return TvlLoetelu2ResponseType.Factory.parse(response.getContent().xmlText()); } catch (XmlException e) { throw new XRoadServiceConsumptionException(new NonTechnicalFaultException("", "Unable to parse response"), "kirst", "tvl_loetelu2", "v1"); } }  TvlLoetelu2ResponseType findTvlLoetelu2V1(Set<String> isikukoodid, Date alates, Date kuni); }
KirstXTeeServiceImpl extends XRoadDatabaseService implements KirstXTeeService { public TvlLoetelu2ResponseType findTvlLoetelu2V1(Set<String> isikukoodid, Date alates, Date kuni) throws XRoadServiceConsumptionException { if (CollectionUtils.isEmpty(isikukoodid)) { throw new IllegalArgumentException("At least one 'isikukood' must be provided"); } TvlLoetelu2RequestType request = createTvlLoetelu2V1Request(isikukoodid, alates, kuni); XRoadMessage<XmlObject> response = send(new XmlBeansXRoadMessage<TvlLoetelu2RequestType>(request), "tvl_loetelu2", "v1"); try { return TvlLoetelu2ResponseType.Factory.parse(response.getContent().xmlText()); } catch (XmlException e) { throw new XRoadServiceConsumptionException(new NonTechnicalFaultException("", "Unable to parse response"), "kirst", "tvl_loetelu2", "v1"); } }  TvlLoetelu2ResponseType findTvlLoetelu2V1(Set<String> isikukoodid, Date alates, Date kuni);  }