private void setSoapFaultExtElement(BindingFault bf) throws ToolException {
if (extReg == null) {
extReg = wsdlFactory.newPopulatedExtensionRegistry();
}
SoapFault soapFault = null;
try {
soapFault = SOAPBindingUtil.createSoapFault(extReg, isSOAP12());
} catch (WSDLException wse) {
Message msg = new Message("FAIL_TO_CREATE_SOAPBINDING", LOG);
throw new ToolException(msg, wse);
}
soapFault.setName(bf.getName());
soapFault.setUse((String)env.get(ToolConstants.CFG_USE));
if (WSDLConstants.RPC.equalsIgnoreCase((String)env.get(ToolConstants.CFG_STYLE))
&& env.optionSet(ToolConstants.CFG_NAMESPACE)) {
soapFault.setNamespaceURI((String)env.get(ToolConstants.CFG_NAMESPACE));
}
bf.addExtensibilityElement(soapFault);
}