added commented sample for wsdl on the local path
converted to 1.6 markup
|Deletions are marked like this.||Additions are marked like this.|
|Line 17:||Line 17:|
|Also see the article: [http://www.fawcette.com/javapro/2003_02/online/WSDL_kjones_02_27_03/ Configure Axis Web Services: Return prewritten WSDL from an AXIS Web service] by Kevin Jones||Also see the article: [[http://www.fawcette.com/javapro/2003_02/online/WSDL_kjones_02_27_03/|Configure Axis Web Services: Return prewritten WSDL from an AXIS Web service]] by Kevin Jones|
Q: How do I manually supply WSDL instead of returning automatically generated WSDL?
A: In your WSDD file, you can specify the location of a WSDL file.
<service name="Test" provider="java:RPC" > ... <wsdlFile>/org/someone/res/mywsdl.wsdl</wsdlFile> <!-- <wsdlFile>WEB-INF/wsdls/mywsdl.wsdl</wsdlFile> --> ... </service>
Axis will first look for a file of that name on the local path, then for a resource of that name on the classpath.
Also see the article: Configure Axis Web Services: Return prewritten WSDL from an AXIS Web service by Kevin Jones
One thing to be aware of is that Axis (at least 1.2.1 and 1.3) sometimes change the service address element of wsdl files, including hand written wsdl files. For example, if a service is deployed at:
When requesting the wsdl with:
Axis will sometimes change the hand written wsdl and replace "www.myco.com/webservices" with the machine name and port number of the machine on which the service is deployed, and return a wsdl with an address like:
Of course, this may cause problems for clients automatically generated from the wsdl, which may not recognise the machine name if they are external to the organisation. Including a <documentation/> element with the correct service address within the wsdl may at least enable developers to spot the error in their generated clients.