Forum Discussion
Hi Oussama,
Have you tried connecting to the other Aras instance via IOM instead of the REST interface? For example, to get the first 100 parts from a remote Aras instance, something like this could work for you:
[For some reason I cannot print http:// in the url, this site automatically makes a "> out of it. Hence, it is denoted here by [http : //]]
const string url = "[http : //]localhost/InnovatorServer";
const string db = "InnovatorSolutions";
const string user = "admin";
const string password = "innovator";
var httpServerConnection = IomFactory.CreateHttpServerConnection(url, db, user, password);
var loginResult = httpServerConnection.Login();
if (loginResult.isError()) return loginResult;
var remoteInnovator = IomFactory.CreateInnovator(httpServerConnection);
var remoteParts = remoteInnovator.newItem("Part", "get");
remoteParts.setAttribute("maxRecords", "100");
remoteParts = remoteParts.apply();
httpServerConnection.Logout();
return this;
Of course, you'd need to adjust the hostname (here "localhost"), the instance name (here "InnovatorServer"), database name, user and password according to your setup.
If you need to use the REST API, you can find helpful blog posts here and here.
Hope this helps,
C
- Oussama6 years agoIdeator I
Hi Cogres i have tried this method but the problem is always the same.
- cogres6 years agoIdeator I
Hmm, I doubt this is an Aras issue, then. It's probably got something to do with your setup of Aras servers/machines. Check out this article or something similar to investigate the source of the problem.