Tutorial for the Edge SDKs > Invoking Services
Invoking Services
All Things have Services (functions) and property values. To manipulate property values, use service calls. The are generic services, including GetPropertyValues(), GetStringPropertyValue(), and SetPropertyValues(). These services are provided automatically on all Things. They provide the basics functionality needed for managing and manipulating properties.
There are two kinds of services:
"Local" services that execute on the Thing
"Remote services that execute on your device
Both types of services are invoked the same way, but only custom remote services need to be registered on the edge.
Here are two examples of calling a service, the first one using the C SDK and the second using the Java SDK:
Example 3. Calling a Service from C

twInfoTable *resultInfoTable = NULL;
twPrimitive *resultPrimitive = NULL;
char *namePropertyValue;

/* Invoke a Service */
twApi_InvokeService(TW_THING, "DeliveryTruck_1", "GetPropertyValues", NO_PARAMETERS, &resultInfoTable,

/* Get name property from result InfoTable */
twInfoTable_GetPrimitive(resultInfoTable, "result", 0, &resultPrimitive);
twInfoTable_GetString(resultInfoTable, "name", 0, &namePropertyValue);
Example 4. Calling a Service from Java

ValueCollection paramValues = new ValueCollection();
int remoteTimeout = 5000;
String thingName = "DeliveryTruck_1";
String serviceName = "GetPropertyValues";
InfoTable resultInfoTable = client.invokeService(RelationshipTypes.ThingworxEntityTypes.Things,
thingName, serviceName, paramValues, remoteTimeout);
InfoTable propertyValue = (InfoTable)resultInfoTable.getRow(0).getValue("result");
String thingNamePropertyValue = propertyValue.getFirstRow().getStringValue("name");
System.out.println("Name property is :"+thingNamePropertyValue);