![](/img/trans.png)
[英]Maven Build Failure releated to com.sap.cloud.s4hana.plugins:s4sdk-maven-plugin
[英]Failure connecting to S/4 Hana via Cloud SDK
我正在通过以下网址访问OData教程: https: //blogs.sap.com/2017/05/21/step-4-with-sap-s4hana-cloud-sdk-calling-an-odata-service/comment-page- 1 /并且当我尝试使用DefaultBusinessPartnerService
检索业务伙伴时遇到错误。
相关的代码段是:
DefaultBusinessPartnerService businessPartnerService = new DefaultBusinessPartnerService();
System.err.println("criated default business partner");
List<BusinessPartner> partners = businessPartnerService
.getAllBusinessPartner()
.select(BusinessPartner.BUSINESS_PARTNER,
BusinessPartner.LAST_NAME,
BusinessPartner.FIRST_NAME)
//.filter(BusinessPartner.BUSINESS_PARTNER_CATEGORY.eq(CATEGORY_VENDOR))
.orderBy(BusinessPartner.LAST_NAME, Order.ASC)
.execute(new ErpEndpoint(new ErpConfigContext()));
response.setContentType("application/json");
response.getWriter().write(new Gson().toJson(partners));
我的ErpQueryEndpoint
配置如下:
#Mon May 14 15:27:09 BRT 2018
URL=https\://host\:port
Name=ErpQueryEndpoint
TrustAll=TRUE
Type=HTTP
Password=Password
Authentication=BasicAuthentication
User=Username
其中host
, port
, Username
和Password
已替换为正确的值。
当我查询http://localhost:8080/s4integration-application/businesspartners
,出现以下错误:
The endpoint responded with HTTP error code 403.
No service found for namespace , name API_BUSINESS_PARTNER, version 0001
Full error message:
{
"error": {
"code": "/IWFND/MED/170",
"message": {
"lang": "en",
"value": "No service found for namespace , name API_BUSINESS_PARTNER, version 0001"
},
"innererror": {
"application": {
"component_id": "",
"service_namespace": "/SAP/",
"service_id": "API_BUSINESS_PARTNER",
"service_version": "0001"
},
"transactionid": "C83CB3D2A1420000E005AF97B0836AD5",
"timestamp": "20180514182746.3576100",
"Error_Resolution": {
"SAP_Transaction": "Run transaction /IWFND/ERROR_LOG on SAP Gateway hub system (System Alias ) and search for entries with the timestamp above for more details",
"SAP_Note": "See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"
},
"errordetails": []
}
}
}
似乎端点未在SAP系统上配置(这是S / 4 Hana系统)。 我不确定是否必须在主机和端口之外向URL
添加其他内容,或者是否必须在SAP系统上进行其他配置。
可以从以下位置找到从SAP S / 4HANA后端激活OData API的说明:help.sap.com/viewer/cdc25c83b63e482586b31b8acd49cf2f/1610%20003 / ...只需忽略Fiori应用程序的概念即可。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.