Hi Adilson, and welcome to the Community!
There is some documentation in the AS Help about migrating mappServices from AS 4 to 6. There is also a Community-built migration tool to assist with migrating projects.
In order to give you better advice, it would help if you’re able to provide more information. Are you getting an errors on the function block or in the mappServices logger?