InterSystems IRIS Data Platform 2021.1Opens in a new window > Class Reference > ENSLIB namespace > EnsLib.HTTP.GenericService


class EnsLib.HTTP.GenericService extends EnsLib.HTTP.Service

Generic HTTP Service based BusinessService class. Can use an HTTP InboundAdapter listener, or the standard CSP Service mechanism, or both. In order for the CSP mechanism to work, HTTP Services using this class must be configured with the invoking URL including ?CfgItem= giving the config item name. (Configured Services exposed using the HTTP Inbound Adapter may also be invoked with this URL parameter but because each configured Inbound Adapter listens on its own TCP/IP port this parameter is just a safety check for them.)

Property Inventory (Including Private)

Method Inventory (Including Private)


parameter DOCCLASS = EnsLib.HTTP.GenericMessage;
Set this to remove CSP inserted stream attributes (e.g. FileName, MimeSection) Need these removed for generic.
parameter SETTINGS = TargetConfigName:Basic:selector?multiSelect=0&context={Ens.ContextSearch/ProductionItems?targets=1&productionName=@productionId},PersistInProcData:Additional,KeepCSPPartition:Additional,CSPNoCharSetConvert:Additional,OneWay:Additional;
Inherited description: List of properties can be set as settings in the configuration file format is a comma separated list of property names

Properties (Including Private)

property %ExcludeResponseHttpHeaders as %String);
Comma separated list of response HTTP Headers from the external systems not to be passed back to the requesting service. The values are case-insensitive. The appropriate Content-Length will be used and ought not be specified here.
Property methods: %ExcludeResponseHttpHeadersDisplayToLogical(), %ExcludeResponseHttpHeadersGet(), %ExcludeResponseHttpHeadersIsValid(), %ExcludeResponseHttpHeadersLogicalToDisplay(), %ExcludeResponseHttpHeadersLogicalToOdbc(), %ExcludeResponseHttpHeadersNormalize(), %ExcludeResponseHttpHeadersSet()
property KeepCSPPartition as %Boolean [ InitialExpression = 1 ];
When calling the service through the CSP WebServer (Standard Request) and the target of the service is a business operation invoked InProc then it is possible to attempt to maintain connection to the external system defined in the operation in between messages by setting this to true.
There is still the possibility that the external system will close the connection.
The default is On.
Property methods: KeepCSPPartitionDisplayToLogical(), KeepCSPPartitionGet(), KeepCSPPartitionIsValid(), KeepCSPPartitionLogicalToDisplay(), KeepCSPPartitionNormalize(), KeepCSPPartitionSet()
property OneWay as %Boolean;
OneWay is true if no response is to be given. If the request is queued successfully to the target an HTTP/1.1 202 Accepted will be returned.
Property methods: OneWayDisplayToLogical(), OneWayGet(), OneWayIsValid(), OneWayLogicalToDisplay(), OneWayNormalize(), OneWaySet()
property PersistInProcData as %Boolean [ InitialExpression = 1 ];
Persist data to operations with invocation InProc that are called Synchronously.
The default is On.
This setting is only used if calling an operation with invocation InProc.
If this setting is off then no message headers will be created and message bodies will not be saved.
If this setting is off there will be no trace in the message viewer.
If this setting is off there will be no retry attempts by the operation - only one attempt will be made.
Property methods: PersistInProcDataDisplayToLogical(), PersistInProcDataGet(), PersistInProcDataIsValid(), PersistInProcDataLogicalToDisplay(), PersistInProcDataNormalize(), PersistInProcDataSet()
property SearchTableClass as %String;
Store a set of searchable properties associated with each XML Document processed.
These records will be stored in the named SearchTable class, if any.
Property methods: SearchTableClassDisplayToLogical(), SearchTableClassGet(), SearchTableClassIsValid(), SearchTableClassLogicalToDisplay(), SearchTableClassLogicalToOdbc(), SearchTableClassNormalize(), SearchTableClassSet()
property TargetConfigName as Ens.DataType.ConfigName;
Configuration item to which to send messages
Property methods: TargetConfigNameDisplayToLogical(), TargetConfigNameGet(), TargetConfigNameIsValid(), TargetConfigNameLogicalToDisplay(), TargetConfigNameLogicalToOdbc(), TargetConfigNameNormalize(), TargetConfigNameParseConfigNameSpec(), TargetConfigNameSet()
property Validation as %String;
Specifies types of Validation to perform. Set to non-empty to invoke OnValidate() in your subclass. You may add it to SETTINGS in your subclass if you want to distinguish several types of validation.
Property methods: ValidationDisplayToLogical(), ValidationGet(), ValidationIsValid(), ValidationLogicalToDisplay(), ValidationLogicalToOdbc(), ValidationNormalize(), ValidationSet()

Methods (Including Private)

method OnAdapterHTTPResponse(ByRef pStatus As %Status, ByRef pHTTPResponseStatus As %String, ByRef pBodyLen As %Integer, ByRef pResponseBodyStream As %Stream.Object, ByRef pMainResponseHeader As %String, ByRef pHeaderExtra As %String) [ Language = objectscript ]
Callback for allowing Service to override and control construction of the HTTP response if invoked via the SOAP Inbound Adapter Split www-authenticate HTTP header and add proxy-support header if needed
method OnInit() as %Status [ Language = objectscript ]
This user callback method is called via initConfig() from %OnNew() or in the case of SOAP Services from OnPreSOAP()
method OnProcessInput(pRequestBody As %CharacterStream, pResponseBody As %CharacterStream, ByRef pAction As %String) as %Status [ Language = objectscript ]
Inherited description: Override this method to process incoming data. Do not call SendRequestSync/Async() from outside this method (e.g. in a SOAP Service or a CSP page).
method OnResolveDocType(pMsg As EnsLib.HTTP.GenericMessage, ByRef pDocType As %String, ByRef pHeaderDocType As %String) as %Boolean [ Language = objectscript ]
Override this method to implement your own custom method for resolving the DocType of an incoming Message Returning nonzero means you are overriding the framework's standard DocType resolution.
method OnTearDown() as %Status [ Language = objectscript ]
This user callback method is called from %OnClose()
method OnValidate(pMsg As EnsLib.HTTP.GenericMessage, pValSpec As %String, Output pStatus As %Status) as %Boolean [ Language = objectscript ]
Override this method to implement your own custom method for validating an incoming Document Return non-zero to prevent default validation of the message (if any);
method resolveAndIndex(pMsg As EnsLib.HTTP.GenericMessage) as %Status [ Language = objectscript ]
Accept only specified document names; resolve DocType and perform requested validation if any
method resolveDocType(pMsg As EnsLib.HTTP.GenericMessage, Output pHeaderDocType As %String) as %String [ Language = objectscript ]
Return the DocType that this service will assign to this message's body document

Inherited Members

Inherited Properties (Including Private)

Inherited Methods (Including Private)


FeedbackOpens in a new window