How to consume destination in SAP Server Side JavaScript

Open the SAP HANA Web-Based Development Workbench on the SAP cloud platform for server-side JavaScript development.

2085791-bcff48a9775fccf9.png

Create a new package:

2085791-3a364c15a75d9a78.png

Create a new application:


2085791-2bd8df5bb2583aae.png
2085791-428605a175570d16.png

Create a new file google-distance-api.xshttpdest to maintain the destination-related information:


2085791-cc1de86f5d81e5a3.png
host = "maps.googleapis.com";
port = 80;
pathPrefix = "/maps/api/distancematrix/xml";
useProxy = true;
proxyHost = "proxy-trial";
proxyPort = 8080;
authType = none;
useSSL = false;
timeout = 30000;

Create an xsjs file to consume the destination and get the distance information from Walldorf to Paris:


2085791-9d4d58103a661088.png

Results of the:


2085791-b22978b04743e767.png

Because it is server-side JavaScript, it is no longer possible to observe the http call of the Google service in the Chrome Developer Tools.


2085791-43b1f26856e7ba67.png

To get more of Jerry's original technical articles, please pay attention to the public number "Wang Zixi" or scan the QR code below:

2085791-2486f3bd80b6ca71.png
2085791-459dc9b052f3c62d.png

Intelligent Recommendation

Server-side JavaScript

Rhino https://developer.mozilla.org/zh-CN/docs/Mozilla/Projects/Rhino js written in Java interpreter, the design goal is to achieve the preparation js means Javaapi program that enables mutual convers...

SAP Spartacus server-side rendering programming specification

Link: https://sap.github.io/spartacus-docs/server-side-rendering-coding-guidelines It is forbidden to use global objects that are only available in the browser environment, such as window, document, n...

SAP spartacus server-side rendering debugging

I follow this articleManually install SAP Spartacus 3.3.0 version and enable server-side rendering SSR Introduction, enabled SAP Spartacus server-side rendering and followDebugging method in SAP Spart...

SAP Spartacus server-side build procedure

There is a server.ts file in the SAP Spartacus root root. The entrance to the entire file is the RUN function: In the Run function, open a server and listen to the 4000 port: The server instance retur...

SAP Spartacus server-side performance issues discussion

Slack I am currently testing the performance of Spartacus implementation in CCV2, but I am working hard to find a POD size, where node.js is not just a hit memory buffer. I suspect that this is also r...

More Recommendation

The second of a series of tutorials on the integration of SAP system and WeChat: how to consume API through WeChat official account

The English version of this series was written by Jerry in 2017. This tutorial contains a total of ten articles, published inSAP communityon. Series catalog (1) Construction of WeChat development envi...

How to create web service in SAP CRM WebClient UI and use ABAP to consume

In this blog I will create a web service which is exposed via Genil model PROD in CRM web client UI and consume it via a simple ABAP program. Create web service in CRM Webclient UI (1) log on CRM Web ...

SAP CDS view self-study tutorial VI: How to consume table function in CDS view

Let’s try to resolve one real issue now. What we want to achieve is: in CRM we need a CDS view which returns the service order guid together with its Sold-to Party information, “Title&rdqu...

How to consume Object Value Selector (OVS) in SAP CLOUD for Customer Ui Designer

First see the effect of the last implementation: I have a field, and the user can manually enter the Employee ID, or click the rectangle box of the field to open the Value Help: Suppose I have selecte...

Call JavaScript With Jquery In Server-Side

Background code   Reception Code   Example calls Synchronize Reproduced in: https: //www.cnblogs.com/cnblogsfans/archive/2009/11/05/1596601.html...

Copyright  DMCA © 2018-2024 - All Rights Reserved - www.programmersought.com  User Notice

Top