im building a web service using axis2 with jibx as the data binder.
what i need to do is return meaningful messages when i receive a bad xml
document or a doc that doesn't comply with the rules of the schema (values not
included in the enumerations, etc). i just spent the past 3 days chasing down
classloader issues related to trying to get weblogic-axis2-jibx working
together. now, it receives the requests correctly and if something is wrong,
it simply returns to the client a 500 error and logs to the log4j something
like this
2008-07-11 11:13:20,406 [ACTIVE] ExecuteThread: '0' for queue:
'weblogic.kernel.Default (self-tuning)' ERROR
org.apache.axis2.engine.AxisEngine - Invalid date format
org.apache.axis2.AxisFault: Invalid date format
at
com.jpmc.paycare.its.web.ITSMessageReceiverInOut.fromOM(ITSMessageReceiverInOut.java:307)
at
com.jpmc.paycare.its.web.ITSMessageReceiverInOut.invokeBusinessLogic(ITSMessageReceiverInOut.java:157)
at
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(Abst
bla bla bla bla
i would like it to send to the client, a valid http 200, and then i guess a
soap fault that indicates what exactly was wrong with the xml that was sent.
so the above would return something like:
soap:body
soap:fault
Invalid date format on field systemtime
soap:fault
soap:body
second, using the axis-jibx system, how do i get it to validate the incoming
xml with the schema first to make sure that the request fully complies before
it tries to parse it out?