read wsdl file in browser

只愿长相守 提交于 2019-12-12 15:15:01

问题


When i try to open WSDL file in browser (http://localhost/something/file.wsdl), i am offered to download that file. But i want instead of downloading to be able view as XML(string) in browser?

Thank you


回答1:


This might happen if your server is not sending the correct content type for the WSDL file.

There should be a HTTP header on the response when requesting the WSDL, something like this:

Content-type: text/xml

If you see a download popup then maybe this is set to something else, or it is missing altogether.

If you are also using Tomcat with Apache, you could set something like this in the web.xml file:

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

For Apache, have a look at the mod_mime module.




回答2:


It all depend on what browser your using. Try different than your main browser. When you open it in Internet Explorer 8 you should have XML view.



来源:https://stackoverflow.com/questions/5398167/read-wsdl-file-in-browser

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!