}
Publish publishAnnotation = (Publish)actionClass.getAnnotation(Publish.class);
if (publishAnnotation != null) {
Class<?> publisherClass = publishAnnotation.value();
if (ContractProvider.class.isAssignableFrom(publisherClass)) {
ContractProvider provider;
try {
provider = (ContractProvider)publisherClass.newInstance();
Properties properties = toProperties(action.getPropertyList());
provider.setContractProperties(properties);
} catch (Exception e) {
throw new RuntimeException("Failed to create ContractProvider", e);
}
ServiceContract serviceContract = new ServiceContract(
new org.jboss.soa.esb.Service(service.getCategory(), service.getName()),