You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.

If you want to just see a working example of Blueriq as a Service (BAAS), you could use the standard example project WebCalculator as a basis for your new project (see the visual SoapUI to example project BAAS). However, if you want a more hands-on experience and construct that BAAS yourself, this is what you could do:

Start with an empty new project, and import the WSDL from the WebCalculator example to fill your interaction module with the service model (i.e. a domain model specifically for delivering the service), the Schema set and the SOAP service as defined in the WSDL and XSD. Your service will perform the calculation for which it receives a request with corresponding input parameters, and therefore your interaction module typically has no pages for user interaction. So if you create a flow at all, it will just contain service calls to create instances and/or set attribute values and/or relations. In other words, to create all that is necessary to fill the response. In this visual, there is no flow at all. There are static instances prepared for the response, and the calculations are simply done in the default expressions of the output attributes. 

Note

Because there are no pages, no instances will be created automatically for you, not even the singletons! The only instances that will be present when the service is called, are the instances of the incoming request. In this case, one instance for Request and one for Request_1.

That is why you have to create all response instances in a flow, or use static instances.

When your Interaction module is ready to handle incoming requests, you still need a way to tell the world which operations you are offering: Close your project, edit your project structure and add a Configuration module. Open your project again, go to the new Configuration module and create the Web service. Let it refer to the SOAP service in the interaction module to see its operations. You must give properties to each operation that you want to expose, even if you don't refer to a data mapping or a flow. This defines what you expose to the outside world in your runtime dashboard. In this example, the exposed operations are add, subtract, multiply and divide.

You can test if the BaaS works by calling it from SoapUI, a web services testing tool (it can mock both requests and responses) that is easy to download and install. In SoapUI, you can create a new project. You will need the URL to your service. To get this URL, go to runtime dashboard, reload your web service project, and expose it as a web service. Now click ‘view WSDL’, copy the URL from the browser tab and paste it into your SoapUI project as “Initial WSDL”. Then create a request for the add operation, fill in x and y, and check if the response delivers the desired result.

You can check the other BAAS visual for a more elaborate example of a BAAS with a data mapping.


  • No labels