Quantcast

Unsupported Content Type

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Unsupported Content Type

metro-3
I am using Endpoint.publish() to start up a web service.  When I invoke the method using the client stub, I get the exception below.  Do I need to change some configuration settings on either the client or the server to fix this?

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:291)
                at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:128)
                at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:287)
                at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:276)
                at com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:93)
                at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:432)
                at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
                at com.sun.xml.ws.transport.http.server.WSHttpHandler.handleExchange(WSHttpHandler.java:106)
                at com.sun.xml.ws.transport.http.server.WSHttpHandler.handle(WSHttpHandler.java:91)
                at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65)
                at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:65)
                at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:68)
                at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:552)
                at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65)
                at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:524)
                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
                at java.lang.Thread.run(Thread.java:619)
[Message sent by forum member 'rohead' (rohead)]

http://forums.java.net/jive/thread.jspa?messageID=322254

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unsupported Content Type

Robert Wierschke-2
Hi,

I'm getting the same exception when deploying my web service in glassfish v2 (from NetBeans). Also the service works fine.

regards
robert

2008/12/18 <[hidden email]>
I am using Endpoint.publish() to start up a web service.  When I invoke the method using the client stub, I get the exception below.  Do I need to change some configuration settings on either the client or the server to fix this?

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:291)
               at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:128)
               at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:287)
               at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:276)
               at com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:93)
               at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:432)
               at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
               at com.sun.xml.ws.transport.http.server.WSHttpHandler.handleExchange(WSHttpHandler.java:106)
               at com.sun.xml.ws.transport.http.server.WSHttpHandler.handle(WSHttpHandler.java:91)
               at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65)
               at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:65)
               at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:68)
               at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:552)
               at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65)
               at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:524)
               at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
               at java.lang.Thread.run(Thread.java:619)
[Message sent by forum member 'rohead' (rohead)]

http://forums.java.net/jive/thread.jspa?messageID=322254

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unsupported Content Type

daniel_manzke
Hi,
 
I know this problem. I've developed a web service deployed it on tomcat 5 and 6, all was fine until there. Then I created a .NET-Application which causes this stacktrace. Then I import the wsdl with the visual studio, this stacktrace is generated.
 
Daniel

2008/12/18 Robert Wierschke <[hidden email]>
Hi,

I'm getting the same exception when deploying my web service in glassfish v2 (from NetBeans). Also the service works fine.

regards
robert

2008/12/18 <[hidden email]>

I am using Endpoint.publish() to start up a web service.  When I invoke the method using the client stub, I get the exception below.  Do I need to change some configuration settings on either the client or the server to fix this?

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:291)
               at com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:128)
               at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:287)
               at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:276)
               at com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:93)
               at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:432)
               at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
               at com.sun.xml.ws.transport.http.server.WSHttpHandler.handleExchange(WSHttpHandler.java:106)
               at com.sun.xml.ws.transport.http.server.WSHttpHandler.handle(WSHttpHandler.java:91)
               at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65)
               at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:65)
               at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:68)
               at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:552)
               at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:65)
               at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:524)
               at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
               at java.lang.Thread.run(Thread.java:619)
[Message sent by forum member 'rohead' (rohead)]

http://forums.java.net/jive/thread.jspa?messageID=322254

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]





--
Mit freundlichen Grüßen

Daniel Manzke
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unsupported Content Type

metro-3
Hi,

I've resolved the problem.

'application/soap+xml' is the content type used for SOAP 1.2 messages whereas text/xml is used for SOAP 1.1. Hence the client send SOAP 1.2 requests and service expects only SOAP 1.1.

Metro uses SOAP 1.1 by default. How to enable SOAP 1.2 binding is explained here:
 - http://forums.java.net/jive/thread.jspa?messageID=322894
 - https://metro.dev.java.net/1.4/docs/soap12.html

regards
robert
[Message sent by forum member 'wierob' (wierob)]

http://forums.java.net/jive/thread.jspa?messageID=322967

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...