Hi John,

I haven't done any major changes to ElementSource from your feedback
yet. So please go ahead and make those changes as you feel necessary
when you're reviewing the rest of the code.
Also, thanks for the explanation on how error handling is done in Woden.

Regards,
Oshani

On 9/8/06, John Kaputin <[EMAIL PROTECTED]> wrote:
Hi Oshani,
thanks for the updates. I wanted to make sure you were happy with my
changes to the DOM impl before making changes to OM, etc. But I certainly
can make the same changes to OM now, if you haven't done them already.
There may be other changes to follow as I am still reviewing the code.

I will also make the IllegalArgumentException change in the setSource
methods.

Regarding the try/catch block in reader.createElementSource, you wrote:

> The error still has to be recorded there some how,isn't it?

The IllegalArgumentException will contain the formatted WSDL019 error
message. This type of error (invalid input to setSource) should be exposed
directly to the client application by throwing the exception. It's up to
the client application to catch it and use exception.printStackTrace or
exception.getMessage to see see the details.  We shouldn't use
printStackTrace() with the Woden implementation (although I've just noticed
some uses of it that we'll need to remove).

The Woden approach to reporting errors is:

(1) if we can continue from an error then it gets reported by the
ErrorReporter.reportError method and processing continues. The
ErrorReporter will invoke the ErrorHandler to actually do handle the
reporting and it's up to the ErrorHandler implementation to decide what
that is. The default error handler provided with Woden just prints to
Sysout.

(2) if we can't continue from an error then we throw an exception
containing a formatted error message. This might be a WSDLException or a
more specific runtime exception like IllegalArgumentException. Sometimes
the Woden implementation catches a checked exception like
MalformedURLException which we wrap as a WSDLException and rethrow.

So, in createElementSource we should just instantiate the ElementSource
object, setting the ErrorReporter, then call setSource and if it throws an
IllegalArgumentException just let it surface up to the client application
(it's a runtime exception so we don't need to declare a throws clause).

regards,
John

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to