You are viewing the documentation for Blueriq 16. Documentation for other versions is available in our documentation directory.

What is it for?

A web service is used to expose a model using REST or SOAP.

You can create your own web service using Blueriq, commonly referred to as BaaS (Blueriq as a Service). It is possible to create a SOAP service or a REST service.

For a SOAP service, first import a WSDL/XSD File.

For a REST service, first define the incoming request and outgoing response using the REST service editor and an imported XSD file or Domain schemas.

Webservice

After creating the webservice (in the configuration module), the following properties need to be provided. 

PropertyDescription
Service moduleSelect the interaction module in which the SOAP/REST service is defined. This module is used to process the incoming request and is considered the source module. The target module of a web service is always the entry point module of the project. It is possible for the source and target module to refer to the same module.
Service definitionNext select the Soap or Rest service which you want to expose. Both type of services are combined in the service definition dropdown. 
Validate requestsIf you check the validate option, each incoming request is validated against the specified validation rules.

Operations

After selecting the service definition, a list of operations that are defined in the service will appear. Select an operation in the list and fill in the properties. 

PropertyDescription
Exposed

Each operation may be exposed or unexposed. 

After an operation in the service has been exposed, it is possible to retrieve both the service URL and the OpenAPI specs URL in the runtime dashboard widget names "Exposed Blueriq Webservices":

Data mapping

If the web service module you selected is not compatible with the entry point module, a data mapping must be provided. The data mapping must have a source module that is compatible with the web service module, and a target module that is compatible with the entry point module. Only data mappings that have 1) their source module compatible with the web service module and 2) their target module compatible with the entry point module are listed.

Two modules are considered to be "compatible" if they will refer to the same executable module in Runtime. In Blueriq Runtime, only the entry point module and implementation modules are available in the project export. Hence, all modules that are included by one such implementation module are considered to be compatible with each other and the implementation module itself. If in this set of included modules a secondary implementation module is specified, it will form a new compatibility tree which is no longer considered compatible with the tree it is part of. This relation is commutative and transitive.

A module may not be included in multiple compatibility trees as that would mean their implementation module is ambiguous. Doing so results in undefined behavior.

Examples

In the following examples, the compatibility trees are grouped in red clusters.

"WSDL" is compatible with "Webservice"

"Generic" is compatible with both "Main" and "Domain".



"Generic" is compatible with "Main", but not with "Intermediate" and "Domain" because "Intermediate" is an implementation module that introduces a new compatibility tree.

"Domain" is compatible with "Intermediate"



"Generic" is neither compatible with "Main" nor "Extra", because it is part of two compatibility trees and hence the implementation module it points to is ambiguous. This may result in undefined behavior.

FlowSpecify the flow to be started for handling the incoming request. Only flows from the scope of the entry point module can be selected.
RolesIf you want a user to be authenticated with certain roles, you may specify them here.