Each of these servers use the same architecture.
The only difference is the custom endpoints, which all follow a simple architecture.
For example, I wrote a webservice that connects to all the .DLLs of a back-office taxi application (written in Xbase++) that is used by several Kiosks (running a Javascript application on Android tablets). The drivers use the Kiosks to submit an application to drive and the Kiosk app scans their DMV, TLC, SSN licenses, signature, entered data and submits all info to the webservice via an endpoint. This has saved a lot of time for the people in the office.
The same web service architecture is also used by 2 other eXpress++ customers who need to give remote access to customer's data.
The endpoint code simply uses Xbase++ functions to access the data and communicate with the client.
That data can even be accessed using SQL even though the data is DBFNTX or FOXCDX by using the ADS local server DLL. No ADS license required.
Below is a screenshot of the WebService.exe running on the server (notice all info received and sent is a JSON object).
The screen is eXpress++ code.
There is no additional Web Server required, such as IIS or Apache and all SQL statements (if used) are handled by AdsLoc32.dll, even DBFNTX and FOXCDX.
If you are interested in how to create a customized WebService, using this endpoint concept, let me know.
Here is a code example of a custom endpoint:
Code: Select all
METHOD WebService:KioskGetLeaseRecord()
LOCAL oParams := DataObject():new(), oRecord, oLeaseId, ;
oLease, oResponse := DataObject():new(), cLeaseId, cResponse
::httpResponse:addHeader('Access-Control-Allow-Origin','*')
::httpResponse:addHeader('Access-Control-Allow-Methods','GET,POST,OPTIONS')
::httpResponse:addHeader('Access-Control-Allow-Headers','Content-Type')
oParams := ::getVar("LEASE")
oLease := Json2Var(oParams)
oLease := oLease:lease
::ParamsSetData("KioskGetLeaseRecord", oLease )
cLeaseID := oLease:leaseID
UseDb('LSE')
IF LSE->(dbSeek(cLeaseID))
oRecord := LSE->(DC_DbRecord():new())
LSE->(DC_DbScatter(oRecord))
oResponse:LeaseRecord := oRecord
oResponse:status := 200
ELSE
oResponse:statusMessage := 'Lease ' + cLeaseId + ' not found!'
oResponse:status := 404
ENDIF
cResponse := ::ResponseFormat(oResponse,::httpResponse, 'JSON' )
::Write2Log('KioskGetLeaseRecord', oResponse, oLease)
dbCloseAll()
RETURN cResponse