How set STATUS CODE to 200 when SoapFaultException?

1.4k views Asked by At

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);

1

There are 1 answers

1
Dave On