cancel
Showing results for 
Search instead for 
Did you mean: 

How to reference a java application URL in a destination using mtad.yaml in Neo environment

05-07-2019 3:59 PM
karstenvoigt Participant
764 views 3 comments
0 Likes
SAP Managed Tags
Subscribe

Hi,

I have a little solution that' s deployed to Neo. The solution has two java applications, one HTML5 app and many different destinations. Everything works fine, but I have an issue referencing the java application urls within the destination definition.

Example (excerpt mtad.yaml):

modules:
  - name: my-backend
    type: java.tomcat
    path: my-backend/my.war
    parameters:
       name: mybackend
       runtime-version: 3.79
       java-version: JRE 8
       compute-unit-size: PREMIUM
       minimum-processes: 1
       maximum-processes: 4
    provides:
       - name: java-backend
         properties:
            backendurl: ${default-url}   

...

- name: dest-mybackend
    type: com.sap.hcp.destination
    parameters:
      name: mybackenddest
      type: HTTP
      url: ~{backendurl}
      force-overwrite: false
      description: Destination for the java backend application (authenticated)
      proxy-type: Internet
      authentication: AppToAppSSO

This sample will cause an exception during solution deployment:

Details: Detected short reference in [~{backendurl}]. All references must be fully qualified

So what's the correct way to reference the java app url?

Any hints are welcome.

Thanks.

0 Likes

Accepted Solutions (0)

Answers (2)

Answers (2)

karstenvoigt
Participant
0 Likes

Hi Ivan,

that sample wouldn't help since it just creates a self reference for the application. The destination is not available on subaccount level and cannot be used from another HTML5 module.

(I've read the documentation several times.)

Regards

Ivan-Mirisola
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Karsten,

Please read the documentation below on session entitled "Destinations Target Platform Keyword Options" you can see how the deployment deals with references to java application URLs :

https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/f1caa871360c40e7be7ce4264ab...

Basically here is what's on the docs:

modules:
  - name: java-module
    type: com.sap.java
    provides:
      - name: java-module
        properties:
          application-url: ${default-url}
    requires:
      - name: java-module
    parameters:
      name: exampleapp
      destinations:
        - name: ExampleWebsite
          type: HTTP
          url: ${java-module/application-url}
      ...

Best regards,
Ivan