Action: Invoke a webservice

Facebooktwittergoogle_pluspinterestlinkedinmail
Applies to version 8.2.x; author Piotr Bagazja

A very common scenario for Enterprise Resource Planning (ERP) systems is migrating or integrating data between two different systems. The difference in technologies is often a problem, as it creates a conundrum in the architecture of data transfer and their format. This problem is resolved with the use of web services, which are standardized in regards to the format and type of data transfer.

Web service support in BPS

We try to support web services in all forms. However, the complexity level of some of them requires writing custom actions, the others can be handled with standard actions.

1.    Action configuration

This BPS Action is found under „Integration” in the Action kind dropdown menu.

1

After opening the advanced configuration window, enter the necessary data. Starting with the service’s URL address, or the document defining it (WSDL).

This example will use the following address:

http://dev38:9001/ItsOver9000Service.svc

But this one is also acceptable:

http://dev38:9001/ItsOver9000Service.svc?wsdl

Clicking the “Connect” button will attempt to invoke the entered address in order to load information about the Methods and Types supported by it.

If there is no service under the given address, we will get an error message about being unable to connect to the URL. If a connection is made, the field “Launch method” will be filled with a list of methods from the invoked web service.

Selecting one of the options form the list will populate the “Parameters” table with data. From left to right, the columns are: Name of the parameter (“value” in our case), its Type (Like Text or Integer), and Value which is left empty. We want our Type to be set to Integer, and the last column should contain data which will be transferred in the given parameter. This field supports constant values ex. 123, as well dynamic values (Tags), you may type these in manually in the form of: {I:CURRENTUSER} or drag’n’drop/double-click the desired values from the Tag creator tree on the right.

The last option in the configuration window is the “Save result in field” checkbox. Marking this box will allow you to select the target Form field in which the result will be saved. However, there is a limitation based on the data type, it has to be one of the basic types, for example: Integer number, Floating-point number, Text, Single character, Date. Some of the more complex values (Complex Types) will result in the name of that type being entered into the Form field instead of its value.

2

 

2.    Action in action

The web service used in this example, and the Method it uses: IsOver9000, will check if the value is greater than 9000, and by how much. The result of the action, can be seen in the “Result” field below.

 

3

4

More programming advice can be found at: http://developer.webcon.com

Leave a Reply

Your email address will not be published. Required fields are marked *