webservice consumption

オフライン

Hello All,

I have a question please regarding the consumption of a webservice

the goal is to create an item with 2 properties in the instance B (http://machineB/InnovatorTwo/Client) from another instance A (http://machineA/InnovatorOne/Client)

When i try to add  an item with "POST" it doesn't work. (see screnshoot below)



Below is the server method that i have used in the instance InnovatorOne  that is installed in machineA to add an item :

const string url = "http://machineB/InnovatorTwo/Client";
const string db = "databaseOne";
const string user = "admin";
const string password = "pswd";
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("NameOfTheItem", "add");

remoteParts.setProperty("propertyOne", "valueOne");
remoteParts.setProperty("propertyTwo", "valueTwo");

return remoteParts.apply();


NOTE: the error appears when i run the method from Actions > run server method

Parents
  • Hello,

    If you're trying to move data from one Innovator instance to another, I'd recommend checking out the Data Synchronization Services that have been available since 11.0 SP12. This will save a lot of the hassle of needing to do this manually.

    Chris

  • Hi Chris,

    Thank you so much i was dealing with same issue and looks is the answer i was looking for.


    Im new to ARAS, and i think looking under the hood will be a good exercice for me, if you could help me with some details on how i can do it manually it will be a good exercise for me.

    So far  i have been able to send HTTP Requests between two DB of same machine from (machineA/InnovatorOne) to (machineA/InnovatorTwo).

    But when i try from (machineA/InnovatorOne) to (machineB/InnovatorTwo) i get the error "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond" hope if you can provide me with further information in this side
    Thank you
    Oussama

Reply
  • Hi Chris,

    Thank you so much i was dealing with same issue and looks is the answer i was looking for.


    Im new to ARAS, and i think looking under the hood will be a good exercice for me, if you could help me with some details on how i can do it manually it will be a good exercise for me.

    So far  i have been able to send HTTP Requests between two DB of same machine from (machineA/InnovatorOne) to (machineA/InnovatorTwo).

    But when i try from (machineA/InnovatorOne) to (machineB/InnovatorTwo) i get the error "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond" hope if you can provide me with further information in this side
    Thank you
    Oussama

Children
No Data