axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ekbote, Niranjan" <NEkb...@doubleclick.net>
Subject Exceptions to WSDL faults
Date Fri, 16 May 2003 21:52:00 GMT
Hello, 
	I am getting some strange behaviour from Axis regarding exceptions.
May be I am doing something wrong. But here is the scenario. I have a method
that is exposed as a wen service and that method throws two exceptions (A
and B). Now A is derived from java.lang.Exception and B is derived from A.
That is A is sort of the general business excpetion and B may give
additional details about some specific business error. Now in my WSDD I have
both beanMapped. But the WSDL generated by Axis contains only one exception
which is exception A. The WSDL does not contain a message pertaining to
exception B and the operation tag in the binding only show the fault for
exception A and nothing for B. Does anyone know why this is happening? That
is why Axis is only picking up the base exception and not the derived one? 
	Now to get around it, I changed exception B so that it inherits
directly from java.lang.Exception and reimplements almost all the
functionality of A. Once I did this Axis immediately picked up the second
exception as well. Does this mean I cannot throw multiple exceptions in the
same hierarchy from the same method? 

Any help/workarounds are most welcome. 

Thanks! 

-- Niranjan.


Mime
View raw message