SOAP server object


Usage:

OBJECT x = CREATE "dynamic", "soap"

If an application wishes to use the SOAP server object then it should load it once and keep it loaded. Loading it each time it is used is very inefficient.

The writeToString method as implemented in KCML 6.20 has a memory leak. See the notes on the method on how to avoid it.


SOAP
Interface

SOAP

SOAP server object

Allows a KCML program to act as a SOAP server. Allows the marked DEFSUBs to be called RPC style via a SOAP client.
MethodReturnsPurpose
CreateDefinition(lpcszFilename$)intCreate WSDL file based on program.
GetHTTPHeader$(sName$)stringGet HTTP Header
GetInterface(sName$)InterfaceReturns the interface that exactly matches the given name
GetLastError()intReturn the last error.
GetLastErrorString$()stringReturn the last error string.
GetMethodRequest$()stringGet the current SOAP request when inside a method hook routine.
GetMethodResponse$()stringGet the response from a SOAP method when inside a post-method hook routine.
GetRequestHeader$()stringGet the current SOAP request header.
GetUsername$()stringReturn the current user from HTTP header.
Listen(iPort)intStart a local SOAP server for debugging purposes.
OpenDefinition(lpcszFilename$, bCreate)intUse given WSDL file.
ProcessRequests()intEnter loop processing incoming SOAP requests.
ProcessRequestsDebug(iPort)intStart a local SOAP server for debugging purposes.
SetHTTPHeader(sName$, sValue$)voidSet HTTP Header
SetMethodCallBack(MethodHookFn, pSym)voidSet a callback DEFSUB to be executed before a SOAP method.
SetResponseHeader(sHeader$)voidSet the SOAP response header.
PropertyTypeReturnsPurpose
TimeoutRWintSet/get timeout on requests and connections. This is given in milliseconds.

Interface

SOAP interface object

Each DEFSUB can be a member of several interfaces. Each interface can have a different namespace and endpoint.
PropertyTypeReturnsPurpose
Endpoint$RWstringSet/Get endpoint for interface.
Name$RstringGet name for interface.
Namespace$RWstringSet/Get namespace for interface.