Versions Compared

Key

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

...

Most REST service providers publish documentation, either with an XSD Schema set (just like you use in a SOAP call) or more free-format documentation. They usually include one or more example request and response messages, from which you can (should be able to) derive a Domain schema. In your REST service, you can choose between an XSD schema set of Domain schema. XSD Schema set or a Domain schema. The first option with an XSD is for services that accept and send XML messages, and that is similar to calling a SOAP service. If a different format such as JSON is required (like in this visual), you should use a Domain schema

Once you have the required domain model, all you need is an exposed flow that contains a page an exposed flow that contains a page for the user input and the result, and a service call of type type AQ_WebServiceClient.

This visual shows a simple Blueriq model, without data mapping. If you want, have a look at the other visual about modeling the other visual SOAP call with data mapping, about modeling a web service call from a (more realistic) project with separate implementation modules for the business model and the web service model. In that situation, you will need a data mapping.

 

When you want to build a simple Blueriq model for your first call to a SOAP web service (i.e. be the service requestor) you can use the example project WebCalculator (that comes with a standard Blueriq installation) to act as the service provider: create a new project based on this example project WebCalculator, save it and go to your runtime dashboard to expose it (if you don’t see the widget, press the button Widgets and check ‘Expose as a webservice’ and save it). When you do that, a button ‘View WSDL’ appears, that enables you to see and save the WSDL. This WSDL contains the communication contract between the service requestor and the service provider.

Now when you create a new project to model the service requestor, you can have a quick start by using the WSDL import wizard. That can generate for you the service model (i.e. the domain model from the service provider), the Schema set and SOAP service. Now all that is left for you to do, is to make an exposed flow that contains a page for the user input and the result, and a service call of type AQ_WebServiceClient.

 The data mapping part of that visual applies for both SOAP and REST calls.