If you set the property: “org.apache.cxf.oneway.robust” to “true”
on the server side endpoint, then CXF will delay sending the 202 and if there is an error parsing, it will send back a fault. However, most clients won’t process the fault anyway if it’s a oneway. With 2.7.11 (due soon), if you set the same property on the client, it will process the fault in that case. Dan On Apr 7, 2014, at 6:02 AM, kupkaj <[email protected]> wrote: > Hi, > > I have a problem with detecting unmarshalling exceptions (on server side) > when invoking one-way operations on soap service built upon cxf. > > For example, when client sends enpty element with type xsd:date, or some > invalid number in xsd:integer element, somewhere on chain > DocLiteralInInterceptor.handleMessage() gets invoked, and from within this > method DataReader<XMLStreamReader>.read() is called. This call fails and > message gets unwinded from within PhaseInterceptorChain.doIntercept(). > Client receives HTTP 200 :OK status (instead of HTTP 202: Accepted) and on > server side there is no way for service logic to detect there was some soap > message sent at all. > So messages with invalid content get practically lost, I can only find > traces of them inside server log file. > This is a problem, because I need to notify client side (which has its own > service published with oneway method for processing async responses from > server) that there was something wrong with request. > Moreover, when I added reliable messaging feature on cxf bus (both client > and server), client keeps resending the same message over and over again, > because there is simply no reply from server other than http 200. > > I tried to reproduce similar problem with Metro web service: elements with > invalid content are unmarshalled simply as null value. > > So what can be done with cxf service to enable me to process this invalid > messages? Do I need to insert a custom interceptor somewhere on the chain, > or is there some other solution? > > > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/Detecting-unmarshalling-error-with-Oneway-operations-tp5742536.html > Sent from the cxf-user mailing list archive at Nabble.com. -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
