NAME
Kernel::GenericInterface::Transport – GenericInterface network transport interface
PUBLIC INTERFACE
has DebuggerObject
Attribute that holds the debugger object.
has TransportConfig
Attribute that holds the configuration.
has BackendObject
Attribute that holds the backend object.
new()
create an object.
use Kernel::GenericInterface::Debugger;
use Kernel::GenericInterface::Transport;
my $DebuggerObject = Kernel::GenericInterface::Debugger->new(
DebuggerConfig => {
DebugThreshold => 'debug',
TestMode => 0, # optional, in testing mode the data will not be written to the DB
# ...
},
WebserviceID => 12,
CommunicationType => Requester, # Requester or Provider
RemoteIP => 192.168.1.1, # optional
);
my $TransportObject = Kernel::GenericInterface::Transport->new(
DebuggerObject => $DebuggerObject,
TransportConfig => {
Type => 'HTTP::SOAP',
Config => {
...
},
},
);
ProviderProcessRequest()
process an incoming web service request. This function has to read the request data from the web server process.
my $Result = $TransportObject->ProviderProcessRequest();
$Result = {
Success => 1, # 0 or 1
ErrorMessage => '', # in case of error
Operation => 'DesiredOperation', # name of the operation to perform
Data => { # data payload of request
...
},
};
ProviderGenerateResponse()
generate response for an incoming web service request.
my $Result = $TransportObject->ProviderGenerateResponse(
Success => 1, # 1 or 0
ErrorMessage => '', # in case of an error, optional
Data => { # data payload for response, optional
...
},
);
$Result = {
Success => 1, # 0 or 1
ErrorMessage => '', # in case of error
};
RequesterPerformRequest()
generate an outgoing web service request, receive the response and return its data..
my $Result = $TransportObject->RequesterPerformRequest(
Operation => 'remote_op', # name of remote operation to perform
Data => { # data payload for request
...
},
);
$Result = {
Success => 1, # 0 or 1
ErrorMessage => '', # in case of error
Data => {
...
},
};