Interface IServiceProvider

    • Method Detail

      • processServiceRequest

        @ThingworxExtensionApiMethod(since={6,6},
                                     canOverride=true,
                                     requiresSuper=true)
        InfoTable processServiceRequest​(java.lang.String serviceName,
                                        ValueCollection params)
                                 throws java.lang.Exception


        Processes an internal or reflected service request. Entities may call this method if they wish to invoke a service call directly on an entity. This method performs a service invoke authorization check against the current security context.

        Parameters:
        serviceName - - The name of the service to invoke
        params - - A collection of parameter mappings
        Returns:
        The results of the service invocation
        Throws:
        java.lang.Exception - If the security check fails, the service does not exist, or an error occurred during the execution of the service
      • processAPIServiceRequest

        @ThingworxExtensionApiMethod(since={7,2,0},
                                     canOverride=true,
                                     requiresSuper=true)
        InfoTable processAPIServiceRequest​(java.lang.String serviceName,
                                           ValueCollection params)
                                    throws java.lang.Exception


        Processes a service request invoked via the REST API. This method performs a service invoke authorization check against the current security context.

        Parameters:
        serviceName - - The name of the service to invoke
        params - - A collection of parameter mappings
        Returns:
        The results of the service invocation
        Throws:
        java.lang.Exception - If the security check fails, the service does not exist, or an error occurred during the execution of the service