Actually, I may have mislead you *slightly*... :-)

It is actually recommended that the SOAP stack sets a 500 response
code when returning a SOAP fault over HTTP, but this shouldn't be the
responsibility of the application developer.

However, I just ran across this CXF issue (while looking for something
else) that says CXF doesn't currently do this automatically:

http://issues.apache.org/jira/browse/CXF-999

Fortunately, someone has posted a solution. If having a 500 code as
well as a SOAP Fault is important for your app, you can follow the
instructions on that page to set it up.

Andrew.

2009/6/24 tutu <[email protected]>:
>
> ok, thanks a lot for your responses and your help Andrew.
>
> tugdual
>
>
> Andrew Clegg-2 wrote:
>>
>> 2009/6/24 tutu <[email protected]>:
>>>
>>> thanks for your response andrew,
>>> so i must put my 500 code in a SAUP Fault with my message? Is that right?
>>> Do
>>
>> Don't think in terms of HTTP error codes -- these are not really
>> relevant to SOAP, for the reasons I mentioned.
>>
>> A SOAP client will see a SOAP fault and handle it appropriately, e.g.
>> a Java one will turn it into an exception on the client side.
>>
>>> you know the easiest way
>>> to add SAUP faults to a webservice wsdl-first?
>>
>> Have a look at some of Glen's tutorials, e.g.:
>>
>> http://www.jroller.com/gmazza/entry/database_crud_actions_with_web
>>
>> You can also throw any unchecked exception from a web service, and
>> it'll be converted to a SOAP fault automatically, but it is better
>> practice to declare them in the WSDL.
>>
>> Andrew.
>>
>> --
>> :: http://biotext.org.uk/ ::
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Does-CXF-web-service-can-return-HTTP-exceptions--tp24180699p24181914.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>



-- 
:: http://biotext.org.uk/ ::

Reply via email to