I assume you are asking how to do this using the Flex API since this is the forum you have posted in...
var pLine:Polyline = new Polyline(null, map.SpatialReference);
for (var r:int = 0; r < yourPolygon.rings.length; r++){
pLine.addPath(yourPolygon.rings);
}