Service Stub Builder

 

In this topic ...

How Do I...

Specifying Inputs

Objects this Builder Creates

Related Topics ...

Overview: Working with Data Services

The Service Stub Builder creates a separate, self-contained model that implements a version of a selected service. This model contains a public service whose operations have the same signatures as the those in the original service, but which all return constant, stubbed-out data.

Generating a "stub" service provider model is useful when the original service accesses a back-end system that is slow or is not always available. A stub model can also be used to run a demo on a disconnected laptop, or when trying to reproduce a problem.

The Service Stub Builder is not limited to working with public services. We can also use this Builder to create self-contained representations of data services created by such Builders as SQL Call or SAP Function.

The Service Stub Builder will use information created by the Service Test Builder to improve the generation of stubbed-out-data. If the Service Test Builder has been applied, the Stub Builder will be able to use the actual underlying service to generate "real" sample data; otherwise, the sample data is generated from the schema, and is not likely to look like real data.

The functionality provided by the Service Stub Builder is also available in the Service Definition Builder. It may be more convenient to do stub generation there if you are building a public service.

 

How Do I...

 

Work Disconnected from back-end data?

 

More How do I... Topics

 

Specifying Inputs

This Builder takes the inputs described in the table below. For help on inputs common to many or all Builders such as those in the Properties input group, see "Using the Builder Call Editor."

Input Name Description
Data Service Select a Data Service in this model for which to generate a stubbed-out version.
New Service Model Specify the name of the model to be generated.

Note that this model will be overwritten on each designer regen, and should not be modified directly since changes will be lost.

 

Objects Created by the this Builder

This Builder is unusual in that it creates no WebApp artifacts, but rather generates a complete and separate model.

The Builder calls in the generated stub model include:

  • Service Definition - creates a new public service

  • Service Operation - defines each service operation, with the same interface as in the target service

  • Schema - one for each schema used by the target service's inputs and outputs

  • Variable - one for each operation output, populated with constant sample data

  • Method - one for each operation, returning the above variable