* @param appliesTo the {@code AppliesTo} instance to be parsed.
* @return the address of the service provider.
*/
public static String parseAppliesTo(AppliesTo appliesTo)
{
EndpointReferenceType reference = null;
for (Object obj : appliesTo.getAny())
{
if (obj instanceof EndpointReferenceType)
reference = (EndpointReferenceType) obj;
else if (obj instanceof JAXBElement)
{
JAXBElement<?> element = (JAXBElement<?>) obj;
if (element.getName().getLocalPart().equalsIgnoreCase("EndpointReference"))
reference = (EndpointReferenceType) element.getValue();
}
if (reference != null && reference.getAddress() != null)
return reference.getAddress().getValue();
}
return null;
}