//assume the return type of the method is adaptable (e.g. web results, fault bean getters).
MethodDeclaration method = ((MethodDeclaration) declaration);
return findAdapterType(method.getReturnType(), method, method.getDeclaringType().getPackage());
}
else if (declaration instanceof WebParam) {
WebParam parameter = ((WebParam) declaration);
return findAdapterType(parameter.getType(), parameter, parameter.getWebMethod().getDeclaringEndpointInterface().getPackage());
}
else if (declaration instanceof TypeDeclaration) {
TypeDeclaration typeDeclaration = (TypeDeclaration) declaration;
// Context usage is not thread-safe!!