axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "x-fo.net" <i...@x-fo.net>
Subject AW: How to pass costum error messages to AxisFault
Date Mon, 12 Jul 2010 11:18:36 GMT
Hi,

do you have an example?
thanks

br

Markus

-----Ursprungliche Nachricht-----
Von: Meeusen, Christopher W. [mailto:Meeusen.Christopher@mayo.edu]
Gesendet: Samstag, 10. Juli 2010 16:40
An: java-user@axis.apache.org
Cc: java-user@axis.apache.org
Betreff: Re: How to pass costum error messages to AxisFault


In our services we throw a subclass of java.lang.exception, and the
client sees the exception message.  I'm not sure what extending
axisfault buys you.

Chris

On Jul 10, 2010, at 6:46, "x-fo.net" <info@x-fo.net> wrote:

> Hi,
>
> I tried to pass costum errors to the axisFault, but I always get this:
>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> ">
> <soapenv:Body>
> <soapenv:Fault>
>  <faultcode>soapenv:Server</faultcode>
>  <faultstring>unknown</faultstring>
>  <detail />
>  </soapenv:Fault>
>  </soapenv:Body>
>  </soapenv:Envelope>
>
> ---- this is my code for extending the AxisFault ----
>
> import org.apache.axis2.AxisFault;
>
> public class MYerror {
>    public class MYAxisFault extends AxisFault {
>
>          public MYAxisFault(String faultCode, String message) {
>            super(faultCode, message);
>          }
>
> }
>
> }
>
> ---- this was in the exception placed ------------
>
> private static int registerItem(
>            Item_type0 antragsstellerType0) throws MYAxisFault {
> ....
> } catch (ExcStamm e) {
>            String error= "";
>            error +="" + new Date()+"\n";
>
>            error +="No item found: " + e.Msg+"\n";
>            error +="item No: " + e.itemNo+"\n";
>
>
>            try {
>                throw new AxisFault("ExcStamm", error);
>            } catch (AxisFault e1) {
>
>                e1.printStackTrace();
>            }
>        }
>
> -----------------------
>
> Thanks for your help
>
> BR
> Markus
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Mime
View raw message