I get the following exception. Now i'm looking for a way how i can log the incomming message. I tried to use the SOAPHandler but there is the problem that
the exception is thrown earlier and i don't get the message. Is there an other way how i can log the message that is send from the server?
com.sun.xml.internal.ws.server.UnsupportedMediaException: Unsupported Content-Type: text/html Supported ones are: [text/xml]
at $Proxy36.isAlive(Unknown Source)
Try using Fiddler or Wireshark or something similar to that to capture incoming (if used on client) or outgoing (if used on server) HTTP response message and then you can look into HTTP body for SOAP message.
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
Joined: Mar 08, 2008
Thanks for your answer. But I would like to have a solution where i don't have to install a third party product on a client machine.
But i guess if there is no *Handler that can be added to the handlerchain to protocol the communication.
If a webservice is down and a html error page is shown instead, there is no way to show the error message to the user.
I'm looking for something where i can get the message. The only exception i get is this UnsupportedMediaException.
The only way which you can see SOAP message without installing a third-party tool is to use SOAP Handlers. But, you said that you already tried it. The other way is to use implementing web services API if it provides any methods to output SOAP message.
Joined: Mar 08, 2008
The Problem with the SOAP Handlers is that the handlers are not called when a html content is send by the server. So i need a possibility / handler that can be registered bevor the api tries to parse the message. What do you mean with "implementing web services API"? till know i haven't found a way to register other handlers.
The Problem with the SOAP Handlers is that the handlers are not called when a html content is send by the server
I really doubt if you say they are not called. The purpose of SOAP handlers is to do some task before or after the webservice invocation. Well, all the web service requests and responses are usually HTTP requests and responses but contain SOAP message in their body unless you are using a different transport protocol.
What do you mean with "implementing web services API"? till know i haven't found a way to register other handlers.
I think some webservice API classes may provide methods to probably output SOAP message, which I was not sure but suggesting you to check out your webservice java API documentation for any.