*/
public static void encodeFault(SoapMessage message, SequenceFault sf) {
LOG.log(Level.FINE, "Encoding SequenceFault in SOAP header");
try {
Message inmsg = message.getExchange().getInMessage();
RMProperties rmps = RMContextUtils.retrieveRMProperties(inmsg, false);
AddressingProperties maps = RMContextUtils.retrieveMAPs(inmsg, false, false);
ProtocolVariation protocol = ProtocolVariation.findVariant(rmps.getNamespaceURI(),
maps.getNamespaceURI());
Element header = protocol.getCodec().buildHeaderFault(sf, message.getVersion().getHeader());
Node node = header.getFirstChild();
if (node instanceof Element) {
Attr attr = header.getOwnerDocument().createAttributeNS("http://www.w3.org/2000/xmlns/",
"xmlns:" + RMConstants.NAMESPACE_PREFIX);
attr.setValue(rmps.getNamespaceURI());
((Element)node).setAttributeNodeNS(attr);
}
List<Header> headers = message.getHeaders();
headers.add(new Header(new QName(node.getNamespaceURI(), node.getLocalName()), node));
} catch (JAXBException je) {