return null;
return createServiceRef(annotationInstance, annotationTarget, vfs);
}
protected UnifiedServiceRefMetaData createServiceRef(AnnotationInstance annotationInstance, E annotationTarget, UnifiedVirtualFile vfs) {
final UnifiedServiceRefMetaData ref = new UnifiedServiceRefMetaData(vfs);
final AnnotationValue declaredNameValue = annotationInstance.value("name");
String nameValue = declaredNameValue == null ? "" : declaredNameValue.asString();
if (nameValue.length() == 0)
nameValue = getName(annotationTarget);
ref.setServiceRefName(nameValue);
// TODO handle mappedName
// final AnnotationValue declaredMappedNameValue = annotationInstance.value("mappedName");
//String mappedNameValue = declaredMappedNameValue == null ? "" : declaredMappedNameValue.asString();
final AnnotationValue declaredWsdlLocation = annotationInstance.value("wsdlLocation");
String wsdlLocationValue = declaredWsdlLocation == null ? "" : declaredWsdlLocation.asString();
if (wsdlLocationValue.length() > 0)
ref.setWsdlFile(wsdlLocationValue);
final AnnotationValue declaredTypeValue = annotationInstance.value("type");
DotName declaredType = declaredTypeValue != null ? declaredTypeValue.asClass().name() : null;
if (declaredType != null && declaredType.toString() != Object.class.getName()) {
ref.setServiceRefType(declaredType.toString());
} else
ref.setServiceRefType(getType(annotationTarget));
final AnnotationValue declaredValue = annotationInstance.value("value");
DotName value = declaredValue != null ? declaredValue.asClass().name() : null;
if (declaredValue != null && !declaredValue.toString().equals(Service.class.getName())) {
ref.setServiceInterface(value.toString());
}
else {
ClassInfo targetClass = getTypeInfo(annotationTarget);
// FIXME
if (targetClass != null/* && isAssignableFrom(targetClass, DotName.createSimple(Service.class.getName()))*/) {
ref.setServiceInterface(getTypeInfo(annotationTarget).name().toString());
}
}
final boolean isJAXRPC = ref.getMappingFile() != null // TODO: is mappingFile check required?
|| "javax.xml.rpc.Service".equals(ref.getServiceInterface());
ref.setType(isJAXRPC ? Type.JAXRPC : Type.JAXWS);
return ref;
}