//copy missing namespaces from the source element to our element
Element element = (Element)srcElement.cloneNode(true);
copyMissingNamespaceDeclarations(element, srcElement);
if (element.getLocalName().equals("Policy"))
{
WSDLExtensibilityElement el = new WSDLExtensibilityElement(Constants.WSDL_ELEMENT_POLICY, element);
el.setRequired("true".equalsIgnoreCase(element.getAttribute("required")));
dest.addExtensibilityElement(el);
result = true;
}
else if (element.getLocalName().equals("PolicyReference"))
{
WSDLExtensibilityElement el = new WSDLExtensibilityElement(Constants.WSDL_ELEMENT_POLICYREFERENCE, element);
el.setRequired("true".equalsIgnoreCase(element.getAttribute("required")));
dest.addExtensibilityElement(el);
result = true;
}
}
return result;