users@glassfish.java.net

Re: com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: text/html Supported ones are: [text/xml]

From: Sreekanth <Sreekanth.Manga_at_Sun.COM>
Date: Tue, 27 Oct 2009 10:24:41 +0530

Yes.I tried with latests bits of Metro and Gfv3 as of Yesterday
morning.Anyway wil try again.

Thanks,
Sreekanth

Jiandong Guo wrote:
> Please try with a more recent build of Metro.
>
> Thanks!
>
> Jiandong
>
> suresh wrote:
>> Sreekanth wrote:
>>> Hi,
>>>
>>> I have created a simple web service with Mutual Certificate security
>>> enabled and a web service client deployed in the same web
>>> application as the service.When I run the client, I see the
>>> exception below.How can I get this to work.The same service works
>>> when the client and service are in different web applications.I am
>>> using GFv3 and latests metro bits.
>>>
>>> WARNING: StandardWrapperValve[IPingService]: PWC1406:
>>> Servlet.service() for servlet IPingService threw exception
>>> javax.servlet.ServletException
>>> at
>>> org.glassfish.webservices.JAXWSServlet.doPost(JAXWSServlet.java:148)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
>>> at
>>> org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
>>>
>>> at
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
>>>
>>> at
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
>>>
>>> at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
>>>
>>> at
>>> com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
>>> at
>>> com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
>>>
>>> at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
>>>
>>> at
>>> org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
>>>
>>> at
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:161)
>>>
>>> at
>>> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:789)
>>>
>>> at
>>> com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:697)
>>> at
>>> com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:951)
>>> at
>>> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:166)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
>>>
>>> at
>>> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
>>>
>>> at
>>> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
>>>
>>> at
>>> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
>>>
>>> at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
>>> at
>>> com.sun.grizzly.util.FixedThreadPool$BasicWorker.doWork(FixedThreadPool.java:431)
>>>
>>> at
>>> com.sun.grizzly.util.FixedThreadPool$BasicWorker.run(FixedThreadPool.java:410)
>>>
>>> at java.lang.Thread.run(Thread.java:619)
>>> Caused by: javax.servlet.ServletException: Service not found
>>> at
>>> org.glassfish.webservices.JAXWSServlet.doPost(JAXWSServlet.java:145)
>>> ... 26 more
>>>
>>> WARNING: StandardWrapperValve[IPingService]: PWC1406:
>>> Servlet.service() for servlet IPingService threw exception
>>> javax.servlet.ServletException
>>> at
>>> org.glassfish.webservices.JAXWSServlet.doPost(JAXWSServlet.java:148)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
>>> at
>>> org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
>>>
>>> at
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
>>>
>>> at
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
>>>
>>> at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
>>>
>>> at
>>> com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
>>> at
>>> com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
>>>
>>> at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
>>>
>>> at
>>> org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
>>>
>>> at
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:161)
>>>
>>> at
>>> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:789)
>>>
>>> at
>>> com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:697)
>>> at
>>> com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:951)
>>> at
>>> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:166)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
>>>
>>> at
>>> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
>>>
>>> at
>>> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
>>>
>>> at
>>> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
>>>
>>> at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
>>> at
>>> com.sun.grizzly.util.FixedThreadPool$BasicWorker.doWork(FixedThreadPool.java:431)
>>>
>>> at
>>> com.sun.grizzly.util.FixedThreadPool$BasicWorker.run(FixedThreadPool.java:410)
>>>
>>> at java.lang.Thread.run(Thread.java:619)
>>> Caused by: javax.servlet.ServletException: Service not found
>>> at
>>> org.glassfish.webservices.JAXWSServlet.doPost(JAXWSServlet.java:145)
>>> ... 26 more
>>>
>>> WARNING: StandardWrapperValve[IPingService]: PWC1406:
>>> Servlet.service() for servlet IPingService threw exception
>>> javax.servlet.ServletException
>>> at
>>> org.glassfish.webservices.JAXWSServlet.doPost(JAXWSServlet.java:148)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
>>> at
>>> org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
>>>
>>> at
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
>>>
>>> at
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
>>>
>>> at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
>>>
>>> at
>>> com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
>>> at
>>> com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
>>>
>>> at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
>>>
>>> at
>>> org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
>>>
>>> at
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:161)
>>>
>>> at
>>> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:789)
>>>
>>> at
>>> com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:697)
>>> at
>>> com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:951)
>>> at
>>> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:166)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
>>>
>>> at
>>> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
>>>
>>> at
>>> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
>>>
>>> at
>>> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
>>>
>>> at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
>>> at
>>> com.sun.grizzly.util.FixedThreadPool$BasicWorker.doWork(FixedThreadPool.java:431)
>>>
>>> at
>>> com.sun.grizzly.util.FixedThreadPool$BasicWorker.run(FixedThreadPool.java:410)
>>>
>>> at java.lang.Thread.run(Thread.java:619)
>>> Caused by: javax.servlet.ServletException: Service not found
>>> at
>>> org.glassfish.webservices.JAXWSServlet.doPost(JAXWSServlet.java:145)
>>> ... 26 more
>>>
>>> SEVERE: com.sun.xml.ws.server.UnsupportedMediaException: Unsupported
>>> Content-Type: text/html Supported ones are: [text/xml]
>>> at
>>> com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:295)
>>>
>>> at
>>> com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:129)
>>>
>>> at
>>> com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:360)
>>>
>>> at
>>> com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:187)
>>>
>>> at
>>> com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:93)
>>>
>>> at
>>> com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:105)
>>>
>>> at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:629)
>>> at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:588)
>>> at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:573)
>>> at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:470)
>>> at
>>> com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:112)
>>>
>>> at
>>> com.sun.enterprise.security.webservices.ClientSecurityPipe.processSecureRequest(ClientSecurityPipe.java:192)
>>>
>>> at
>>> com.sun.enterprise.security.webservices.ClientSecurityPipe.process(ClientSecurityPipe.java:180)
>>>
>>> at
>>> com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
>>>
>>> at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:629)
>>> at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:588)
>>> at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:573)
>>> at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:470)
>>> at com.sun.xml.ws.client.Stub.process(Stub.java:319)
>>> at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:157)
>>> at
>>> com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
>>>
>>> at
>>> com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
>>>
>>> at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:140)
>>> at $Proxy191.ping(Unknown Source)
>>> at simple.client.TestClient.processRequest(TestClient.java:50)
>>> at simple.client.TestClient.doGet(TestClient.java:73)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
>>> at
>>> org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
>>>
>>> at
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
>>>
>>> at
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
>>>
>>> at
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
>>>
>>> at
>>> com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
>>> at
>>> com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
>>>
>>> at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
>>>
>>> at
>>> org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
>>>
>>> at
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
>>>
>>> at
>>> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:161)
>>>
>>> at
>>> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:789)
>>>
>>> at
>>> com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:697)
>>> at
>>> com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:951)
>>> at
>>> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:166)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
>>>
>>> at
>>> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
>>>
>>> at
>>> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
>>>
>>> at
>>> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
>>>
>>> at
>>> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
>>>
>>> at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
>>> at
>>> com.sun.grizzly.util.FixedThreadPool$BasicWorker.doWork(FixedThreadPool.java:431)
>>>
>>> at
>>> com.sun.grizzly.util.FixedThreadPool$BasicWorker.run(FixedThreadPool.java:410)
>>>
>>> at java.lang.Thread.run(Thread.java:619)
>>>
>>>
>>>
>>>
>>> Thanks,
>>> Sreekanth
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_metro.dev.java.net
>>> For additional commands, e-mail: users-help_at_metro.dev.java.net
>>>
>> i saw the same type of error recently when running my STS configured
>> sample
>> i am using GFv2 with latest metro..
>> 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:295)
>> at
>> com.sun.xml.ws.encoding.StreamSOAPCodec.decode(StreamSOAPCodec.java:129)
>> at
>> com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:360)
>>
>> at
>> com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:318)
>>
>> at
>> com.sun.xml.ws.transport.http.HttpAdapter.access$500(HttpAdapter.java:92)
>>
>> at
>> com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:501)
>>
>> at
>> com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:285)
>> at
>> com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:143)
>>
>> at
>> com.sun.enterprise.webservice.JAXWSServlet.doPost(JAXWSServlet.java:176)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
>>
>> at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
>>
>> at
>> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
>>
>> at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
>>
>> at
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
>>
>> at
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
>>
>> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
>> at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
>>
>> at
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
>>
>> at
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
>>
>> at
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
>>
>> at
>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
>> at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
>>
>> at
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
>>
>> at
>> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
>>
>> at
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
>>
>> at
>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
>> at
>> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
>> at
>> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
>>
>> at
>> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
>>
>> at
>> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
>>
>> at
>> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
>>
>> at
>> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
>>
>> at
>> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
>>
>> at
>> com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
>> at
>> com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_metro.dev.java.net
>> For additional commands, e-mail: users-help_at_metro.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_metro.dev.java.net
> For additional commands, e-mail: users-help_at_metro.dev.java.net
>