Here is something I am thinking of adding to Axis; comments welcome. If
people like it we can call it WS-Debug, WS-Trace or something similar :)

-steve

problem
------------
 its not always easy to find out why your client is failing to talk to a
server, if all you get back is an exception. The usual solution is a support
call, and that costs time and money.

proposed solution
--------------------------

we add a way to log messages in handlers and endpoints, info messages that
are intended for the client. When there is an axis fault, all these messages
are included in the XML data. If we provide it in a well documented format,
other tools and handlers can also extract the data (such as TCPmon,
SoapScope...). Soapscope already has a custom log implementation; with their
own log and their own handler which adds the log to an HTTP header

By making the ability to log core to axis, any handler or class can log
without depending on other applications, yet third party handlers can still
get at the data. Integrating with faults gives us more transport
independence, though we effect the message more (heisenberg effects...)

proposed impl
---------------------
-have a new method in MessageContext, such as logToCaller(String s), which
adds a string to log
-create the log on first use, make it a List of String
-add a method List getCallerLog() that returns the list or null
-modify the AxisServlet fault processing to get the list, and if it exists
add is as <axis:caller-log> with
nested <axis:caller-log-message> elements for every string
-add log messages to sample apps/some of the handlers we use, where
appropriate

Life would be easier if global onFault handlers worked; we could just do
this in a handler. Putting stuff into the Servlet is a bit of a hack, and we
do want third party handlers to be able to get at the data, which means
global OnFault handling.

I'm not proposing a full commons log interface/listener, because these
messages are all really at the info level. Though we could do something
fancy with multi levels and give the caller the ability (via a SOAP header)
to set the info level on a case by case basis.

Reply via email to