Demo.REST.MathService
class Demo.REST.MathService extends EnsLib.REST.Service
Simple REST Service in Ensemble It is a Math service with a RESTful interface returning JSON: /sum/2/3 => { "Sum" : 5 } There are two ways to call this REST interface. You can test both ways using a Browser: 1) Calling the adapter port directly http://IP:AdapterPort/sum/2/3 2) Or using the CSP Gateway mechanism. In order for this way to work, a web application has to be created first. For example, create a new web app with the following minimum parameters: Web App Name = /rest Namespace = yourNamespace Dispatch class = EnsLib.REST.Service http://IP:WebServerPort/rest/servicename/sum/2/3Method Inventory
Parameters
parameter ADAPTER = EnsLib.HTTP.InboundAdapter;
Inherited description: Name of the adapter class - override this to "" if you want to use only the regular HTTP mechanism and not the custom-port HTTP InboundAdapter.
parameter EnsServicePrefix = |sum;
Inherited description: This prefix will be removed from the beginning of the actual URL before matching it against the UrlMap.
If this prefix begins with '^' then the CSP Application will also be removed from the beginning of the URL if this service is being invoked via the CSP gateway.
If this prefix begins with '|' then the Ensemble Config Name for this service will be removed from the beginning of the URL, as well as the CSP Application if this service is being invoked via the CSP gateway.
Methods
classmethod Sum(pInput As %Library.AbstractStream, Output pOutput As %Stream.Object, pnumber1 As %Integer, pnumber2 As %Integer) as %Status
This method returns the sum of pnumber1 and pnumber2
Inherited Members
Inherited Properties
- %AlertStartTime
- %ConfigName
- %ConfigQueueName
- %LastActionTime
- %LastHandledTime
- %LastReportedError
- %OutsideCreated
- %PreserveSession
- %ProcessInputCalled
- %QuitTask
- %RequestHeader
- %SessionId
- %SuperSession
- %SuperSessionCreatedBeforeSession
- %WaitForNextCallInterval
- %WarnedLatest
- %isShadow
- Adapter
- AlertGracePeriod
- AlertGroups
- AlertOnError
- ArchiveIO
- BusinessPartner
- CSPNoCharSetConvert
- EnableStandardRequests
- GenerateSuperSessionID
- IOLogEntry
- InactivityTimeout
- ThrottleDelay
Inherited Methods
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %Extends()
- %GetParameter()
- %IsA()
- %IsModified()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OnClose()
- %OnNew()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SerializeObject()
- %SetModified()
- %SuperSessionSet()
- %ValidateObject()
- AcceptsContentType()
- AccessCheck()
- AdapterName()
- AssignOneSetting()
- CloseIOLogEntry()
- ConvertParameter()
- Decrypt()
- DispatchMap()
- DispatchRequest()
- Encrypt()
- EnumerateSettingsClose()
- EnumerateSettingsExecute()
- EnumerateSettingsFetch()
- Error()
- EscapeHTML()
- EscapeURL()
- ForceSessionId()
- GenerateSuperSession()
- GetDeferredResponseToken()
- GetProductionSettingValue()
- GetProductionSettings()
- GetPropertyConnections()
- GetSettings()
- GetShadowInstance()
- Http403()
- Http404()
- Http405()
- Http500()
- HyperEventCall()
- HyperEventHead()
- Include()
- InsertHiddenField()
- InsertHiddenFields()
- IsPrivate()
- JSONStreamToObject()
- JSONStreamToObjectArray()
- Link()
- Login()
- NewIOLogEntry()
- ObjectToJSONStream()
- OnAdapterHTTPResponse()
- OnError()
- OnErrorStream()
- OnGenerateSuperSession()
- OnGetConnections()
- OnHTTPHeader()
- OnHandleCorsRequest()
- OnHandleOptionsRequest()
- OnInit()
- OnKeepalive()
- OnMonitor()
- OnPageError()
- OnPostHyperEvent()
- OnPreDispatch()
- OnPreHTTP()
- OnPreHyperEvent()
- OnProcessInput()
- OnProductionStart()
- OnProductionStop()
- OnTearDown()
- Page()
- PopulateSuperSession()
- QueueName()
- QuoteJS()
- ReportHttpStatusCode()
- ResolveTarget()
- RewriteURL()
- SaveIOLogEntry()
- SendAlert()
- SendDeferredResponse()
- SendRequestAsync()
- SendRequestSync()
- SetResponseHeaderIfEmpty()
- ShowError()
- StartTimer()
- StatusToJSON()
- StatusToProxyObject()
- StopTimer()
- SupportedVerbs()
- ThrowError()
- UnescapeHTML()
- UnescapeURL()
- findDataNotInQuery()
- restoreFormEncoded()
- restoreMultipart()