I use Glassfish 3 with jax-ws (metro). I write a SOAPHandler which can throw SOAPFaultException. I use Silverlight on the client side. SOAPFault set response code to 500, but Silverlight can't handle it, and it need to be set 200. How can I change the status code to 200? If I use WPF in the client side everything is good.
Here is the solution for WCF: http://msdn.microsoft.com/en-us/library/ee844556(v=vs.95).aspx but it not help...
Thanks.
Answer:
In Handler Close method it's works!:
context.put(MessageContext.HTTP_RESPONSE_CODE, new Integer(200)); context.setScope(MessageContext.HTTP_RESPONSE_CODE, MessageContext.Scope.APPLICATION);
I found that this answer helped me: http://mark.mymonster.nl/2011/02/10/make-use-of-wcf-faultcontracts-in-silverlight-clients/