{
if ( m_dialect.equals( AddressingConstants.NSURI_ADDRESSING_SCHEMA ) )
{
if ( metadata instanceof EndpointReferenceDocument )
{
EndpointReferenceDocument metadataReferenceDoc = (EndpointReferenceDocument) metadata;
metadata = createMetadataReferenceDocument( metadataReferenceDoc.getEndpointReference( ) );
}
else
{
LOG.error( "Error resolving MetadataEntry - dialect was " + m_dialect + ", but document at location "
+ m_location + " was not of type {" + m_dialect + "}EndpointReference" );
}
}
else if ( m_dialect.equals( org.apache.ws.addressing.v2003_03.AddressingConstants.NSURI_ADDRESSING_SCHEMA ) )
{
if ( metadata instanceof org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument )
{
org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument metadataReferenceDoc =
(org.xmlsoap.schemas.ws.x2003.x03.addressing.EndpointReferenceDocument) metadata;
XmlBeansEndpointReference xmlBeansEndpointReference =
new XmlBeansEndpointReference( metadataReferenceDoc.getEndpointReference( ) );
EndpointReferenceType epr =
(EndpointReferenceType) xmlBeansEndpointReference.getXmlObject( AddressingConstants.NSURI_ADDRESSING_SCHEMA );
metadata = createMetadataReferenceDocument( epr );
}
else