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 called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. 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

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.

Announcements


Top Tags