catch (XFireFault fault)
{
/* If this happens we've most likely received some invalid
* WS-Addressing headers, so lets try to make the best of it.
*/
AbstractMessage faultMsg = context.getExchange().getFaultMessage();
AddressingHeaders outHeaders = (AddressingHeaders) faultMsg.getProperty(ADRESSING_HEADERS);
if (outHeaders == null)
{
outHeaders = new AddressingHeaders();
if (headers != null)
outHeaders.setRelatesTo(headers.getMessageID());
outHeaders.setAction(WSAConstants.WSA_200508_FAULT_ACTION);
faultMsg.setProperty(ADRESSING_HEADERS, outHeaders);
faultMsg.setProperty(ADRESSING_FACTORY, factory);
}
throw fault;
}
}
}