Problems with webservices, Axis and wsdl:import

Axis refuses to generate a client (when running Wsdl2java) when it can’t determine the content-type of the wsdl:imported resource.

A solution is adding the extension of the imported resources to the list of mime-types of the webserver where it resides (if possible).

I found this problem when trying to generate a client for some webservice of the Alfresco content manager. So, for fixing it, I added the following two entries to my Tomcat 5.5 web.xml:

<mime-mapping>
  <extension>wsdl</extension>
  <mime-type>application/xml</mime-type>
</mime-mapping>
<mime-mapping>
  <extension>xsd</extension>
  <mime-type>application/xml</mime-type>
</mime-mapping>

As a side note, this problem is also present when using Eclipse with the WTP (both 0.7 and pre-1.0 versions) as it depends on Axis.



%d bloggers like this: