cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Import Thing's service into eclipse

Sathishkumar_C
17-Peridot

Import Thing's service into eclipse

Hi All,

I have scenario like,

Thing "TestThing" created in Thingworx with GenericThing Template. Also created a service called "TestService".

Now, in parallel I'm developing an extension on eclipse. 

I want to use or call "TestService" on extension.

How can I achieve this?

 

Thanks & Regards,

Sathishkumar C

1 ACCEPTED SOLUTION

Accepted Solutions

Thing targetThing = ThingUtilities.findThing("YourThingName");
targetThing.processServiceRequest(serviceName, new ValueCollection());

 

You can use ThingUtilities to find your Thingn, and invoke this service like presented above.

ValueCollection is responsible for puttig parameters for you service. If you don't need parameters you can leave it like above.

 

This service is returning InfoTable with output.

View solution in original post

1 REPLY 1

Thing targetThing = ThingUtilities.findThing("YourThingName");
targetThing.processServiceRequest(serviceName, new ValueCollection());

 

You can use ThingUtilities to find your Thingn, and invoke this service like presented above.

ValueCollection is responsible for puttig parameters for you service. If you don't need parameters you can leave it like above.

 

This service is returning InfoTable with output.

Top Tags