Skip to main content

EnsLib.SOAP.GenericService

class EnsLib.SOAP.GenericService extends EnsLib.SOAP.Service

Generic WebService-based BusinessService class. Can use a SOAP.InboundAdapter listener, or the standard SOAP Service mechanism, or both. In order for the CSP mechanism to work, Web Services using this class must be configured with the invoking URL including ?CfgItem= giving the config item name. (Configured Web Services exposed using the SOAP 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

Method Inventory

Parameters

parameter DOCCLASS = EnsLib.SOAP.GenericMessage;
parameter NSWinnowSizeThreshold = 7500;
Response stream size below which the response body should be scanned for namespace prefix instances so that unused declarations from the header can be omitted from the body
parameter SECURITYIN = NOHEADER;
Inherited description: The SECURITYIN parameter controls the treatment of a WS-Security header in the input SOAP message. The possible values of SECURITYIN are ALLOW, NOHEADER, IGNORE, IGNOREALL and REQUIRE.
- The default value of IGNORE will ignore any WS-Security headers in the input except for the UsernameToken which can always be used to login the user.
- The value of ALLOW will cause the WS-Security header to be verified on input.
- The value of REQUIRE will require the presence of the WS-Security header and verify the header on input.
- The value of IGNOREALL will ignore any WS-Security headers in the input including the UsernameToken.

- The value of NOHEADER will REALLY ignore any WS-Security headers in the input including the UsernameToken.

Note that if validation of the Security header is enabled (ALLOW or REQUIRE), then a CA file, named iris.cer, containing the trusted root X509 certificates should be put in the InterSystems IRIS manager directory if signature verification or decryption is to be performed. An optional Certificate Revocation List (iris.crl) may also be put in the InterSystems IRIS manager directory.
parameter SETTINGS = TargetConfigName:Basic:selector?multiSelect=0&context={Ens.ContextSearch/ProductionItems?targets=1&productionName=@productionId},ProcessHeaders,SearchTableClass::selector?context={Ens.ContextSearch/SearchTableClasses?host=EnsLib.EDI.XML.Service.Standard},PersistInProcData:Additional,KeepCSPPartition:Additional,OneWay:Additional;
Inherited description: Can't do grace period without an OnTask loop
parameter TOLOWERHEADERVARS = 1;
Set this to 0 to prevent normalizing of HTTP header variable names to lowercase

Properties

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 %SearchTableType as %String;
Category of SearchTable specified in ..SearchTableClass
Property methods: %SearchTableTypeDisplayToLogical(), %SearchTableTypeGet(), %SearchTableTypeIsValid(), %SearchTableTypeLogicalToDisplay(), %SearchTableTypeLogicalToOdbc(), %SearchTableTypeNormalize(), %SearchTableTypeSet()
property %VDocFormat as %String;
Format options to apply if we need to output an XML VDoc object as a Stream
Property methods: %VDocFormatDisplayToLogical(), %VDocFormatGet(), %VDocFormatIsValid(), %VDocFormatLogicalToDisplay(), %VDocFormatLogicalToOdbc(), %VDocFormatNormalize(), %VDocFormatSet()
property HeaderDocType as %String;
Schema type to use for the SOAP Envelope element and the Header elements it contains
Property methods: HeaderDocTypeDisplayToLogical(), HeaderDocTypeGet(), HeaderDocTypeIsValid(), HeaderDocTypeLogicalToDisplay(), HeaderDocTypeLogicalToOdbc(), HeaderDocTypeNormalize(), HeaderDocTypeSet()
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 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 ProcessHeaders as %Boolean;
Apply standard processing to SOAP headers; otherwise just pass them through
Property methods: ProcessHeaders(), ProcessHeadersDisplayToLogical(), ProcessHeadersGet(), ProcessHeadersIsValid(), ProcessHeadersLogicalToDisplay(), ProcessHeadersNormalize(), ProcessHeadersSet()
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()
property WSDL as %String;
Name of imported WSDL to use in describing the request document body types that may be received by this service
Property methods: WSDLDisplayToLogical(), WSDLGet(), WSDLIsValid(), WSDLLogicalToDisplay(), WSDLLogicalToOdbc(), WSDLNormalize(), WSDLSet()

Methods

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)
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
classmethod OnErrorStream(pStatus As %Status, pInstance As EnsLib.SOAP.Service, pSOAPVer As %String = "1.0")
Control the type and content of error returned to the SOAP caller
classmethod OnHTTPHeader(ByRef OutputBody As %Boolean) as %Status
Ensure no call to %response.WriteHTTPHeader() before OnPage(); ServerOnly and not Abstract to ensure $$$cMETHrunnable
method OnInit() as %Status
This user callback method is called via initConfig() from %OnNew() or in the case of CSP invoked services from OnPreSOAP()
method OnProcessInput(pRequestBody As %CharacterStream, pResponseBody As %CharacterStream, ByRef pAction As %String) as %Status
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.SOAP.GenericMessage, ByRef pDocType As %String, ByRef pHeaderDocType As %String) as %Boolean
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
This user callback method is called from %OnClose()
method OnValidate(pMsg As EnsLib.SOAP.GenericMessage, pValSpec As %String, Output pStatus As %Status) as %Boolean
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 Process(pAction As %String, ByRef request, needHeaders As %Boolean = 1)
Override to do stream split & rejoin, passthrough HTTP Response
method ProcessBody(pAction As %String, pRequestBody As %CharacterStream, pResponseBody As %CharacterStream) as %Boolean
Pass through to OnProcessInput()
method resolveAndIndex(pMsg As EnsLib.SOAP.GenericMessage) as %Status
Accept only specified document names; resolve DocType and perform requested validation if any
method resolveDocType(pMsg As EnsLib.SOAP.GenericMessage, Output pHeaderDocType As %String) as %String
Return the DocType that this service will assign to this message's body document

Inherited Members

Inherited Properties

Inherited Methods

Subclasses

FeedbackOpens in a new tab