on 12-28-2020 5:14 AM
Hello All,
I am trying to invoke an external ODATA Service using the CAP Java framework. I am following this example of invoking the OData NorthWind service (although it is NodeJS). https://blogs.sap.com/2020/05/26/cap-consume-external-service-part-1/
I have done the following:
1. Import the EDMX file
2. Generate the CSN file and update the package.json
3. Create a service definition in form of a CDS file.
As recommended by this example. I am attempting to create a handler, wherein a call needs to be made out to the external ODATA service. However I am not able to proceed with the exact CDS command to connect to an ODATA service. Looking at guidance on how to write code like this NodeJS snippet
const { Products } = this.entities;
const service = await cds.connect.to('NorthWind');
this.on('READ', Products, request => {
return service.tx(request).run(request.query);
});
Any suggestions or pointers on this will be highly appreciated.
Regards,
Prabal Rakshit
Have you tried Triggering Custom Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.