Read wsdl file in browser

When I try to open a WSDL file in a browser (http: //localhost/something/file.wsdl), I am invited to download this file. But I want instead of loading to be able to view as XML (string) in the browser?

thank

+3
source share
2 answers

This can happen if your server does not send the correct content type for the WSDL file.

When requesting a WSDL, there should be an HTTP response header, for example:

Content-type: text/xml

If you see a download popup, it might be configured for something else or missing altogether.

If you also use Tomcat with Apache, you can set something like this in the web.xml file:

<mime-mapping>
  <extension>wsdl</extension>
  <mime-type>text/xml</mime-type>
</mime-mapping>

For Apache, consider the mod_mime module .

+3
source

, . , . Internet Explorer 8, XML.

+1

All Articles