【发布时间】:2020-01-02 15:19:23
【问题描述】:
我正在将本地 S/4 HANA 与 SAP Cloud Platform 试用帐户相关联。我正在使用 SAP Cloud SDK 从 S/4 HANA 获取所有业务合作伙伴。
- 我的云连接器已设置
- 我的子帐户级别的目的地已设置,并且可以 ping 到我的本地系统
- 我的服务实例 - XSUAA/Destination/Connectivity 已通过应用程序设置
但是我有以下错误
未能为本地连接添加“SAP-Connectivity-Authentication”标头:在请求的“授权”标头中找不到 JWT 承载。继续没有标题。可能无法连接到本地系统
我使用的代码是 -
final List<BusinessPartner> businessPartners =
new DefaultBusinessPartnerService()
.getAllBusinessPartner()
.select(BusinessPartner.BUSINESS_PARTNER)
.execute(destination);
似乎 AppRouter 是推荐用于授权和访问,因此我尝试实现一个 - 但我的 approuter 显示 - Not Found
Approuter App -Name - approuter-demo 下面是 xs-app.json
{
"routes": [
{
"source": "^/s4ext/(.*)",
"target": "/s4ext/$1",
"destination": "******"
}
]
}
Manifest 文件如下:
---
applications:
- name: approuter-demo
routes:
- route: approuter-demo-*****trial.cfapps.eu10.hana.ondemand.com
path: approuter
memory: 128M
env:
TENANT_HOST_PATTERN: 'approuter-demo-(.*).cfapps.eu10.hana.ondemand.com'
destinations: '[{"name":"******", "url" :"https://s4ext-***.cfapps.eu10.hana.ondemand.com", "forwardAuthToken": true }]'
services:
- xsuaa-demo
- connectivity-demo
- destination-demo
请指导我。谢谢。
【问题讨论】:
-
“我尝试实现一个”是什么意思?
-
在哪里显示“未找到”?
-
当我打开 approuter 应用程序时显示未找到。我希望 approuter 应该打开我的 Web 应用程序,因为我在 xs-app.json 中提到了目标 URL
-
请告诉我们您正在使用哪个 SAP Cloud SDK 版本,并与我们分享您的异常的堆栈跟踪。
标签: sap-cloud-platform sap-cloud-sdk sap-cloud-foundry