內容管理 > PTC 伺服器連線 Setup > Configuring Arbortext Publishing Engine for the Windchill Visualization Service
  
Configuring Arbortext Publishing Engine for the Windchill Visualization Service
The Windchill Visualization Service (WVS) uses Arbortext Publishing Engine to publish XML and SGML documents stored in a PTC Server to outputs such as PDF and HTML. The best practice for configuring the interaction between WVS and Arbortext Publishing Engine is to use an Arbortext Publishing Engine sub-process pool that is dedicated to processing WVS requests. Refer to the Configuration Guide for Arbortext Publishing Engine for more information about Arbortext Publishing Engine sub-process pools.
To configure an Arbortext Publishing Engine sub-process pool to support the Windchill Visualization Service, you must modify the Arbortext Publishing Enginee3config.xml configuration file. This file is located at Arbortext-path\e3\e3\WEB-INF\e3config.xml.
The e3config.xml configuration file contains three objects that pertain to the Windchill Visualization Service. The first object is a RequestSelector object that tests for WVS requests and routes them appropriately. You do not need to modify this object. Following is that part of the configuration file:
<RequestSelector class="com.arbortext.e3.TestQueryMatch" id="test-wvs-class">
<Parameter name="query-name" value="class"/>
<Parameter name="query-pattern" value="com.arbortext.ptc.windchill.Compose"/>
</RequestSelector>
The second object is a SubprocessPool object that processes WVS requests. You must modify this object to enable Arbortext Publishing Engine sub-process pool support for WVS requests. Following is that part of the configuration file:
<SubprocessPool id="pool-wvs"
enabled="no"
maxBusyInterval="3600"
maxSubprocesses="2"
minSubprocesses="2"
>
<SubprocessContext>
</SubprocessContext>

<TestSet>
<Test name="test-wvs-class"/>
</TestSet>
</SubprocessPool>
Use Arbortext Editor or Arbortext Publishing Engine Interactive to modify the following attributes in the Windchill Visualization Service SubprocessPool object:
enabled — Set the value of this attribute to yes to enable the WVS sub-process pool.
maxSubprocesses — Set the value of this attribute to the number of Arbortext Publishing Engine sub-processes that you want enabled in the pool.
This value should match the number of Max Instances in the Worker Execution Command page of the WVS Worker Configuration Wizard. See the Windchill Visualization Service documentation for more information about this wizard and other WVS configuration.
minSubprocesses — Set the value of this attribute to the same value as the maxSubprocesses attribute.
Setting these values to the same number minimizes the system overhead associated with launching and terminating Arbortext Publishing Engine sub-processes.
* 
The third object is a SecurityConstraint with id windchill-requests. This disables the publishing requests from Windchill by default. You can set the SecurityConstraint to unrestricted after ensuring that only allowed users can send requests to Publishing Engine by deploying Publishing Engine on an intranet or by updating server.xml to limit the clients that can send requests to Publishing Engine.Set the value parameter to unrestricted in the e3config.xml, as described below:
<SecurityConstraint id="windchill-requests">
<Parameter name="access" value="unrestricted"/>
<TestSet>
<Or>
<Test name="test-wvs-class"/>
<Test name="test-function-sis"/>
</Or>
</TestSet>
</SecurityConstraint>
Configuring the WVS to Run with the Permissions of the Requesting User
You can set up WVS so publishing will always run with the permissions of the user who requests the publish job. To do this, you must modify the site.xconf file to set the useexecuteas=true setting for wvs.properties, and set your Arbortext Publishing Engine server as a trusted host in wt.properties. You can then run xconfmanager to propagate the changes to the appropriate configuration files.
The following updates must be made to the site.xconf file by an administrator:
1. In wt.properties, add a property with name set to wt.auth.trustedHosts and value set to a whitespace separated list of the host names of the Arbortext Publishing Engine servers that will connect to this PTC Server to download content. For example
<Property name="wt.auth.trustedHosts" overridable="true"
targetFile="codebase/wt.properties" value="peserver01.company.com"/>
2. Also in wvs.properties, add useexecuteas\=true to the publish.cadconvert.ARBORTEXT property to ensure the publish job will run as the requesting user.
* 
Before you propagate this property, notice the propogation overrides the property found in codebase/wvs.properties.xconf. Ensure that the only difference in the property value is the addition of the parameter useexecuteas=true. All other parameters should stay the same as what you have defined in wvs.properties.xconf.
For example:
<Property name="publish.cadconvert.ARBORTEXT" overridable="true"
targetFile="codebase/WEB-INF/conf/wvs.properties"
value="com.ptc.wvs.server.publish.CadConvertARBORTEXT,
useworkerdownload=$(wt.home)$(wvs.dir.sep)auth.properties,useexecuteas=true,
types=PDF HTML WEB POSTSCRIPT HTMLHELP SGML XML RTF 3D,defaulttype=PDF"/>
3. Configure the auth.properties file on the Windchill server to not contain a password. It should contain auth=$user.
* 
To use auth=username:password syntax in auth.properties, set the value com.arbortext.e3.allowAuthenticationWithoutTrustedHost in e3config.xml to true on the Publishing Engine server.
PTC recommends the use of auth=username:password in demo or test servers only.