on ‎2021 Apr 01 3:44 AM
Hello experts,
I have created a SAP FIORI application by following the steps in this video tutorial:
https://www.youtube.com/watch?v=yvUUBbw85-M
I also followed the related blog details:
https://blogs.sap.com/2020/10/02/serverless-sap-fiori-apps-in-sap-cloud-platform/
The purpose of my application is to be able to connect with web services, apis and odata services as I did in the NEO environment.
I have deployed my project and when I try to get my services I get them successfully:

However, when I debug the same project locally I get the following error:

This is my controller file.

This is my MTA.YAML file:
_schema-version: "3.2"
ID: techbytes
version: 0.0.1
modules:
- name: techbytes-destination-content
type: com.sap.application.content
requires:
- name: techbytes-destination-service
parameters:
content-target: true
- name: techbytes_html_repo_host
parameters:
service-key:
name: techbytes_html_repo_host-key
- name: uaa_techbytes
parameters:
service-key:
name: uaa_techbytes-key
parameters:
content:
instance:
destinations:
- Name: techbytes_techbytes_html_repo_host
ServiceInstanceName: techbytes-html5-app-host-service
ServiceKeyName: techbytes_html_repo_host-key
sap.cloud.service: techbytes
- Authentication: OAuth2UserTokenExchange
Name: techbytes_uaa_techbytes
ServiceInstanceName: techbytes-xsuaa-service
ServiceKeyName: uaa_techbytes-key
sap.cloud.service: techbytes
existing_destinations_policy: ignore
build-parameters:
no-source: true
- name: techbytes-app-content
type: com.sap.application.content
path: .
requires:
- name: techbytes_html_repo_host
parameters:
content-target: true
build-parameters:
build-result: resources
requires:
- artifacts:
- publicapp.zip
name: publicapp
target-path: resources/
- name: publicapp
type: html5
path: publicapp
build-parameters:
build-result: dist
builder: custom
commands:
- npm install
- npm run build:cf
supported-platforms: []
resources:
- name: techbytes-destination-service
type: org.cloudfoundry.managed-service
parameters:
service-name: techbytes-destination-service
service-plan: lite
service: destination
path: ./destination.json
- name: techbytes_html_repo_host
type: org.cloudfoundry.managed-service
parameters:
service: html5-apps-repo
service-name: techbytes-html5-app-host-service
service-plan: app-host
- name: uaa_techbytes
type: org.cloudfoundry.managed-service
parameters:
path: ./xs-security.json
service: xsuaa
service-name: techbytes-xsuaa-service
service-plan: application
parameters:
enable-parallel-deployments: true
deploy_mode: html5-repo
This is my destination.json file:
{
"HTML5Runtime_enabled": true,
"version": "1.0.0",
"init_data": {
"instance": {
"existing_destinations_policy": "update",
"destinations": [
{
"Name": "web_service_ruc",
"Description": "Obtener RUC Empresa",
"Authentication": "NoAuthentication",
"ProxyType": "Internet",
"Type": "HTTP",
"URL": "http://app.seace.gob.pe",
"HTML5.DynamicDestination": true
},
{
"Name": "ODATA_ADMIN",
"Description": "Prueba para BAS",
"Authentication": "NoAuthentication",
"ProxyType": "Internet",
"Type": "HTTP",
"URL": "https://administrador-srv-interested-cassowary-ww.cfapps.br10.hana.ondemand.com",
"HTML5.DynamicDestination": true
},
{
"Name": "apiTest",
"Description": "Destination Test",
"Authentication": "NoAuthentication",
"ProxyType": "Internet",
"Type": "HTTP",
"URL": "https://app-testerz.herokuapp.com",
"HTML5.DynamicDestination": true
}
]
}
}
}
This is my xs-app.json file:
{
"welcomeFile": "/index.html",
"authenticationMethod": "route",
"routes": [
{
"authenticationType": "none",
"csrfProtection": false,
"source": "^/web_service_ruc/wstest/(.*)$",
"destination": "web_service_ruc",
"target": "$1"
},{
"authenticationType": "none",
"csrfProtection": false,
"source": "^/ODATA_ADMIN/admin/(.*)$",
"destination": "ODATA_ADMIN",
"target": "$1"
},{
"authenticationType": "none",
"csrfProtection": false,
"source": "^/apiTest/(.*)$",
"destination": "apiTest",
"target": "$1"
},
{
"source": "^/resources/(.*)$",
"target": "/resources/$1",
"authenticationType": "none",
"destination": "ui5"
},
{
"source": "^/test-resources/(.*)$",
"target": "/test-resources/$1",
"authenticationType": "none",
"destination": "ui5"
},
{
"source": "^(.*)$",
"target": "$1",
"service": "html5-apps-repo-rt",
"authenticationType": "xsuaa"
}
]
}
This is my ui5.yaml file:

This is my ui5-local.yaml file:

One of my destinations:
Run configurations:

Do I have to configure something else? Or modify some of the files? Do you need to see the view of another file?
Thanks
Request clarification before answering.
Hello Erick,
I believe the configuration in the "ui5.yaml" is not correct. Please change the "backend" section as follows and try again:
backend:
- path: /ODATA_ADMIN
url: https://administrador-srv-interested-cassowary-ww.cfapps.br10.hana.ondemand.com
destination: ODATA_ADMIN
- path: /web_service_ruc
url: http://app.seace.gob.pe
destination: web_service_ruc
- path: /apiTest
url: https://app-testerz.herokuapp.com
destination: apiTest
Let me know if that helps.
Best regards,
Zdravko
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 13 | |
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.