how to change port an AX service reference

Hi Folks,

We use Dynamics AX 2009. I have a service reference and need to change its port number in difference AX instance(DEV/QA/UAT/PROD). When I modify the port number in service reference configuration, it is saved in app.config but when I regenrate the service(right click on service in AOT), the port number is overwritten by old one. Any idea?

What do I need to do?

in QA we use 8082 but we need to have difference port number in each AX instance.