Skip to Content
0
Oct 15, 2017 at 05:11 PM

Cloud HTTP Destination for External Webservice

2187 Views Last edit May 27, 2020 at 07:37 AM 2 rev

Hello All,

I wanted to execute a webservice hosted in w3schools using SAPUI5 application and WebIDE.

WSDL url is: W3Schools Webservice

When I used the url directly in UI5 code, I got error on "access control allow origin" as the url belongs to different domain.

So I have decided to create a http destination for the WSDL, refer the alias in neo-ap.json and make use of that alias in Web IDE code.

So, I have created the following HTTP destination in Cloud platform cockpit

neo-app.json

{
"path": "/w3schools",
"target": {
"type": "destination",
"name": "w3schools",
"entryPath": "/"
},
"description": "W3SChools WS Temperature Conversion API"
}

In my controller, I have referred the destination during ajax call as follows:

url: "/w3schools/xml/tempconvert.asmx?WSDL",

However, it seems unreachable to the code as I can see this invocation with red status in the "Network" tab of google chrome!!

To cross check, I tried to open the destination using the application testurl with suffix /w3schools/xml/tempconvert.asmx?WSDL

With this, I came to the conclusion that the issue is with the HTTP destination configured in cloud cockpit.

I have tried various options (url as https://www.w3schools.com instead of http), giving different name is WebIDESystem, etc but nothing worked out in my favor.In all these cases, the destination is in green status when I tried wih "Check Connection" option of HTTP destination.

Can someone please tell me how to resolve this? Here, I would like to stick with the HTTP destination approach as it gives me the flexibility to configure the service from an admin perspective, so in turn easier maintenance.

Regards,
Faddy

Attachments

1.png (18.3 kB)
2.png (10.0 kB)
3.png (27.9 kB)
3.png (27.9 kB)