Erweiterte Anpassung > Info*Engine-Benutzerhandbuch > Web Services Framework > Web Service Examples
  
Web Service Examples
There are several web service examples released with Windchill to illustrate the basics on how to write a web service and clients. You can find the examples in <Windchill>/prog_examples/jws.
For each, review the service source contained in the src directory and the client source contained in the src_client directory.
Each example was developed using the new-project.xml script, and are therefore organized in a manner consistent with this documentation. To exercise each example, enter the following commands:
% cd <Windchill>/prog_examples/jws/<ExampleDir>/src
% ant
This compiles, packages, and deploys the web service. At this point you should start Windchill, or restart it if it is already running. Then run the following commands:
% cd <Windchill>/prog_examples/jws/<ExampleDir>/src_client
% ant
This generates, compiles, and builds the distributable JAR for the client. Some example clients take optional parameters. Read the client source code within the src_client directory to see what parameters, if any, they may use.
To run the client from the src_client directory, enter the following:
% java -jar ../dist_client/<ClientJarFile>
Running ant clobber from both the src and src_client directories removes all generated and compiled files, which restores the example directory back to its original state.
After you are done reviewing a particular example web service, you can undeploy the service using the following:
% cd <Windchill>/prog_examples/jws/<ExampleDir>/src
% ant undeploy