>> I have one question, how good is solution to send error code using
>> http status. (HttpToolkit)
>> ........................
>> try {
>> packet =
>> head.process(packet,con.getWebServiceContextDelegate(),this);
>> } catch(Exception e) {
>> e.printStackTrace();
>> if (!closed) {
>> writeInternalServerError(con);
>> }
>> return;
>> }
>> .........................
>> I found if essentially service implementation method throws exception
>> - then it is caught and fail message is created and sent back, but if
>> some other error occurs on server not in service implementation
>> method, then just http status sets as error.
>> Is it correct way? Don't we need to send fail message in any case?
>
> If you see WSEndpointImpl code, process() catches almost all the
> implementation errors in the Pipeline and converts to SOAP Fault
> messages. If there is an error between process() and sending it on the
> HTTP response stream, it is just returned as InternalServerError. We
> don't want to put too much burden on the transport to convert
> exception to correct message based on the binding. This way, writing
> transports will be easy. Ideally, we shouldn't expect errors in the
> JAXWS runtime !! Let us know what you think.
I don't know, how good is this solution.
I'm going to implement different transport and looking how different
situations are solved with HTTP.
Just think if client is not jaxws, but some other - may be it will act
some unexpected way getting such response (not sure).
Thanks.
WBR,
Alexey.