对于错误“在JSON中找不到错误字段",我们该怎么办? (VDM:401)? [英] What can we do for the error "No error field found in JSON" (VDM:401)?

查看:140
本文介绍了对于错误“在JSON中找不到错误字段",我们该怎么办? (VDM:401)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们尝试通过Java应用程序调用API API_BUSINESS_PARTNER. Java实现与SAPUI5-前端应用程序通信,因此可以通过应用程序显示数据. 通过我们的内部部署系统,它可以毫无问题地运行,并且我们还可以获取数据.但是通过应用程序,我们得到错误在JSON中找不到错误字段",并且ODataConnectivityUtil的SCP-日志向我们显示了相应用户未获得授权. 因此,我们尝试调用一个较旧的MMIM_MATERIAL_DATA_SRV,它可以正常工作.我们在API_PRODUCT_SRV中得到了相同的错误消息.因此,它似乎通常无法与新API一起使用.

We try to call the API API_BUSINESS_PARTNER via our Java application. The Java implementation communicates with a SAPUI5 - Front End application, so that the data can be displayed via an app. Through our On - Premise System it works without any problems and we also get back data. But via the application we get the error "No error field found in JSON" and the SCP - Log for ODataConnectivityUtil shows us that the respective user is not authorized. Accordingly we tried to call an older one MMIM_MATERIAL_DATA_SRV and it works without any problems. We get the same error message in API_PRODUCT_SRV. So it doesn't seem to work with the new APIs in general.

谢谢你, 最好的问候.

Thank you, best regards.

  • The error message
  • Our source code
  • Logging snippet

推荐答案

再次感谢您的支持.

我们已经解决了问题. 问题是尽管我们在目标配置中设置了"sap-client = 200",但第一个元数据请求是在默认客户端(客户端100)上执行的. 客户端之间的密码不同,因此我们收到了身份验证错误.

We have solved the problem now. The problem is that the first metadata request is executed on the default client (client 100) although we have set "sap-client=200" in the destination configuration. Our passwords between the clients were different, so we received an authentication error.

我们怀疑较新的" API将无法从SCP访问目标的配置.因此,它可能适用于较旧的版本.

We suspect that the "newer" API's will not be able to access the configuration for the destination from the SCP. So it probably worked with the older ones.

我们面临的一个问题是,Cloud SDK无法从目标配置中获取客户端(用于元数据请求).

One problem for us was that the Cloud SDK does not take the client from the destination configuration (for the metadata request).

另一个问题是错误消息在JSON中找不到错误字段"具有误导性.

The other problem was that the error message "No error field found in JSON" was misleading.

只有通过"ODataConnectivityUtil"提示,我们才能看到我们的身份验证错误.所以再次感谢.

Only by the tip with "ODataConnectivityUtil", we could see our authentication error. So thanks again.

这篇关于对于错误“在JSON中找不到错误字段",我们该怎么办? (VDM:401)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆