Advanced Customization > Info*Engine User’s Guide > Web Services Framework > Using the Web Service Deployment Build Script
  
Using the Web Service Deployment Build Script
Released with Windchill is an Apache Ant built script that can be used to both generate and deploy a web service. If you are manually writing your web service and are making use of the project support provided, then this script is automatically called for you. This means that you do not need to understand its functionality directly (aside from the security.properties configuration). If, however, you have a legacy web service already installed that you do not want to repackage and deploy (for example the com.ptc.windchill.ws Generic Web Services released with Windchill), then you can choose to run this script manually (the same can also be achieved using the supplied Apache Ant framework). Running this script without any input properties only displays its requirements, and at a minimum you must supply the servlet.name and type.id or webservice.class properties as input. On the command line you can also choose to explicitly override properties included from security.properties by adding -D<propertyName>=<propertyValue> arguments. An example is specifying a security.policy property value that differs from the default values you have configured.
You can also choose to redeploy the com.ptc.windchill.ws web service after it has been secured using SAML Sender Vouches. To redeploy it under a servlet named “GenericWebService” run the following commands:
% cd <Windchill>/bin/adminTools/WebServices
% ant -Dservlet.name=GenericWebService -Dtype.id=com.ptc.windchill.ws
-Dsecurity.policy=samlsv generate
For example, you could choose to explicitly specify the security.policy property on the command line. If you simply want to use the security policy configuration in the security.properties file, then this property is not necessary.
Running the above command line performs the following actions:
1. Generates a JAX-WS based web service that exposes the com.ptc.windchill.ws Info*Engine-based web service.
2. Uses the wsgen utility to generate the required Java source artifacts in support of the web service deployment.
3. Compiles the previously generated source.
4. Based on the configured security policy, it applies the appropriate security policy information for use by the service. For most policies this results in a file in <Windchill>/codebase/WEB-INF named <wsit-class>.xml, which contains the security policy instructions for the web service layer.
5. JAR the compiled web service classes for use by Windchill.
6. Adds servlet and servlet-mapping deployment information for your web service servlet to:
<Windchill>/codebase/WEB-INF/web.xml
7. Creates or updates <Windchill>/codebase/WEB-INF/sun-jaxws.xml to deploy the web service, and associates the server-side callback handler responsible for extracting security information from the SOAP requests corresponding to the configured security policy.
It is not necessary for Windchill to be running to deploy a web service; however, you should restart Windchill after running the script to deploy or redeploy a web service.