Configuring a Web Service data source
Creating a data source (web service)​
To add a new Web Service data source, click on the button from the main screen toolbar. To edit a data source, select it from the list of records and click on the button.
A Web Service data source is added and edited through a wizard. It contains the following steps:
If the data source was added from a WSDL file, after the file is imported, the wizard will be displayed to configure the details.
1. Web Service record data​
Fields | Description |
---|---|
Click to add an image | Click on this square to add an image that will represent the data source. |
ID # | Enter a number or code to identify the web service. |
Enabled | Use this option to enable/disable the web service without having to delete it. |
Name | Enter a name for the web service. |
URL (WSDL) | Enter the WSDL (Web Services Description Language) address of the service that will be used, that is, the URL that has the methods that will be implemented in the function executed by the service/web service. |
SoftExpert Suite internal web service | Select this option to select an internal web service provided by SoftExpert Suite. This means there will be no need to create a source if the domain settings of the environment change. The "WSDL Version" and "Connection URL" fields will not be available, as this information will be defined internally. |
WSDL version | Select the WSDL version that will be used in the web service. This field will not be available if the "SoftExpert Suite internal web service" option was previously selected. |
Date format | Select the format that will be used by the web service to format the date. To add a new date formatting, click on the # button next to the field and, on the screen that will open, enter an ID # and the desired Format. Use the Enabled/Disabled option to enable/disable the format. Use the other buttons next to the field to edit the selected format and clear the field. |
Authentication | In the Authentication type field, select one of the following options: -Anonymous: There will be no need for authentication. -Basic authentication: Authentication will be done using username and password in the HTTP request header. In the respective fields that will be enabled, enter the User and Password that will be used to authenticate the service. If you want, also specify the domain that will be used. -WS-Security (Password Text): The username and password are sent along with the SOAP message to validate communication between the service and its consumer. In the respective fields that will be enabled, enter the User and Password that will be used to authenticate the service. - API key: Authentication will be done using a token in the HTTP request header. This type of authentication should only be used when the created data source is a SoftExpert Suite WSDL. In the API key field that will be displayed, enter the user token that will be used for the operation. The token used can be generated through the API Gateway section of the user data screen, when accessed through the user panel. For more information about this type of authentication, see the Integration Guide. |
Date format example​
Formatting | Description | Example |
---|---|---|
MM/dd/yyyy | American date standard | 06/22/2023 |
dd/MM/yyyy | European date standard | 15/03/2023 |
HH:mm:ss | Hours, minutes and seconds | 18:37:05 |
KK:mm:ss a | Hours, minutes and seconds (AM/PM) | 07:44:23 PM |
dd/MM/yyyy HH:mm:ss | Date, hours, minutes and seconds | 26/12/2023 12:30:55 |
dd/MM/yyyy KK:mm:ss a | Date, hours, minutes and seconds (AM/PM) | 12/07/2023 11:50:02 AM |
EE MMM dd hh:mm:ss Z yyyy | Descriptive date, day, time (AM/PM), time zone, and year | Tue Aug 16 12:00:00 BRT 2023 |
Use the Next button, at the bottom of the wizard, to go to the next step.
2. Methods​
In this step, the functions that can be executed by the web service will be presented. The methods will vary according to the URL (WSDL) entered in the previous step.
- A: To locate a method more efficiently, enter the name of the method or attribute that composes it in the field located at the top of the screen, and click on the Filter button. The corresponding methods will be displayed at the bottom of the screen.
- B: Use the toggle located next to each method to enable or disable its execution.
- C: By clicking on the arrow located next to each method, you will be shown the input parameters and output parameters of the method, divided into columns. In the parameter hierarchy, it will be possible to identify the data type of each parameter. Refer to the "Supported data type" topic to check out the types of attributes that are supported by the methods of the web service data source.
Supported data types​
Icon | Data type |
---|---|
TEXT | |
NUMERIC | |
DECIMAL | |
TIME | |
DATE | |
BOOLEAN | |
ENUM | |
BINARY |
Unsupported WSDL specifications​
The Web Service data source does not support:
- Array data type: Elements that use the Array type (for
example:
soap-enc:Array
) orarray
through square brackets (for example:"element[]"
). We recommend using themaxOccurs="unbounded"
attribute to represent arrangements. - Returns with dynamic structures: Methods that have returns with dynamic structures, since it would not be possible to map the types defined in the return.
- Complex types nested with
any
attribute: The<any>
tag inside nested ComplexType tags. For this situation, we recommend that eachComplexType
be stated independently, and that all elements contain thetype
attribute defined without using the<any>
tag. - Inheritance of elements with the
Extension
tag: The use of the<extension>
tag for inheritance betweenComplexTypes
. In this situation, the elements of the parentComplexType
must be replicated in the children in order for the same behavior to be obtained.
Use the Next button, at the bottom of the wizard, to go to the next step.
3. Security​
In this step, you can define a security list for the Web Service data source. Enable the desired option:
1. Private​
If this option is enabled, only the users specified in this tab will be able to edit or view the Web Service data source. To do this, use the following columns:
- Edit: Add the users, teams, departments and/or positions that will have permission to edit the data source.
- View: Add the users, teams, departments and/or positions that will have permission to view the data source.
2. Public​
If this option is enabled, then all system users will be able to view the Web Service data source; however, only those specified in the respective column will be able to edit it. Therefore, the View column will be disabled (since the data source can be viewed by any user). In the Edit column, add the users, teams, departments and/or positions that will have permission to change the data source data.
To add a user/team/department/position to the security list, simply type the desired name in the available field and select the corresponding option from the list that will be presented, or press the "Enter" key. To delete a user/team/department/position from the security list, click on the button located next to the desired record.
Use the Next button, at the bottom of the wizard, to go to the next step.
4. Summary​
In this step, an overview of the Web Service data source configurations is presented. It is also possible to consume the methods that have been enabled. To do this, click on the Consumption test button next to the desired method. On the screen that will open, enter the values of the parameters necessary to consume the method, and then click on the Run button located at the bottom of the screen. Two types of response can be presented:
Response - Consumption test | |
---|---|
Success | Consumption was successful. In this case, it will be possible to view a JSON containing the service return via SoftExpert Suite. |
Something went wrong | There was a problem when consuming the service. Check whether it is available and whether the data was entered correctly in the steps described previously. |
Click on the Finish button to finish configuring the Web Service data source. This will close the wizard screen.
- Use the Previous button at the bottom of the screen to return to a previous step in the Web Service data source configuration and make the necessary changes.
- Use the Close button at the bottom of the screen to exit the Web Service data source configuration wizard. Note that all data entered up to this point will be lost. To carry out this operation effectively, you must answer the question asked by the system.