tags:

views:

78

answers:

0

Hi ihave a fault converted to something like that with jax-ws:
,

public class Ex1 extends Exception { public Ex1(String code) { } ... } `

and an other one called Ex2.

I would like to have somthing like this:

@WebService

public class MyWS { public MyWS() { }

public Response doSomething(String id) { try{ } catch(Ex1 e){

}

catch(Ex2 e){

} }

Unfortunaltely, the wsdl dont allowed to create many faults for a WS.(soap 1.1)Only one is allowed. I dont want that differents exceptions to be map in the same fault. I have a ws for example which may throw 2 diferents exceptions & now the client have to DIG in the exception generated to get the right one with the fault code or detail. Pretty ugly i think. Any solution ? Thanks in advance for your help. I really appreciate. Excuse me for my poor english. it is not my mother tongue.