Class: Soap

Soap()

SOAP management (sending, receiving, parsing) class for ONVIF modules.

Constructor

new Soap()

Source:

Methods

createRequest(params)

Internal method used by the module classes.
Parameters:
Name Type Description
params object Object containing required parameters to create a SOAP request.
Properties
Name Type Attributes Description
body string Description in the <s:Body> of the generated xml.
xmlns array A list of xmlns attributes used in the body e.g., xmlns:tds="http://www.onvif.org/ver10/device/wsdl".
diff number Time difference [ms].
username string The user name.
password string The user Password.
subscriptionId string <optional>
To string (ex: used in Events#pullMessages).
Properties
Name Type Attributes Description
Address string <optional>
Action string (ex: used in Events#pullMessages).
_ string <optional>
MessageID string (ex: used in Events#pullMessages).
$ string <optional>
MessageID string (ex: used in Events#pullMessages).
Source:

createUserToken(diff, user, passopt)

Internal method used to create the user token xml.
Parameters:
Name Type Attributes Description
diff integer The server timeDiff [ms].
user string The user name.
pass string <optional>
The user password.
Source:

getFault(results)

Parses results to see if there is a fault.
Parameters:
Name Type Description
results object The results of a communication with a server.
Source:

makeRequest(service, serviceAddress, methodName, soapEnvelope, paramsopt)

Internal method to send a SOAP request to the specified serviceAddress.
Parameters:
Name Type Attributes Description
service object The service name.
serviceAddress object The service address.
methodName string The request name.
soapEnvelope xml The request SOAP envelope.
params object <optional>
Used internally.
Source:

parse(soap)

Internal method for parsing SOAP responses.
Parameters:
Name Type Description
soap string The XML to parse.
Source:

runRequest(service, serviceAddress, methodName, soapEnvelope)

Internal method to send a SOAP request.
Parameters:
Name Type Description
service object The service.
serviceAddress object The service address.
methodName string The request name.
soapEnvelope xml The request SOAP envelope.
Source: