Hi, I 'd like to return a custom message when the message sent to my Webservice is not well formed. Instead of returning a SOAPFault I would like to return a normal response. An element of the response will be used to set a specific status code for parsing error.
I tried to do that with an Axis handler overriding the invoke(MessageContext ctx) throws AxisFault and onFault(MessageContext messagecontext) methods but it does not work. But none method of the handler is invoked when the message is not well formed. (not that my handler is invoked properly when the message is well formed). How can i intercept parsing errors ? Thanks, Luc <?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <soapenv:Fault> <faultcode>soapenv:Server.userException</faultcode> <faultstring>org.xml.sax.SAXParseException: The end-tag for element type "Folder" must end with a '>' delimiter.</faultstring> <detail> <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">myhost</ns1:hostname> </detail> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope>