@Test public void sendDocumentTestV1() throws XRoadServiceConsumptionException { try { InputStream is = getClass().getClassLoader().getResourceAsStream("makseM3.bdoc"); ByteArrayOutputStream os = new ByteArrayOutputStream(); os.write(is); is.close(); os.close(); treasuryXTeeService.sendDocument(UUID.randomUUID().toString(), TYPE, os.toByteArray()); } catch (Exception e) { e.printStackTrace(); Assert.fail("TreasuryXTeeServiceImplTest.sendDocumentTestV1: exception occurred"); } }
public SendDocumentResponseType sendDocument(String uniqueId, String type, byte[] manus) throws XRoadServiceConsumptionException { SendDocumentRequestType kassaReq = SendDocumentRequestType.Factory.newInstance(); kassaReq.setUniqueId(uniqueId); kassaReq.setType(type); kassaReq.setManus("".getBytes()); List<XRoadAttachment> attachments = new ArrayList<XRoadAttachment>(); attachments.add(new XRoadAttachment("manus", "application/octet-stream", Base64.encode(manus))); XRoadMessage<SendDocumentResponseType> response = send(new XmlBeansXRoadMessage<SendDocumentRequestType>(kassaReq, attachments), SEND_DOCUMENT, VERSION, new RmvikiCallback(), null); return response.getContent(); }
TreasuryXTeeServiceImpl extends XRoadDatabaseService implements TreasuryXTeeService { public SendDocumentResponseType sendDocument(String uniqueId, String type, byte[] manus) throws XRoadServiceConsumptionException { SendDocumentRequestType kassaReq = SendDocumentRequestType.Factory.newInstance(); kassaReq.setUniqueId(uniqueId); kassaReq.setType(type); kassaReq.setManus("".getBytes()); List<XRoadAttachment> attachments = new ArrayList<XRoadAttachment>(); attachments.add(new XRoadAttachment("manus", "application/octet-stream", Base64.encode(manus))); XRoadMessage<SendDocumentResponseType> response = send(new XmlBeansXRoadMessage<SendDocumentRequestType>(kassaReq, attachments), SEND_DOCUMENT, VERSION, new RmvikiCallback(), null); return response.getContent(); } }
TreasuryXTeeServiceImpl extends XRoadDatabaseService implements TreasuryXTeeService { public SendDocumentResponseType sendDocument(String uniqueId, String type, byte[] manus) throws XRoadServiceConsumptionException { SendDocumentRequestType kassaReq = SendDocumentRequestType.Factory.newInstance(); kassaReq.setUniqueId(uniqueId); kassaReq.setType(type); kassaReq.setManus("".getBytes()); List<XRoadAttachment> attachments = new ArrayList<XRoadAttachment>(); attachments.add(new XRoadAttachment("manus", "application/octet-stream", Base64.encode(manus))); XRoadMessage<SendDocumentResponseType> response = send(new XmlBeansXRoadMessage<SendDocumentRequestType>(kassaReq, attachments), SEND_DOCUMENT, VERSION, new RmvikiCallback(), null); return response.getContent(); }  }
TreasuryXTeeServiceImpl extends XRoadDatabaseService implements TreasuryXTeeService { public SendDocumentResponseType sendDocument(String uniqueId, String type, byte[] manus) throws XRoadServiceConsumptionException { SendDocumentRequestType kassaReq = SendDocumentRequestType.Factory.newInstance(); kassaReq.setUniqueId(uniqueId); kassaReq.setType(type); kassaReq.setManus("".getBytes()); List<XRoadAttachment> attachments = new ArrayList<XRoadAttachment>(); attachments.add(new XRoadAttachment("manus", "application/octet-stream", Base64.encode(manus))); XRoadMessage<SendDocumentResponseType> response = send(new XmlBeansXRoadMessage<SendDocumentRequestType>(kassaReq, attachments), SEND_DOCUMENT, VERSION, new RmvikiCallback(), null); return response.getContent(); }  SendDocumentResponseType sendDocument(String uniqueId, String type, byte[] manus); }
TreasuryXTeeServiceImpl extends XRoadDatabaseService implements TreasuryXTeeService { public SendDocumentResponseType sendDocument(String uniqueId, String type, byte[] manus) throws XRoadServiceConsumptionException { SendDocumentRequestType kassaReq = SendDocumentRequestType.Factory.newInstance(); kassaReq.setUniqueId(uniqueId); kassaReq.setType(type); kassaReq.setManus("".getBytes()); List<XRoadAttachment> attachments = new ArrayList<XRoadAttachment>(); attachments.add(new XRoadAttachment("manus", "application/octet-stream", Base64.encode(manus))); XRoadMessage<SendDocumentResponseType> response = send(new XmlBeansXRoadMessage<SendDocumentRequestType>(kassaReq, attachments), SEND_DOCUMENT, VERSION, new RmvikiCallback(), null); return response.getContent(); }  SendDocumentResponseType sendDocument(String uniqueId, String type, byte[] manus);  }