Consume web services in the Velneo style

Take advantage of the huge benefits of native code, such as refactoring, inspectors and finders, and integrate this new object into your good programming practices.

If there is one term that has been on the lips of all programmers for years, it is, without a doubt, the word “integration”.

In an ideal world, all software should be able to connect with the other applications around us.

To make this idea more feasible, we usu Bitcoin Data ally incorporate an API into the applications that exposes their data and functionalities.

Until now in Velneo we have programmed the consumption of web services using the XmlHttpRequest class in JavaScript.

But what we Velneo programmers really like is programming with native code and taking advantage of all its benefits.

Introducing the new Web Service Consumption object so you can forget about JavaScript when integrating with any application or service.

This new object has a set of fully configurable and parameterizable functionalities with which you can connect to any Web Service within any process, function or event handler.

You will notice that almost all of the object’s parameters are of the formula type, which means that you will be able to customize them at runtime.

When you create the object, local variables will be automatically created and fed at runtime. This way, you will have real-time data such as status, response, and if there is an error.

You will be able to configure the URL with a formula.

You can use any method, GET, POST, PUT or DELETE.

Make the request synchronous or asynchronous.

Receive the body in text or binary mode. If it is binary, you can automatically save it in a disk path or in an alphabetical variable in base64 format.

WebServices that require a certificate on the client are supported.

Upon receiving the response.

As subobjects of the web service consumption object. You can declare as many parameters as you need, indicating their key.  Value and path for binary value. You can also configure with a formula whether the parameter is active or not.

You can also declare the subobjects you need of header type with their key, value and active condition.

In addition to the local variables that are created by default. You can add special variables to obtain the body in text or in base 64 in case it is a binary response. Memory consumption if it is not necessary.

The best thing of all is that once you have created the web consumption object

you can run it from any plane and any component:

client or server with the “Launch object” instruction command.

With a single web service consumption object you will be able to consume multiple endpoints thanks to the possibility of passing the variables with which you will resolve the parameters at runtime.

If we run a web service consumption object on the client and it is Asynchronous. The response process will automatically run in the background preventing the user interface from blocking.

When we define the process that will execute the response in the object.  If we edit the process we can see that in the subobject. Creation button we now see a new option called special variables. That will automatically create the same variables.  That are declared in the web service consumption object itself.

When the object receives the response and calls the process configured to process it. It feeds it all the variables that have the same identifier. Both the special ones of the object and those that we have created manually and that exist in both objects. This simplifies programming since we do not have to do anything to have all the information.

As an example of how easy it is to

use this object and how s Albania Phone Number List imple it is to migrate JavaScript scripts, you will find that now the Velneo vERP template and all the ecosystem components that made calls to web services now make use of the new Web Service Consumption object.

You already know, stop using JavaScript to consume web services and take advantage of the enormous benefits of native code, such as refactoring, inspectors and search engines, and integrate this new object into your good programming practices.