[ 
https://issues.apache.org/jira/browse/CXF-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12858336#action_12858336
 ] 

Eric Pederson commented on CXF-1434:
------------------------------------

I've attached an update to the java_first_spring_support sample that includes 
fault handling on the server.   If you pass "fault" to sayHi it will throw an 
exception that gets translated into a Fault with all the additional info.   It 
turns out that the ONLY way to get exceptions with data to pass the data to a 
fault in the java first JAX-WS scenario is to use a Java static nested class as 
the FaultInfo bean (oy).   This kindof sucks because it's a pretty obscure 
thing and also because you can't use Scala to write an exception.   This method 
still doesn't set the SOAP faultcode, you'll need to use an interceptor for 
that (see Knut's interceptor) attached here.

> Better Fault handling demo
> --------------------------
>
>                 Key: CXF-1434
>                 URL: https://issues.apache.org/jira/browse/CXF-1434
>             Project: CXF
>          Issue Type: Wish
>          Components: Samples
>         Environment: this should run on any servlet container. Java >= 5
>            Reporter: David Castaneda
>            Priority: Minor
>         Attachments: CXFTest.rar, java_first_spring_support_fault.tar, 
> java_first_spring_support_faults.zip
>
>
> Sample application showing how to create custom Soap Faults.
> The target is to show a functional example of how to transform Exceptions 
> (Checked and Unchecked) to SoapFaults, that can contain Server or Client 
> fault and a custom detail part.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to