简体   繁体   English

不支持的内容类型:text / html; charset = UTF-8支持的是:Jdev中的[text / xml]

[英]Unsupported Content-Type: text/html; charset=UTF-8 Supported ones are: [text/xml] in Jdev

I'm trying to consume a mock service from SoapUI in Jdev by generating proxy client but i keep getting the following exception in Jdev : 我试图通过生成代理客户端从Jdev中的SoapUI使用模拟服务,但我在Jdev中不断获得以下异常:

Exception in thread "main" com.sun.xml.internal.ws.server.UnsupportedMediaException: Unsupported Content-Type: text/html; charset=iso-8859-1 Supported ones are: [text/xml]
    at com.sun.xml.internal.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:284)
    at com.sun.xml.internal.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:118)
    at com.sun.xml.internal.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:278)
    at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:180)
    at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:83)
    at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:105)
    at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:587)
    at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:546)
    at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:531)
    at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:428)
    at com.sun.xml.internal.ws.client.Stub.process(Stub.java:211)
    at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:124)
    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:98)
    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
    at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
    at $Proxy33.searchOrder(Unknown Source)
    at beans.util.search.ShowOrderSearchResults.getOrderSearchResults(ShowOrderSearchResults.java:43)
    at beans.util.search.ShowOrderSearchResults.main(ShowOrderSearchResults.java:32)

Can anyone tell me what is the probable cause of this as I'm new to webservices. 任何人都可以告诉我这可能是什么原因,因为我是webservices的新手。

This error is not about the request, but about the response. 此错误与请求无关 ,而与响应有关。 The JAX-WS client-side runtime has sent the request and is about to process the response, but the response is not text/xml as expected (a SOAP response). JAX-WS 客户端运行时已发送请求并即将处理响应,但响应不是预期的text / xml(SOAP响应)。 Two possible root causes: 两个可能的根本原因:

  1. You are using the wrong URL for the web service and the web server sends a HTML response, either with the content of the URL, or an error page - for example 404 Not found. 您使用错误的URL进行Web服务,并且Web服务器使用URL的内容或错误页面发送HTML响应 - 例如404 Not found。
  2. Something breaks inside the web service (for example an unhandled exception) and the web server sends a HTML response with the error information - for example 500 Internal server error. Web服务内部中断(例如未处理的异常),Web服务器发送带有错误信息的HTML响应 - 例如500内部服务器错误。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 不支持的内容类型:文本/xml; charset=utf-8 支持的有:[application/soap+xml] - Unsupported Content-Type: text/xml; charset=utf-8 Supported ones are: [application/soap+xml] 是内容类型“text/xml; 字符集=utf-8”错了吗? - Is content-type “text/xml; charset=utf-8” wrong? UnsupportedMediaException:不支持的内容类型:text / html受支持的是:[text / xml] - UnsupportedMediaException: Unsupported Content-Type: text/html Supported ones are: [text/xml] "<i>ElasticsearchException[Failed to parse info response.<\/i> ElasticsearchException [无法解析信息响应。<\/b> <i>Check logs for detailed information - Unsupported Content-Type: text\/html;<\/i>检查日志以获取详细信息 - 不支持的内容类型:文本\/html;<\/b> <i>charset=utf-8]<\/i>字符集=utf-8]<\/b>" - ElasticsearchException[Failed to parse info response. Check logs for detailed information - Unsupported Content-Type: text/html; charset=utf-8] AWS SNS http 订阅返回“不支持的媒体类型:不支持内容类型‘text/plain;charset=UTF-8’” - AWS SNS http suscription return "Unsupported Media Type: Content type 'text/plain;charset=UTF-8' not supported" org.springframework.web.reactive.function.UnsupportedMediaTypeException:bodyType 不支持内容类型“text/xml;charset=UTF-8” - org.springframework.web.reactive.function.UnsupportedMediaTypeException: Content type 'text/xml;charset=UTF-8' not supported for bodyType 无法创建消息:SOAP 版本的内容类型不正确。 得到文本/xml; 字符集=UTF-8,但预期应用程序/soap+xml - Cannot create message: incorrect content-type for SOAP version. Got text/xml; charset=UTF-8, but expected application/soap+xml 错误:org.springframework.web.HttpMediaTypeNotSupportedException:不支持内容类型&#39;text/plain;charset=UTF-8&#39; - Error: org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'text/plain;charset=UTF-8' not supported MIME媒体类型text / html的阅读器; 找不到字符集= UTF-8 - Reader for MIME media type text/html; charset=UTF-8 was not found MessageBodyProviderNotFoundException:未找到 Media type=text/html;charset=UTF-8 的 MessageBodyReader - MessageBodyProviderNotFoundException: MessageBodyReader not found for media type=text/html;charset=UTF-8
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM