I followed the SDK course and the blog. It was possible for me through the business partner to do a read operation. Now I have my own service and want to use the generated VDM data to easily send data to my SAP system via an update.
@Override
protected void doGet(final HttpServletRequest request, final HttpServletResponse response)
throws ServletException, IOException {
try {
BarcodeFile barcode1 = new BarcodeFile();
barcode1.setDATA("VGVzdA==");
barcode1.setDokumentyp("TXT");
barcode1.setDokId("18032019");
new DefaultUploadService()
.createBarcodeFile(barcode1)
.execute();
response.setContentType("application/json");
response.getWriter().write(new Gson().toJson(barcode1));
} catch (final ODataException e) {
logger.error(e.getMessage(), e);
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
response.getWriter().write(e.getMessage());
}
I am in training and so I have little experience. I also found no blog / document which helps me. Thank you for your efforts