In this section we shall build and test the web service by running the build.xml
script. We shall run the various build.xml
targets to compile, package, and deploy the web service to WebLogic Server and subsequently invoke the web service using the client class. Right-click on build.xml and select Run As | Ant Build…, as shown in the following screenshot:
Select the run target and click on Run. The run target and all the preceding targets have dependence on the previous target. Thus, when the run target is run, all the preceding targets also run starting with the prepare target:
All the targets, except the clean target run, and the output from the web service client is shown next, as follows:
The run target runs the client class to invoke the web service, which sends the message output in the console, as follows:
If an error is generated in the first run, run the clean
target. The directories and files generated in the first run get deleted. Subsequently, the run
target...