This page describes the steps for calling a web service using the SOAP protocol. This page also give you background information on how web services work within the Blueriq architecture. The following steps are required:
Not everything in the WSDL standard is supported. See our Web Services datasheet for the restrictions on the standard. |
Because a SOAP service is neatly defined within a WSDL, it is possible to import such a WSDL file in Blueriq.
As Blueriq Encore cannot retrieve files from external locations, you need to provide all required files in a flat zip file. If you are using import or include statements, make sure that they are changed to not point at remote locations.
|
Open your project and go the module which contains the web service. The module now has a Schema Set and a SOAP Service. These can be found in the navigation panel in the category named "Connectivity".
The Schema Set defines which entities, attributes and relations are used by the web service (they map the XSD to the domain model). The SOAP Service defines which entities are sent (the message parts from the WSDL). You use these elements to define what entities, attributes and relation in your domain correspond to concepts in the WSDL and XSD.
If the domain model was generated in a new module, you can skip this step and go directly to Creating a Service Call. |
Now that the web service is configured, you might want to call it. To call a web service in Encore, you need to create a service call. Choose the AQ_SoapServiceClient from the list of available service calls (do not forget to import the BlueriqBasicModelling Library). Every operation in the WSDL needs its own service call.
More information about the parameters and exit evens in the AQ_SoapServiceClient can be found here.
After you have created your service call, you can use it inside a flow. When the service is executed, it will read the data needed from the domain model, starting from the singleton request instance. After receiving an answer from the server, the web service will store the data as new instances, starting from the singleton response instance. If a data mapping is used, the mapping is executed after the domain module in the web service module is filled.
A common error is that an empty message is sent to the server. The reason for this is that the domain model for the web service is not correctly initiated. If the web service returns an error message, Blueriq runtime will show this error.
Usually you want to use a separate module for your web service. Read more about this in 7. Modules and Data Mapping |