WEB SERVICE – Action and Data source

Facebooktwitterpinterestlinkedinmail
Applies to version: 2016.1.x; Authors: Piotr Bagazja & Karol Woźniak

Expectations & Limitations


WSDL

The Web Service description (WSDL file – interface definition) can either be provided locally from the hard drive or through HTTP/HTTPS protocol. In both cases, it must fulfill certain requirements:

  • For HTTP/HTTPS, if authentication is required, the user must provide a correct username and password.
  • If the WSDL file contains references to external files (e.g. XSD files), the machine which is running BPS Designer Studio must have access to those files and matching login credentials.
  • If the WSDL is located on the disk, it is best if it is a single file (singleWSDL). If it isn’t a single file, then the file references must all be correct paths accessible for the machine that hosts the Web Service, or alternatively, an accessible external network location.
  • If the file references are not set according to the guidelines mentioned above, the Action/Data source will attempt to choose appropriate paths and types by itself. However, there is no guarantee that it will correctly find the necessary files, therefore it may not work as intended.

Web Service

The Action and Data source both support HTTP and HTTPS protocols. When using the encrypted HTTPS connection, a valid digital certificate issued by a trusted source is required. Alternatively, it is also possible to mark the “Do not validate HTTPS certificates” checkbox, however this approach is generally not recommended, and should be reserved for special cases only. For Web Services where the connection needs to be periodically refreshed, you may opt to use the “Keep-alive” option.


Fields and types

The Action and Data source will analyze the WSDL file and generate an interface for accessing the Web Service based on it. This process is automatic, it uses .NET platform tools to generate code for the Web Service. Both supported and unsupported cases have been described below. It’s worth noting that only scenarios tested by us have been listed – this is not a complete list of all possible uses, therefore when employing other scenarios, make sure that they have the desired effect.

– Text types ‘System.string’

This field will accept any text value, any variable from the form (except item list form fields) and SQL queries, where the value will be obtained from the first row of the first column.

– Numeric field ‘System.int32’ ‘System.Double’ ‘System.Decimal’

Numbers should be sent in formats: ‘123’ or ‘123.123456’

Such values can be entered manually, returned via SQL query (like with text fields), or sent via appropriate variable. When using a variable referencing a value found in a form field, even if that value on the form is in another format like ‘123,1234’ (i.e. with a coma as a decimal separator), as long as it is marked as a floating-point value – the system will ensure that it is sent in the correct format (mentioned above).

– True/False field ‘System.boolean’

Values that can be set are: ‘True’, ‘False’, ‘1’ and ‘0’. These values can be sent as text, dragged-and-dropped over from the expression editor, or via SQL query.

– Date field ‘System.Datetime’

Date must be in ISO format. Format with ‘Z’ at the end is not supported.

– Array types

A field that is an array is identified by a mark or the ‘[]’ signs following its name (e.g.: CompositeType2[] ).

These fields can be handled in 3 ways:

1. Use an SQL query. Every row that is returned will be used to create one object. Column names should match field names.
SELECT ‘1’ as BoolValue, ‘My text value’ as StringValue

1

2. Use an item list. Enter the ID of an item list as the value of table field, or use an appropriate variable from the expression editor, e.g.: {WFCON:<ItemList ID>} . Enter static values or use variables in individual fields. The number of set objects will correspond to the number of rows on the item list.

2

3. In the chosen field, enter static values or drag values from the form. In this case, one object will be sent containing the set values.

3


Limitations

For complex types, Action and Data source mechanisms have certain limitations.

  1. The maximum depth of types displayed on the tree is set to 10.
  2. The maximum number of fields displayed on a tree is set to 2000.
  3. The following types are not supported: ‘Table’, ‘System.Data.DateTable’ and ‘System.Data.DateSet’
  4. Complex WSDL types: ‘System.XML.XmlElement’ and ‘System.XML.XmlNode’, that may contain any information and internal nodes, are treated as text.
  5. In a Data source, only fields that are arrays according to the WSDL may be selected to be the result.
    • In this type, the only fields that are supported are those directly under the type, and are also simple (TEXT, NUMBER, YES/NO, DATE).
  6. One array cannot be sent within another array. The argument field can be set, while the InvoiceElement field cannot. 4
  7. In a Data source, it is not possible to select an array field from an array as the result. Marking Invoice[] as the result returned by the data source is correct, marking InvoiceElement[] is not.5

Leave a Reply

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