Versions Compared

Key

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

...

Open your project and go the (possible newly-created) module which contains the web service. The module now has a Schema Set and a Soap Service. These 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 webservice (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 created automatically in an empty module, then you can skip the configuring these elements, because they are automatically set up correct and directly go to Creating a Service Call.

Schema Set Editor

Open the Schema Set, and unfold the schema. You can choose which entity is mapped to this type in 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 an XSD schema are not singleton.

When choosing simple elements, you can choose to which attributes they map. See below. Mapping relations works in a similar way.

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 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 webservice web service needs two singleton entities: a Request entity and a Response entity, which will be used to create the message. When you create the domain automatically, you will find these along with the other entities of the domain. You can use the soap service editor to create mappings for these, if you did not create the domain automatically, see below:

These entities are the only singleton 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 post fixed with either REQUEST or RESPONSE. These entities have no attributes and only one relation. When sending a message, you have to make sure that this relation is set. otherwise the SOAP envelop will be empty.

Creating a Service Call

To call a webservice in studio, you need to create a service call. Chooses 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.

Here you can define several attributes.

  • Service Module: The module in which the service is located.
  • Service: Select SOAP or REST service and select which service to call.
  • Operation: This is the name of the operation which is going to be executed. You can look up the name in the WSDL.
  • Url: The URL of the webservice. If none is provided, the URL in the WSDL is used.
  • Configuration Module: The name of the module where the datamapping is located. You need to specify this if your domain model is not in the same module as the webservice.
  • Data Mapping: The name of the data mapping to be executed when this operation is called.
  • Username: A possible username, for services with logins.
  • Password A possible password, for services with logins.

...