Home > Class Reference > ENSLIB namespace > EnsLib.SOAP.Service
Private  Storage   

EnsLib.SOAP.Service


class EnsLib.SOAP.Service extends Ens.BusinessService, %SOAP.WebService

Abstract base class for WebService-based BusinessService classes. Can use a SOAP.InboundAdapter listener, or the standard SOAP Service mechanism, or both. In order for the CSP mechanism to work, Web Services derived from this class must be configured either with their configuration name the same as their class name, or the invoking URL must include ?CfgItem= giving the config item name, or using a CSP application with a DispatchClass configured and the config item name as the next URL piece after the application 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.)

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
7 1 7


Summary


This is a Business Service class.

The associated Adapter class is EnsLib.SOAP.InboundAdapter.

Properties
%AlertStartTime %ConfigName %ConfigQueueName
%LastActionTime %LastHandledTime %LastReportedError
%OutsideCreated %PreserveSession %ProcessInputCalled
%QuitTask %RequestHeader %SessionId
%SuperSession %SuperSessionCreatedBeforeSession %WaitForNextCallInterval
%WarnedLatest %isShadow Adapter
AddressingIn AddressingOut AlertGracePeriod
AlertGroups AlertOnError ArchiveIO
Attachments Base64LineBreaks BodyId
BodyXmlId BusinessPartner ContentId
ContentLocation FaultAddressing FaultHeaders
GenerateSuperSessionID HeadersIn HeadersOut
IOLogEntry ImportHandler InactivityTimeout
IsMTOM Location MTOMRequired
MsgClass OutputTypeAttribute Password
RMSession ReferencesInline RequestMessageStart
ResponseAttachments ResponseContentId ResponseContentLocation
SAXFlags SOAPInvoked SecurityContextToken
SecurityIn SecurityNamespace SecurityOut
SessionCookie SoapFault SoapVersion
ThrottleDelay Timeout Transport
Username WriteSOAPBodyMethod

Methods
%AddEnvelopeNamespace %AddToSaveSet %ClassIsLatestVersion %ClassName
%ConstructClone %DispatchClassMethod %DispatchGetModified %DispatchGetProperty
%DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty
%Extends %GetParameter %IsA %IsModified
%New %NormalizeObject %ObjectModified %OnClose
%OnCreateRMSession %OnNew %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %SuperSessionSet
%ValidateObject AdapterName AssignOneSetting CloseIOLogEntry
ConvertParameter Decrypt Encrypt EnumerateSettingsClose
EnumerateSettingsExecute EnumerateSettingsFetch EscapeHTML EscapeURL
FileWSDL ForceSessionId GenerateSuperSession GetBodyId
GetDeferredResponseToken GetProductionSettingValue GetProductionSettings GetPropertyConnections
GetSettings GetShadowInstance HyperEventCall HyperEventHead
Include Initialize InsertHiddenField InsertHiddenFields
IsPrivate Link MakeFault MakeFault12
MakeSecurityFault MakeStatusFault NewIOLogEntry NormalizeName
OnAdapterHTTPResponse OnAuthorize OnCancelSecureConversation OnError
OnGenerateSuperSession OnGetConnections OnInit OnKeepalive
OnMonitor OnPageError OnPostHTTP OnPostHyperEvent
OnPostWebMethod OnPreHyperEvent OnPreWebMethod OnProcessInput
OnProductionStart OnProductionStop OnRequestMessage OnSOAPRequest
OnStartSecureConversation OnTearDown Page PopulateSuperSession
Process ProcessBinary ProcessBody ProcessBodyNode
QueueName QuoteJS Reset ReturnFault
ReturnMethodStatusFault ReturnOneWay ReturnStatusFault RewriteURL
SaveIOLogEntry SendAlert SendDeferredResponse SendRequestAsync
SendRequestSync ShowError StartTimer StopTimer
ThrowError UnescapeHTML UnescapeURL WSAddSignatureConfirmation
statusReturn

Subclasses
EnsLib.EDI.X12.Service.SOAPService EnsLib.SOAP.GenericService EnsLib.ebXML.Service.SOAPService

Parameters


• parameter ADAPTER = "EnsLib.SOAP.InboundAdapter";
Name of the adapter class - override this to "" if you want to use only the regular SOAP mechanism and not the custom-port InboundAdapter.
• parameter LOCATION;
Default URL for invoking the WebService. The URL may be absolute or relative to the WSDL request URL. Override this parameter in your subclass. Example: "http://localhost/csp/MyEnsemble/MyProduction/MyWebService.cls";
• parameter NAMESPACE = "http://tempuri.org";
SOAP Namespace for the WebService Override this parameter in your subclass with the unique namespace URI of your organization.
• parameter SERVICENAME = "MyEnsembleRequestWebService";
The SOAP name of this service. Override this parameter in the subclass.
• parameter SETTINGS = "-AlertGracePeriod";
Can't do grace period without an OnTask loop
• parameter SOAPSESSION = 0;
Enables session capability on this Service. Also affects license consumption.
• parameter USEBOTH = 0;
Override this setting to allow your subclass to accept WebService requests on both the custom-port InboundAdapter and the regular SOAP mechanism. This parameter is ignored and the regular SOAP mechanism is enabled if the ADAPTER parameter is empty in your subclass.

Properties


• property SOAPInvoked as %Boolean [ InitialExpression = 0 ];

Methods


• method %OnNew(pConfigName As %String) as %Status
initialize Business Host object
• abstract 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 Override this method in your Service class to customize the HTTP response

Each argument may be overridden to change a particular aspect of the HTTP response pStatus is the status code that resulted from the SOAP call to the adapter pHTTPResponseStatus is the HTTP status that will be reported to the SOAP client pBodyLen is the response body size in bytes that will be reported to the SOAP client pResponseBodyStream is the stream or string whose contents will be returned as the SOAP response message body pMainResponseHeader if returned with content will be used verbatim as the HTTP header pHeaderExtra if returned will be used to override the standard no-cache header declarations or append to pMainResponseHeader

• method OnAuthorize(pAction, pRequest As %CSP.Request) as %Status
Override to add customized authorization behavior
• classmethod ReturnFault(fault As %SOAP.Fault)
Return the SOAP fault in %SOAP.Fault as the result of this web method call. The ReturnFault method should only be called from the implementation of the WebMethod. This method will not return to its caller. It will act as a Quit from the Web Method with the %SOAP.Fault as the return value.

You can generate a SOAP fault from a web method as in the following example:

	Set fault=##class(%SOAP.Fault).%New()
	Set fault.faultcode=$$$FAULTServer
	Set fault.faultstring="Processing Error"
	Set fault.detail="<e:myError xmlns:e=""some-URI"">app didn't work</e:myError>"
	Do ..ReturnFault(fault) ; will not return
• classmethod ReturnMethodStatusFault(pStatus As %Status)
Return a fault based on status code to the client
• classmethod ReturnStatusFault(pCode As %String, pStatus As %Status)
Return a fault based on status code to the client
• classmethod statusReturn(pCode As %String, pStatus As %Status)
Return a fault based on status code to the client - only for use outside %SOAP.Service.Process()/ProcessHTML()