ObjectGears Help

           
Forum   ObjectGears (Version: 1.6.0.0)

Web services

Web services (WS) represent one of possibilities how to work with ObjectGears from external systems (read and save data, start import or exports etc...). Advantage of webservices is integration of more applications into one bigger complex. Integration is possible across various platforms (windows, unix, linux) or various programming languages (.NET, java...).

Access to web services (WSDL)

In order to access all the web services use address http://yourweb/OGService.asmx

WSDL description of the service is on http://yourweb/OGService.asmx?WSDL

Enabling web services

Web services are disabled in the default configuration and have to be explicitly enabled. Enabling is done on three levels. This cascade enabling supports security (avoidance of unauthorized calls) and in case of need facilitates immediate prohibition of all the web services or some of them only.

Enabling in the web.config file

The web services have to be enbaled in the file web.config. The corresponding setting is called EnableWebServices. Possible values are:

  • True - web services are enabled
  • False – web services are disabled

If you do not want to use web services leave the option False.

Enabling in the class /query / import / export / worflow...

In the particular class / query / import / export set the option Enable access via web services and save.

Access role

The last step for the web service call consists in setting up a corresponding role for the account with which the web service will be called. This account must be introduced as a user of the ObjectGears system. The request access right depends on the web service that you want to call (see following table). In this way you can enable only specific web services to particular users (service accounts). E.g. one web service can only read data from some classes and other update records.

 

Web service Access right

RunImport

RunImportById

Start import

RunExport

RunExportById

Start export

GetData

GetDataById

Reade data in detail
GetDataByFilter Reade data in detail
GetDatas Reade data in detail
InsertData Insert data
UpdateData Change data
DeleteData Delete data
...WorkflowSeq Start workflow
CallEvent Event activation

List of web services

There is a list of WS in the following tables divided according to the use that ObjectGears system provides.

Overview of all the web services and their definition can be found on address http://__your_web__/OGService.asmx

Services for work with data

Web service Description

GetData

GetDataById

Method returns one record of the selected class or query.
GetDataByFilter Method returns the first record looked up by the input filter.
GetDatas Method returns records according to the input filter.
InsertData Method inserts one record into the class.
InsertDatas Method inserts more records into the class.
UpdateData Method changes one existing record in the class.
UpdateDatas Method changes more existing record in the class.
DeleteData Method deletes one existing record in the class.
DeleteDatas Method deletes more existing record in the class.

Services for work with import and export

Web service Description

RunImport

RunImportById

Method starts the selected import.

RunExport

RunExportById

Method starts the selected export.

Services for work with workflow

Web service Description

RunWorkflowSeq

RunWorkflowSeq2

Method starts the selcted workflow.
FailedWorkflowSeq Method terminates the selected workflow and sets it as Terminated with error.
CancelWorkflowSeq Method terminates the selected workflow and sets it as Cancelled.
PauseWorkflowSeq Method suspends the selected workflow a sets it status on Pause.
ContinueWorkflowSeq Method starts suspended selected workflow.
GetWorkflowSeqState Method returns status of the selected workflow.
CallEvent Method activating an event.

Other services

Web service

Description

RunScript

Method executes script defined in the model.

CheckParameter Method checks wheather input parameter value equals current value in ObjectGears.

Result of the web service call

All the web services return some instance of the object OG…Result. The result includes information if the call was successful or an error occured.

Result object Description
OGDataResult Result of calling WS for work with data.
OGImportResult Result of calling WS for import.
OGExportResult Result of calling WS for export.
OGWorkflowSeqResult Result of calling WS for workflow.
OGScriptResult Result of calling WS for RunScript.

All these result objects, that are returned bz WS, have these common properties:

 

Property Description
IsOk Indicates if an error occured by calling WS.
ErrorMessage List of errors.

These properties inform wheather the call was successful or not. An error is unexpected exeption or a fatal error.

This website is using cookies files to provide services and analyse visits. You agree with that by using this website.     Further information