Portlet Factory, Version 6.1.2


 

Service Consumer builder inputs

This topic describes the inputs for the Server Consumer builder.

Table 1. Service Consumer builder inputs
Input Name Description
Name Name for this builder call. The WebSphere Portlet Factory Designer displays this name in the builder call list.

This input is used as the local name of service. If this input is blank or if the Add All Provider Operations input is enabled, the target method name is used.

Provider Model Select a provider model that contains a Service Definition builder to use.

Example: samples/gettingstarted/OrdersServiceProvider

Add All Provider Operations Enable to add all the exposed operations from the provider model and make them available to the consumer.

Note: If this input is disabled, select individual operations using the Operation Name input.

Operation Name This input is available when Add All Provider Operations is disabled. Use this input to select one or more operations from the provider model.
Enable Operation Check this option for each operation listed in the Operations table that should be available for this consumer model.
Override Inputs Enable to override one or more input values for any of the service operations.

Note: You must set override values in the Overridden Inputs input below.

Overridden Inputs This input table is available when Override Inputs is enabled. Use this input table to set override values for service operation inputs. Input values you set here will automatically populate the specified input variable prior to the service operation being invoked.

Note: Values passed to the <buildername><target operation name>WithArgs method will take priority over these overridden inputs.

Rich Data Definition File Use this input to select a rich data definition XML file. This file is optional and, if specified, is applied to all of the schemas picked up from the provider model.

This input allows you to avoid adding a separate Rich Data Definition builder to your model. Use this input to specify an existing XML-based Data Definition File to apply to the Service Consumer schemas.

Using this input is equivalent to adding one or more Rich Data Definition builders to the model, and applying them to the schemas related to the service operations.

Context Variables

Context Variable Values Context Variables are variables in a service model, published by operations using an ID (allowing common/shared types.) A service consumer model looks for these published context variables, and allows values to be set for them.

Select an operation, and then provide a context variable ID and value.

Note: You might want to use context variables if the provider model defines context variables in its Service Operation builder, and you want to supply alternate values for those variables. Assigning values here provides a way for the consumer model to pass information to the provider model without exposing extra parameters to the operation.

Mapping Parameters

Mapping Parameters Use this input to control the behavior of the service mapping registry.

For example in a service mapping registry file you may have a "role" parameter defined, which is used to select the service to use. You can use the mapping parameters to set the role value from data in your model or from a profiled value.

Example:

<!-- Use a mapping parameter named "role" to
 select implementation for a given service. -->
    <ForService name="Service1">
        <IfParameterEquals name="role" value="manager">
            <UseService name="Service1_manager" />
        </IfParameterEquals>
.....
Advanced

Profile Name Use this input to specify an optional profile name to apply to the provider model selected above. This is useful if the provider model is profiled, and you want to override the default profile selection by specifying another profile.

You specify this value as <profile set name>:<profile name>. You can specify more than one profile by using a comma separator.

Parent topic: Service Consumer builder


Library | Support |