SAN FRANCISCO — The same team from Fenwick & West that represented Facebook Inc. in its disappointing initial public offering also handled a highly anticipated and much more successful IPO Friday for enterprise software company Workday Inc.

Fenwick chair Gordon Davidson and partner Jeffrey Vetter earned $1.4 million in legal fees and expenses representing Pleasanton-based Workday, which makes human-resources software sold as a service over the cloud.