QName wsaEpr = new QName(Names.WSA_NAMESPACE_NAME, "EndpointReference");
while (extensionElements.hasNext()) {
ExtensibilityElement ext = (ExtensibilityElement)extensionElements.next();
if (ext instanceof UnknownExtensibilityElement && wsaEpr.equals(ext.getElementType())) {
DOMSource domSource = new DOMSource(((UnknownExtensibilityElement)ext).getElement());
W3CEndpointReference w3cEPR = new W3CEndpointReference(domSource);
EndpointReferenceType ref = VersionTransformer.convertToInternal(w3cEPR);
endpoint.getTarget().setMetadata(ref.getMetadata());
endpoint.getTarget().setReferenceParameters(ref.getReferenceParameters());
endpoint.getTarget().getOtherAttributes().putAll(ref.getOtherAttributes());
}