Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page goes threw describes the steps that you need to follow in order to be able to call for calling a web service using the SOAP REST protocol. This page also give gives you background information you need to understand on how web service services work within the Blueriq architecture. 5 The following steps are required:

Table of Contents
maxLevel2
minLevel2
 

Importing

...

Importing

In order to interpret an XML response from a REST web service, Blueriq needs to import an XSD. In contrast to SOAP, there may not be an explicit contract available for REST. You can use the api API of the REST service to get xsd XSD files.

Tip

If the REST service only gives example answers, you can

automatically

generate an XSD file from the examples

.

(see for instance http://www.freeformatter.com/xsd-generator.html).

Go to File → Import → Import XSD and provide the location of the XSD file. If you have multiple files (for example: your XSD is importing/including an XSD schema) then , provide a zip file with all needed files. This is essentially the same as importing a WSDL (Chapter 4: Calling a SOAP service). Select the project for the import and you can choose whether to create a new module, or overwrite an existing one. The option 'Generate Domain' will automatically generate a domain model for you, based on the XSD schema referred to from the WSDL. When this button is checked, entities, attributes and relations are created based on the type definitions of in the XSD. When using an existing module, there may already be a domain model present, that uses identical names as in the XSD. When overwriting, conflicting elements are not created. Obviously, these problems do not occur if you use a new module. When 'Generate Domain' is unchecked, no domain model is generated for you. In that case, you can later match the elements from the XSD to you own domain (explained later). In general, it is advised to use a separate module in order to not mix to mix the domain model for the web service with the domain of your business.

You should get the message that the import was successful.

...

Open your project and go the (newly-created) module which contains the web service. The module now has a Schema Set. This item can be found in the bar on the left side of the screen, as can be seen below.

The Schema Set defines which entities, attributes and relations are used by the web service (they map the XSD to the domain model). This works exactly the same for REST and SOAP, and the description can be found here: Chapter 4: Calling a SOAP service.

...