Programming WebLogic Web Services
The following sections describe how to customize your WebLogic Web Service by updating the Web application deployment descriptor files of your Web Service WAR file:
By default, WebLogic Server dynamically generates the WSDL of a WebLogic Web Service, based on the contents of its web-services.xml
deployment descriptor file. See WebLogic Web Services Home Page and WSDL URLs for details on getting the URL of the dynamically generated WSDL.
You can, however, include a static version of the WSDL file in the Web Services EAR file and publish its URL as the public description of your Web Service. One reason for publishing a static WSDL is to be able to add more custom documentation than what the dynamically generated WSDL contains.
Warning: If you publish a static WSDL as the public description of your Web Service, you must always ensure that it remains up to date with the actual Web Service. In other words, if you change your Web Service, you must also manually change the static WSDL to reflect the changes you made to your Web Service. One advantage of using the dynamic WebLogic-generated WSDL is that it is always up to date.
To include a static WSDL file in your Web Services EAR file and publish it, rather than the dynamically generated WSDL, to the Web, follow these steps:
web-services.xml
file.web.xml
file of the Web application, adding a <mime-mapping>
element to map the extension of your WSDL file to an XML mime type.
Every WebLogic Web Service has a default Home Page that contains links to view the WSDL of the Web Service, test the service, download the client JAR file, and view the SOAP requests and responses of a client application invoking the Web Service. See WebLogic Web Services Home Page and WSDL URLs for details.
WebLogic Server dynamically generates the Web Services Home page and thus it cannot be customized. If you want to create your own custom Home Page, add an HTML or JSP file to the Web Services WAR file. For more information on creating JSPs, see Programming WebLogic JSP.
The generated web.xml
file in the generated WAR file of your Web Service does not contain information about how to map the file extensions of basic Microsoft applications (such as Microsoft Word and Excel) to MIME types. If you want your Web Application to understand these applications, follow these steps:
web.xml
file of the Web application, adding a <mime-mapping>
element to map the extensions of Microsoft Word applications to their appropriate MIME type. <mime-mapping>
<extension>xls</extension>
<mime-type>application/vnd.ms-excel</mime-type>
<extension>mdb</extension>
<mime-type>application/vnd.ms-access</mime-type>
<extension>mpp</extension>
<mime-type>application/vnd.ms-project</mime-type>
<extension>doc</extension>
<mime-type>application/msword</mime-type>
<extension>xls</extension>
<mime-type>application/ms-excel</mime-type>
<extension>ppt</extension>
<mime-type>application/ms-powerpoint</mime-type>
</mime-mapping>