privyet,
I am creating a SOAPFault element within the body to return. Then it is up to the user/client to do some error-handling.
You can call MessageContext and .getBody().
Look also into customizing Handlers perhaps, I haven't looked into this too much yet.
r




List:     axis-user
Subject:  Development with Message style
From:     "Yuriy Zubarev" <yuriy_zubarev () yahoo ! ca>
Date:     2003-06-19 14:25:12

Hello everyone,

I'm developing a SOAP service using Message style (the XML schema has been
imposed on me, so Soap Body must be of certain format) and I have the
following method in my service class:

public Document processOrder(Document request) {
...
}

The main problem is that based on some conditions I don't need to process
an order but to throw AxisFault so that client can catch it and act
accordingly. Unfortunately throwing AxisFault from the method above
doesn't have any effect on the client - it just receives empty (null)
response and that's it.

I was wondering what people do when they work with Message style services
and there is a need to throw an exception. Do I have to create Document
that would represent an exception and just return it? If so, then what is
a XML schema for such a document? Or may be there is an easy way that I
just don't know.

Thank you for your time,
Yuriy ZUbarev

PS: sorry for repeating this message...

Reply via email to