简体   繁体   English

需要帮助设置我的(java)Odata服务以通过SDK将二进制文件发送到我的SAP系统(更新)

[英]Need help setting up my ( java) Odata service to send binaries via the SDK to my SAP system (Update)

I followed the SDK course and the blog. 我遵循了SDK课程和博客。 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. 现在我有自己的服务,并希望使用生成的VDM数据通过更新轻松地将数据发送到我的SAP系统。

    @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 感谢你付出的努力

Ah this is the way to close this thread. 啊,这是关闭此线程的方法。 Many thanks for the helping me to solve this issue. 非常感谢帮助我解决这个问题。 My code is working fine. 我的代码运行正常。 Greetings Markus 问候马库斯

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM