Creating the Basic Ant build.xml File

3-6 Getting Started With JAX-RPC Web Services for Oracle WebLogic Server See Chapter 6, Invoking Web Services for information on writing client applications that invoke a Web Service.

3.5 Creating the Basic Ant build.xml File

Ant uses build files written in XML default name build.xml that contain a project root element and one or more targets that specify different stages in the Web Services development process. Each target contains one or more tasks, or pieces of code that can be executed. This section describes how to create a basic Ant build file; later sections describe how to add targets to the build file that specify how to execute various stages of the Web Services development process, such as running the jwsc Ant task to process a JWS file and deploying the Web Service to WebLogic Server. The following skeleton build.xml file specifies a default all target that calls all other targets that will be added in later sections: project default=all target name=all depends=clean,build-service,deploy target name=clean delete dir=output target target name=build-service --add jwsc and related tasks here -- target target name=deploy --add wldeploy task here -- dftarget project 9 Browse to the WSDL of the Web Service. Browse to the WSDL of the Web Service to ensure that it was deployed correctly. See Section 3.10, Browsing to the WSDL of the Web Service. The URL used to invoke the WSDL of the deployed Web Service is essentially the same as the value of the location attribute of the address element in the original WSDL except for the host and port values which now correspond to the host and port of the WebLogic Server instance to which you deployed the service. This is because the wsdlc Ant task generated values for the contextPath and serviceURI of the WLHttpTransport annotation in the JWS implementation file so that together they create the same URI as the endpoint address specified in the original WSDL. 10 Test the Web Service. See Section 3.12, Testing the Web Service. 11 Edit the Web Service. Optional To make changes to the Web Service, update the JWS file, undeploy the Web Service as described in Section 3.9, Deploying and Undeploying WebLogic Web Services, then repeat the steps starting from running the jwsc Ant task Step 6. Table 3–2 Cont. Steps to Develop Web Services Starting From Java Step Description Developing WebLogic Web Services 3-7

3.6 Running the jwsc WebLogic Web Services Ant Task