Versions Compared

Key

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

...

Note

If the domain model was generated in a new module, you can skip this step and go directly to Creating a Service Call.

Schema

...

set editor

Open the Schema Set, set and unfold the schema. You can choose which entity is mapped to this type in the XSD schema, as can be seen below. In this case, the anonymous complex type of the element “add” in the XSD schema is mapped to the entity “add” in the domain model (the red box). It is good to realize that in general entities that are based on elements in a XSD schema are not singleton.

...

You can add validations on attributes. These are used when exposing Blueriq as a service, and are of no interest when calling another web service.

Soap

...

service editor

The Soap Service Editor service editor lets you configure the messages that you want to send to your web service and how you store messages received from the web service. For each operation, the web service needs two singleton entities: a Request entity and a Response entity, which will be used to create the message. When you generate the domain model, you will find these along with the other entities of the domain. You can use the SOAP Soap service editor to create mappings for these, if you did not generate the domain model, see below:

...

These entities are the only singleton singletons in your domain if you generated your domain automatically. Conceptually, they represent the envelope of your message (remember Chapter 2 - Simple Object Access Protocol (SOAP)). You can recognize these entities by their name. They are postfixed with either REQUEST or RESPONSE. These entities have no attributes and only one relation. In the code, Blueriq will start at this singleton, and work its way along the relation to all (indirectly) connected instances while creating the XML for the message. When sending a message, you have to make sure that this relation is set, otherwise the SOAP envelope will be empty.

...

Now that the web service is configured, you might want to call it. To call a web service in studioStudio, you need to create a service call. Chooses Choose the AQ_WebServiceClient from the list of available service calls (do not forget to import the Blueriq library). Every operation in the WSDL needs its own service call.

...

After you have created your service call, you can use it inside a flow. The web service throws a default event. 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.

Note

Usually you want to use a separate module for your web service. Read more information on this here: Chapter 7 - Modules and Data Mapping

...

Previous Chapter: Chapter 3 - Representational State Transfer (REST)

...