Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The purpose of Service Data Objects (SDOs) is to provide the ability to securely execute SQL on the database server from Aptify Web and Aptify SOA, returning the results to the caller.  The flexibility of being able to execute SQL statements, including stored procedures, without opening up the service layer to SQL injection attacks is a powerful feature in Aptify SOA.  System administrators and developers have control over which SQL statements can be executed through the Services Data Objects Entity.  Service Data Objects are executed by Name, not the SQL that executes.  Aptify SOA looks up the Service Data Object, confirms that the current platform and User are allowed to execute the Service Data Object, retrieves the SQL statement from the Service Data Object record, executes it and returns the results to the caller.

...

How to Create Service Data Object

...

 

  1. Create a Database Object to hold the SQL you want to execute.

  2. Create a new Service Data Objects record. (The Service Data Objects service is available in the Web Services application.) 

    • Name: The name to use when accessing the Service Data Object. Generally this will be identical to the Name of the Database Object used by the Service Data Object.
    • SQL: The SQL the Service Data Object should execute. Call the Database Object you created in step 1 here.

      Image Added 

    Choose whether to apply Application Filters to the Service Data Object. This will restrict use of the Service Data Object to a particular Service Application.

  3. To apply Application Filters, select the Enable Application Filters option on the General tab and specify which applications can access the object on the Applications tab.

    Image Added

    Choose whether to apply Security to the Service Data Object. This will restrict the use of the Service Data Object to the chosen Users, Groups, and/or Web Groups. (Of course, this is an additional level of restriction on top of the Grant SQL in the Database Object.) 


  4. To apply Security, select the Enable Security option on the General tab. If security is enabled then add at least one record on the Security tab.
  5. If the Database Object (or other SQL) requires parameters, enter each parameter on the Parameters tab. Use the Name of the parameter as it is defined in the SQL.

    Image Added

    Image Added

    Image Added

    The Service Data Object is now created. You can call it via Aptify Javascript API or via Aptify SOA.

 

Calling Service Data Object from Aptify SOA:

...