I currently have a .net SOAP web service with a timeout on the request that I set using
Server.ScriptTimeout = TIME_OUT;
I then have java client calling said web service. However when the timeout is reached I get this exception:
Exception in thread "Thread-9" com.sun.xml.ws.server.UnsupportedMediaException: Unsupported Content-Type: text/html; charset=utf-8 Supported ones are: [text/xml]
What is happening is that the web service returns an html error page with the http timeout code (503 I think?), which my Java code (generated using WSDLimport) doesn't expect.
Now I could catch the error UnsupportedMediaException on the client and attempt to translate it into something more meaningful, but I would prefer to send out a more specific timeout exception on the web service side. Is there anyway in a .net web service to send out a better exception when a timeout occurs, or any other way to handle this situation better?
EDIT:
I am using the WSDLImport from the glassfish 2 distribution.