Thought to share a recent troubleshooting experience with AX 2012 AIF webservice when consumed through a different domain.
I wrote a Visual Studio Test application to connect to my AIF Service. From within the domain, I can consume the service without any errors. However, when my client program and services are on 2 different domains, I got this error
Error: The server has rejected the client credentials
Just before invoking the AIF Service operations, try passing the Windows.ClientCredential through code
client.ClientCredentials.Windows.ClientCredential.Domain = "contoso";
client.ClientCredentials.Windows.ClientCredential.UserName = "Admin";
client.ClientCredentials.Windows.ClientCredential.Password = "pass@word1";
The other solution I tried was by creating a claims user as mentioned in fellow blogger Joris Gruyter's post here http://daxmusings.codecrib.com/2011/11/trusted-intermediary-in-aif-services.html
However, it didn't work in my scenario.