If you are facing Timeout Error on AIF Webservice inbound during call code in ax 2012 then you need to increase timeout setting in web-service port configuration.
Steps to resolve this error is as below.
1. Go to System Administration menu.
2. Go to this path
\Menus\SystemAdministration\Setup\Services and Application Integration Framework\Inbound ports
3. Select the service port which you want to set timeout then disable the service.
4. Click on configuration.
4. Set the time out receive timeout, sent timeout,open timeout etc
5. After setting time out Enable web service port again.
6. Now check and run code for timeout issue get resolved.