com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: text/xml; charset="utf-8" Supported ones are: [application/soap+xml]

Java.net JIRA | Sreekanth | 5 years ago
  1. 0

    A few tests in Mex are failing recently and looks like some trust tests are also effected with this. Created a simple Netbeans client and server applications to reproduce this issue.Verified that the same application is working fine with Metro 2.2. Exception at server side is: SEVERE: Unsupported Content-Type: application/soap+xml Supported ones are: [text/xml] com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: application/soap+xml Supported ones are: [text/xml] at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:322) at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:156) at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:312) at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:342) at com.sun.xml.ws.transport.http.HttpAdapter.access$400(HttpAdapter.java:98) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:624) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:262) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.invokeAsync(ServletAdapter.java:218) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:159) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:194) at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:80) at javax.servlet.http.HttpServlet.service(HttpServlet.java:688) at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:662) SEVERE: Unsupported Content-Type: text/xml; charset="utf-8" Supported ones are: [application/soap+xml] com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: text/xml; charset="utf-8" Supported ones are: [application/soap+xml] at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:322) at com.sun.xml.ws.encoding.StreamSOAP12Codec.decode(StreamSOAP12Codec.java:107) at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:156) at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:312) at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:342) at com.sun.xml.ws.transport.http.HttpAdapter.invokeAsync(HttpAdapter.java:499) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.invokeAsync(ServletAdapter.java:206) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:159) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:194) at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:80) at javax.servlet.http.HttpServlet.service(HttpServlet.java:688) at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161) at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231) at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195) at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849) at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746) at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045) at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228) at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104) at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90) at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79) at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54) at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59) at com.sun.grizzly.ContextTask.run(ContextTask.java:71) at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532) at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513) at java.lang.Thread.run(Thread.java:662) INFO: Domain Pinged: stable.glassfish.org

    Java.net JIRA | 5 years ago | Sreekanth
    com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: text/xml; charset="utf-8" Supported ones are: [application/soap+xml]
  2. 0

    Error when trying to add service reference

    Stack Overflow | 3 years ago | Mare Infinitus
    com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: application/soap+xml; charset=utf-8 Supported Content-Types are: [text/xml]
  3. 0

    Unsupported Content-Type: text/xml; charset="utf-8" | Java.net

    java.net | 1 year ago
    com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: text/xml; charset="utf-8" Supported ones are: [application/soap+xml]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Metro - Users - Unsupported Content-Type: application/soap+xml Supported ones are: text/xml

    nabble.com | 4 months ago
    com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: text/xml;charset="utf-8" Supported ones are: [application/soap+xml]
  6. 0

    Unsupported Content-Type: application/soap+xml Supported ones are: text/xml | Java.net

    java.net | 1 year ago
    com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: text/xml;charset="utf-8" Supported ones are: [application/soap+xml]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.sun.xml.ws.server.UnsupportedMediaException

      Unsupported Content-Type: text/xml; charset="utf-8" Supported ones are: [application/soap+xml]

      at com.sun.xml.ws.encoding.StreamSOAPCodec.decode()
    2. JAX-WS RI Runtime Bundle
      WSServlet.doPost
      1. com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:322)
      2. com.sun.xml.ws.encoding.StreamSOAP12Codec.decode(StreamSOAP12Codec.java:107)
      3. com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:156)
      4. com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:312)
      5. com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:342)
      6. com.sun.xml.ws.transport.http.HttpAdapter.invokeAsync(HttpAdapter.java:499)
      7. com.sun.xml.ws.transport.http.servlet.ServletAdapter.invokeAsync(ServletAdapter.java:206)
      8. com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:159)
      9. com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:194)
      10. com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:80)
      10 frames
    3. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
      2 frames
    4. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1542)
      2. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
      3. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      4. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
      5. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
      7. org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
      8. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
      8 frames
    5. Kernel Classes
      ContainerMapper.service
      1. com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
      2. com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
      2 frames
    6. Grizzly WS
      AbstractThreadPool$Worker.run
      1. com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
      2. com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
      3. com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
      4. com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
      5. com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      6. com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      7. com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      8. com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      9. com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      10. com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      11. com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      12. com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      13. com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      13 frames
    7. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:662)
      1 frame