NAME
SAP::BC - Interface to SAP's Business Connector
SYNOPSIS
use SAP::BC;
my $bc = SAP::BC->new( server => 'http://karma:5555',
user => 'dj',
password => 'secret' );
my $service_ref = $bc->services(); # list (SAP) services available
DESCRIPTION
SAP::BC is an OO interface that exposes functions within SAP's Business Connector (BC) as methods. It was primarily written as a class for discovering services and their respective RFC components for another module project SAP::BC::Proxy::SOAP which is a SOAP (to RFCXML) proxy for calls to SAP via the BC.
METHODS
new() (constructor)
Use this to create a BC instance. You can pass either a single argument, which is the URL of the BC you want to manipulate, or a list of values, like this:
my $bc = SAP::BC->new('http://karma:5555'); not allowed after BC 4.x
or
my $bc = SAP::BC->new( 'server' => 'http://karma',
'user' => 'username',
'password' => 'secret' ); <= manditory after BC 4.x
where the user and password parameters are the ones for the SAP BC itself.
authentication()
Use this method to get or set the user and password values for authentication with the BC.
SAP_systems()
Use this method to get a list of SAP systems known to the BC. The data will be cached after the first call.
services()
To discover a list of services associated with the SAP systems known to the BC, use this method. You can pass a list of SAP systems for which you want to discover the services, or
if you don't pass anything, services for all the SAP systems known to the BC will be returned. If the SAP systems haven't previously been discovered using the SAP_systems method, this will happen automatically.
A reference to a hash will be returned, with the keys being the service names, and the argument being a hashref with the details, like this:
{
'SOAP:getStateName' =>
{
'sapsys' => 'LNX',
'rfcname' => 'Z_SOAP_GET_STATE_NAME',
},
'SOAP:getStateStruct' =>
{
'sapsys' => 'LNX',
'rfcname' => 'Z_SOAP_GET_STATE_STRUCT',
},
...
}
disconnect()
Disconnects from the BC and frees the session.
_clear_caches()
This is an internal method that removes the cached information (such as that determined by SAP_systems and services - so that the information can be refreshed by another call, if e.g. services have been added to the BC.
properties()
An experimental method that returns a hashref of properties pertaining to the BC instance connected to.
It relies on parsing some HTML, which is flakey at best.
_prime_ua()
An internal method to prime a UserAgent.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 34:
You can't have =items (as at line 66) unless the first thing after the =over is an =item