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

Import Thing's service into eclipse

SOLVED
Highlighted
Aquamarine

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

Re: Import Thing's service into eclipse

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.

1 REPLY 1

Re: Import Thing's service into eclipse

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.