cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Idar Borlaug <idar.borl...@gmail.com>
Subject Throwing soap fault
Date Tue, 03 May 2016 10:48:53 GMT
Hi

I have a client that wants my service to throw a Client /Sender exception,
when the error is a problem on the clients side.

I haven't used named exceptions and can't implement that now.
I tried this code:
QName faultNameSoap12 = new QName(SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE,
"Sender");
SOAPFault fault = null;
try {
fault = SOAPFactory.newInstance().createFault(e.getMessage(),
faultNameSoap12);
} catch (SOAPException e1) {
}
throw new SOAPFaultException(fault);

The problem is that some clients use SOAP 1.1 and some use SOAP 1.2, and i
can't find a way to read which version this call is and return the correct
soap fault.

Am i doing this totaly wrong? Or is there some way to read which version is
in use now?
-- 
Idar Borlaug

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message