On Tuesday 14 October 2008 6:20:29 am esschul wrote:
> Hello ppl!
>
> My env is jdk1.5.016 and I use the java2wsdl-strategy. Every thing is
> working like expected, except that I'd like to define my own specific fault
> per method. Unfortunatly I couldn't seem to find anything useful in the
> documentation, or on google code search. Can anyone point me in the right
> direction?
>
> -Espen


Other than recommending reading the JAX-WS spec, I guess I would point you to 
the JAX-WS system test I have that tests a bunch of "code first" things:
http://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/

Specifically, the DocLitWrappedCodeFirstService.java file.   There is 
a "throwException" method on it that throws a couple different types of 
exceptions:

The simplest is:
http://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/CustomException.java
Basically, just stick getter and setter methods on the Exception for each 
datapoint.

The "standard" jaxws way would be closer to:
http://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ServiceTestFault.java
That defines a separate JAXB bean for the data and adds a "getFaultInfo" 
method that returns that bean.


-- 
Daniel Kulp
[EMAIL PROTECTED]
http://dankulp.com/blog

Reply via email to