cxf-users mailing list archives

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

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,
SOAPFault fault = null;
try {
fault = SOAPFactory.newInstance().createFault(e.getMessage(),
} 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

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