The DCS Service Publishing Utility
The service publishing utility (ServicePublishingTool.exe) acts as a wrapper for the ServiceModelReg, ServiceModelConfig, and ProxyBuilder utilities. The service publishing utility configures a service and its operations, and generates a proxy. It also generates a serviceName.svc service definition file that can be used as an endpoint for the service and places the service definition file in the output folder specified by the command line arguments. The Deploy Assembly recipe of the DCS Software Factory uses this utility.
Note
The ServicePublishingTool utility is located in DeploymentTool folder in the DCS Business Logic Visual Studio Extensions folder under the folder where you installed DCS.
Service Publishing Utility Modes
The service publishing utility has several modes, depending on the functionality that you want to execute. The following table lists the utility modes and includes a description of each. The final column is a list of the parameters that you can use in conjunction with the selected mode.
Mode |
Description |
Related Arguments |
---|---|---|
Assemblies |
Copies the specified assembly and any referenced assemblies to the specified target folder. |
assembly targetDir |
Direct |
Accesses the DCS databases directly rather than using the DCS management services to store information. |
None |
Discovery |
Updates the Discovery and ServiceConfiguration databases with the tasks defined in the assembly. This command also executes the ServiceModelReg and ServiceModelConfig utilities, passing in the required parameters. For more information about the ServiceModelReg utility, see The DCS ServiceModelReg Utility. For more information about the ServiceModelConfig utility, see The DCS ServiceModelConfig Utility. |
assembly filters targetSite, serviceModelRegDir, serviceModelConfigDir |
Proxy |
Creates a proxy assembly in the target directory. This mode executes the ProxyBuilder utility, passing in the required parameters. For more information, see The DCS ProxyBuilder Utility. |
assembly targetDir proxyBuilderDir |
Services |
Generates service definition files (.svc) for the service implemented by the specified assembly to the target folder. |
assembly targetDir |
Tasks |
Updates the DCSManagementDb database with tasks defined in the assembly.. |
assembly filters |
Undeploy |
Removes tasks from the DCSManagementDb database. |
None |
ServicePublishing Arguments
The service publishing utility takes several arguments, depending on the mode that you specify. The following table describes the arguments that the utility accepts.
Argument |
Description |
---|---|
assembly |
The assembly to process. |
filters |
Optional. Specifies context filters that the utility should apply to a task. |
proxyBuilderDir |
Optional. Specifies the folder containing the ProxyBuilder utility executable that the utility should use when executing. |
serviceModelRegDir |
Optional. Specifies the folder containing the ServiceModelReg utility executable that the utility should use when executing. |
serviceModelConfigDir |
Optional. Specifies the folder containing the ServiceModelConfig utility executable that the utility should use when executing. |
targetSite |
The Uniform Resource Identifier (URI) of the virtual folder hosting the service that you want the utility to register. |
targetDir |
Optional. Specifies the output directory where the utility should write the generated proxy files. |
Example Usage
The following command line sample copies the assembly and referenced assemblies into the target folder.
ServicePublishingTool.exe assemblies assembly="C:\ServiceDevelopmentFolder\Bin\Debug\Service.dll" targetDir="C:\IISRoot\WebSiteFolder\ServiceHostFolder\"
The following command line sample generates the service definition file in the target folder.
ServicePublishingTool.exe services assembly="C:\ServiceDevelopmentFolder\Bin\Debug\Service.dll" targetDir="C:\IISRoot\WebSiteFolder\ServiceHostFolder\"
See Also
The DCS ServiceModelReg Utility