You can't save a polygon geometry in an ArcGIS server polyline feature class.So, the only way is you to transform the polygon to the polyline at the client side.I don't know if there is a sample somewhere, but I guess this is doable (using Paths and Rings properties of the geometry).
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.