Class %SOAP.WebBase

abstract class %SOAP.WebBase extends %RegisteredObject

Super class for SOAP Web Client and Web Server Base class and super class for Web Service classes.
This class is used internally by Caché. You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this class.

Class Parameters

• parameter ELEMENTQUALIFIED
ELEMENTQUALIFIED controls the format of the SOAP body. The ELEMENTQUALIFIED specification reflects the elementFormDefault attribute of the schema element for the TYPENAMESPACE in the WSDL defining the SOAP service. To maintain compatibility, ELEMENTQUALIFIED will default to 1 (true) for SoapBodyUse="literal" and will default to 0 (false) for SoapBodyUse="encoded". These were the values always previously assumed for the elementFormDefault attribute.
• parameter LOCATION
LOCATION - Should be the URL for invoking the web service for which this is a proxy. Override this parameter in the subclass. Parameter LOCATION = "http://localhost/csp/MyNameSpace/client.cls";
• parameter NAMESPACE [= http://tempuri.org]
NAMESPACE - Should be an unique URI Override this parameter in the subclass with the unique namespace URI of your organization. Override this parameter in the subclass.
• parameter OUTPUTTYPEATTRIBUTE [= 0]
OUTPUTTYPEATTRIBUTE allows the programmer to force the xsi:type attribute to be included in all elements of a SOAP message which is a web client request or web service response.
• parameter SERVICENAME
SERVICENAME - Should be the name of the service for which this is a proxy. Override this parameter in the subclass.
• parameter SOAPHEADERS
A list of supported SOAP headers is specified as a comma separated list of input header specifications. Each specification is of the form "headerName:headerClass" where headerName is the element name of the supported header and headerClass is the %SOAP.Header subclass that corresponds to that header. This list defines all headers supported in the SOAP request.
• parameter TYPENAMESPACE
TYPENAMESPACE specifies the XML namespace for the types used for the method arguments and return types in this web client or web service. If TYPENAMESPACE is not specified or is "", then the default namespace used for the types is from the NAMESPACE parameter. Override this parameter in the subclass.
• parameter XMLELEMENT
Specifies if part elements of messages in the WSDL use type or element attribute. XMLELEMENT defaults to 1 for "literal" WSDL and to 0 for "encoded" WSDL.
• parameter XMLIGNORENULL
XMLIGNORENULL allows the programmer to override the default XML handling of empty strings for properties of type %String. By default (XMLIGNORENULL = 0), empty strings in the XML input are stored as $c(0) and $c(0) is written to XML as an empty tag. A missing tag in the XML input is always stored as "" and "" is always output to XML as no tag. XMLIGNORENULL specified in the web client or service class specififes XMLIGNORENULL for the SOAP messages used for each web method.

Properties

• array property HeadersIn As %SOAP.Header  [Transient;]
Any SOAP header in the SOAP request that is found in the SOAPHEADERS list is imported as a %SOAP.Header subclass and added to the HeadersIn array. The web method may then act on these headers as appropriate.
• array property HeadersOut As %SOAP.Header  [Transient;]
Any web service or web client method may add instances of any %SOAP.Header subclass to this array. The index is the element name of the header. The corresponding headers are then added to the SOAP response message. This collection of headers is cleared after each method call.
• property Location As %String  [InitialExpression = ..#LOCATION; Transient;]
Location property. Initialized to LOCATION parameter.
• property OutputTypeAttribute As %Boolean  [InitialExpression = 0;]
• property SAXFlags As %Integer  [InitialExpression = $$$SAXFULLDEFAULT-$$$SAXVALIDATIONSCHEMA; Transient;]
SAXFlags property. The flags passed to the SAX parser.
• property SessionCookie As %String  [Transient;]
This property contains the session cookie to be included in the Cache proprietary SOAP session header to maintain the Cache SOAP session. SessionCookie will be set from the Cache SOAP session header received in the SOAP request.
• property SoapFault As %SOAP.Fault  [Transient;]
For a web service, this is the SOAP Fault to return. The SoapFault property may be set before calling Process to return a SOAP fault. For a web client, when the response message is a SOAP fault, then ZTRAP is throw and SoapFault is the corresponding %SOAP.Fault instance.
• property Timeout As %Integer  [Transient;]
Timeout property. Controls timeout waiting for response.
• property Transport As %RegisteredObject  [Transient;]
The Transport property may be set to an instance of a transport class which will provide a DoSoapRequest method that will take a request and obtain the response using its transport.
• property WriteSOAPBodyMethod As %String  [Transient;]
Specify the name of the method to call to write the SOAP body by putting the method name into the WriteSOAPBodyMethod property of the web client class. For example Method test(..... [WebMethod] { Set ..WriteSOAPBodyMethod="override" Do ..WebMethod("test").Invoke(..... Set ..WriteSOAPBodyMethod="" } The signature of the override method is Method override(proxy As %SOAP.ProxyDescriptor, tag As %String)

Methods

• classmethod BeginSOAPEnvelope(bindingStyle As %String, bodyUse As %String, namespace As %String, typeNamespace As %String, forcePrefix As %Boolean, ByRef namespaces As %XML.Namespaces) returns nothing.
• classmethod EndSOAPEnvelope() returns nothing.
• final classmethod GetElementQualified(bodyUse As %String) returns %Boolean
• final classmethod Namespace() returns nothing.
Get namespace parameter in order to avoid otherwise unnecessary generator methods.
• classmethod NormalizeName(pName, pMaxLen) returns %String
Normalize name to comply with Cache constraints
• classmethod OnCompile() returns nothing.
• method ProcessSOAPEnvelope(handler, oneWay As %Boolean, ByRef message As %Integer, ByRef versionMismatch As %Boolean) returns %Status
Process the SOAP envelope. If all is OK, status of $$$OK is returned and message is set to the index of message node.
• classmethod WebMethod(Operation As %String) returns %SOAP.Descriptor
Create an instance of the %SOAP.Descriptor subclass.
• method WriteSOAPHeaders(bodyUse As %String) returns %Status
• method WriteSOAPMessage(body As %SOAP.Descriptor, tag As %String, isService As %Boolean) returns %Status
Execute the Web Method represented by the descriptor class on the server. If an error is detected, a ztrap "SOAP" will be issued with %objlasterror containing the error %Status. If is the responsibilty of the caller of the proxy method to set an error trap and test for $ZE["<ZSOAP>". Note that if a SOAP fault is received, then the error is $$$SOAPFaultReceived. Write the SOAP message that corresponds to the specified class.