Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: New logo SOAPUI

If you want to just see a working example of 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 create fill your interaction module with 

 

 

When you want to see a basic example of Blueriq as a Service (BAAS), the quickest way is to create a new project, based on the example project(that comes with a standard Blueriq installation).

You will see that this project has a Configuration module in which the Web service and its operations are defined. This is what you expose to the outside world in your runtime dashboard. The project also has an Interaction module, that contains a with the service model (i.e. a domain model specifically for delivering the service), the Schema set and  and the SOAP service as defined in the WSDL and XSD. When you expose the web service in your runtime dashboard, you can also view this WSDL. In the same Implementation module, some static instances are made for the response. For each operation this web service offers (add, subtract, multiply and divide), the actual calculation is simply done in the default expression of the appropriate attribute. . 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. 

Info
titleNote

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 visuals for modeling your own simple BAAS or a visual for a more elaborate example of a BAAS that has with a data mapping.

Image Removed


 Image Added