How to preserve the original WSDL when requesting ?wsdl of an Axis2 web service
I have noticed a lot of queries in Axis2 forums on keeping the WSDL unchanged when issuing ?wsdl of a particular Axis2 web service. This can easily be achieved by setting useOriginalwsdl parameter to true in services.xml. Then Axis2 shows the wsdl file placed at the META-INF directory of service archive when requesting ?wsdl
Suppose your Axis2 service archive (*.aar) includes a test.wsdl in the META-INF directory. Now, you deploy your Axis2 service and issue http://<host>:<port>/services/?wsdl.
Then, Axis2 generates a wsdl instead of your own wsdl placed in your service archive. How do you avoid this behavior?
Open your services.xml and add the following parameter.
<parameter name="useOriginalwsdl">true</parameter>
Now you will get the original wsdl when requesting ?wsdl of your service.
Simple.. isn't it?
Suppose your Axis2 service archive (*.aar) includes a test.wsdl in the META-INF directory. Now, you deploy your Axis2 service and issue http://<host>:<port>/services/
Then, Axis2 generates a wsdl instead of your own wsdl placed in your service archive. How do you avoid this behavior?
Open your services.xml and add the following parameter.
<parameter name="useOriginalwsdl">true</parameter>
Now you will get the original wsdl when requesting ?wsdl of your service.
Simple.. isn't it?
Comments