java.net.UnknownServiceException: no content-type 解决办法
来源:互联网 发布:悉知和知悉是什么意思 编辑:程序博客网 时间:2024/05/16 14:48
Exception in thread "main" java.net.UnknownServiceException: no content-type
at java.net.URLConnection.getContentHandler(URLConnection.java:1192)
at java.net.URLConnection.getContentHandler(URLConnection.java:1192)
主要原因是服务器端没有返回content-type字段,而且SUN JDK作为客户端时没有进行if failed, then guess and try的操作
有两种解决办法:
1. 在服务器端Tomcat 6.0/conf/web.xml加上
<mime-mapping>
<extension>wsdl</extension>
<mime-type>application/xml</mime-type>
</mime-mapping>
<extension>wsdl</extension>
<mime-type>application/xml</mime-type>
</mime-mapping>
2. 在客户端进行guess and try:
原文:http://wyangtan.spaces.live.com/?_c11_BlogPart_pagedir=Next&_c11_BlogPart_handle=cns!2511BB45B09CF44E!245&_c11_BlogPart_BlogPart=blogview&_c=BlogPart
- java.net.UnknownServiceException: no content-type 解决办法
- java.net.UnknownServiceException翻译
- Java获取文件Content-Type(Mime-Type)
- javax.xml.ws.WebServiceException: No Content-type in the header!
- content-type
- Content Type
- content-type
- Content-Type
- Content-Type
- Content-Type
- Content-Type
- Content-Type
- Content-Type
- content type
- Content-Type
- content-type
- content-type
- Content-Type
- HTML表头固定[1]
- BY-1004 人机交互界面可编程 CPU
- 11111111
- Go语言
- BY-1005 电机控制器
- java.net.UnknownServiceException: no content-type 解决办法
- IE下javascript cookie path
- Adobe 期望到2012年2亿5千万台智能机上将装有Flash
- SendMessage妙用
- HTML表头固定[2]
- 日记:2010-06-12 Saturday
- c,c++内存运行时深入研究
- C#数据库操作的三种用法
- java容器分析(图)