java - How to Handle Invalid (HTML) Messages in JAX-WS -
my soap client based on jax-ws. server (which written , operated else) returns valid xml messages, occasionally, when experiences internal error, returns html message error code (http 500).
unfortunately, in case jax-ws client merely throws unsupportedmediaexception: "unsupported content-type: text/html".
what need way find out error condition server reports in order take actions. i'd rather change server, that's not possible, outside reach.
at least, need log incoming raw response.
i know possible log all requests , responses following advice: https://stackoverflow.com/a/5647686/578759
but overflow system log, have several requests per second.
so instead i'd rather log response in case of error.
we have soaphandler in place, logs incoming , outgoing soap messages, works on valid soap messages, i.e. after parsing xml. if incoming response html, don't point handler invoked.
is there way add similar handler @ stage?
Comments
Post a Comment