读取浏览器wsdl文件 [英] read wsdl file in browser

查看:658
本文介绍了读取浏览器wsdl文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试打开浏览器WSDL文件(HTTP://localhost/something/file.wsdl)
我很愿意下载该文件。
但我想,而不是下载要在浏览器的XML(字符串)能有何看法?

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?

感谢您

推荐答案

如果您的服务器没有发送正确的内容类型的WSDL文件可能发生这种情况。

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

请求WSDL时,应该有响应HTTP头,这样的事情:

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.

如果您同时使用Tomcat与Apache,你可以设置像这样在web.xml文件中:

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>

对于Apache,看看在 mod_mime 模块。

这篇关于读取浏览器wsdl文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆