The controller file should be placed in the same physical folder as the service module using the following naming convention: <Service Module Name>Controller.xml
Shown below is a sample XML controller for the Change Password Service Module. The file to be created should be named as: ChangePasswordController.xml (since the name of the service module was specified as ChangePassword).
<ServiceModuleController validator="ZoneBasedServiceModuleValidator" submitControl="imgBtnSubmit" globalPanel="GlobalPanel" optionalPanel="OptionalPanel">
<Control required="true" name="txtOldPassword" message="Please enter the old password"></Control>
<Control required="true" name="txtNewPassword" message="Please enter the new password"></Control>
<Control required="true" name="txtConfirmNewPassword" message="Please confirm the new password"></Control>
</ServiceModuleController>
Attribute | Required | Description |
---|---|---|
Validator | Yes | Used to plug in the validator to be used for the service module. If you create your own validator, use this attribute to specify it. |
submitControl | Yes | Used to specify the ID of the control that is used to submit the details of the service module to the Web service. |
GlobalPanel | Yes | Used to specify the ID of the panel control in the service module that will house all the data entry controls. |
OptionalPanel | Yes | Used to specify the ID of the panel control in the service module that will dynamically contain all the optional fields. |
name | Yes | Used to specify the ID of the control that requires a required field validation to be marked as optional. |
message | Yes | Used to specify the message that will be displayed to the user if the user does not enter a value/select an item in the control. |
valueSource | No | Used to specify the default value that will be loaded into the control; the only value that will be entered for the attribute value is a valid appSetting key value. |