Hi,
Does this sample help? Feature layer extrusion | ArcGIS for Developers
Cheers
Mike
What do you mean to publish as a service?
Then go load it?
In that example you skip steps 1. and 2. and instead use ShapefileFeatureTable to create a FeatureLayer, then follow steps 3., 4., and 5.
ShapefileFeatureTable Class