ProfileMgr Class
Properties Methods Events Configuration Settings Errors
The ProfileMgr component is used to manage self and trading partner profiles used for AS2 communication.
Class Name
InEDI_ProfileMgr
Procedural Interface
inedi_profilemgr_open(); inedi_profilemgr_close($res); inedi_profilemgr_register_callback($res, $id, $function); inedi_profilemgr_get_last_error($res); inedi_profilemgr_get_last_error_code($res); inedi_profilemgr_set($res, $id, $index, $value); inedi_profilemgr_get($res, $id, $index); inedi_profilemgr_do_config($res, $configurationstring); inedi_profilemgr_do_deleteprofile($res, $partnerorganization); inedi_profilemgr_do_getproperty($res, $propname); inedi_profilemgr_do_gettpinfo($res, $partnerorganization); inedi_profilemgr_do_listpartners($res); inedi_profilemgr_do_listproperties($res); inedi_profilemgr_do_loadprofile($res, $partnerorganization); inedi_profilemgr_do_reset($res); inedi_profilemgr_do_saveprofile($res, $partnerorganization); inedi_profilemgr_do_setproperty($res, $propname, $propvalue);
Remarks
AS2 communication require management of several configuration settings such as encryption certificate, signing certificate and TLS/SSL certificates. Both for your self and your trading partners.
The ProfileMgr class allows you to manage such settings using simple XML files, furthermore these configuration files can be directly fed to the AS2Sender and AS2Receiver Class as a convenient way to set communication parameters.
To use the ProfileMgr you should first set DataDir to configure the directory that it will use to store the profiles. You can then set the properties to be retained and save them by invoking SaveProfile, alternatively you could retrieve previously saved settings using LoadProfile.
When a new trading partner profile is saved a sub-directory named after the trading partner is created within DataDir and the file partner.cfg is saved in it. If CreateDirStruct is set to true, the following sub-directories are created within the partner directory. These can be helpful in managing other data for the trading partner.
DirDeleted | Deleted files. |
DirIncoming | Received files. |
DirLogs | Log files. |
DirOutgoing | Files to be sent. |
DirPending | Files pending async MDN. |
DirPendingInfo | Files having data to verify async MSN. |
DirSent | Sent files. |
Property List
The following is the full list of the properties of the class with short descriptions. Click on the links for further details.
AsyncMDNURL | The URL for posting Async MDNs. |
CreateDirStruct | Option to create file management directories. |
DataDir | The directory that the ProfileMgr uses to store self and trading partner profiles. |
DirDeleted | The directory used to store deleted files. |
DirIncoming | The directory used to store incoming files. |
DirLogs | The directory used to store log files. |
DirOutgoing | The directory used to store outgoing files. |
DirPending | The directory used to store files waiting for Async MDN. |
DirPendingInfo | The directory used to store files containing data to verify Async MDN. |
DirSent | The directory used to store sent files. |
Your email address. | |
EncryptionCertEncoded | The certificate (PEM/base64 encoded). |
EncryptionCertStore | The name of the certificate store for the client certificate. |
EncryptionCertStorePassword | If the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store. |
EncryptionCertStoreType | The type of certificate store for this certificate. |
EncryptionCertSubject | The subject of the certificate used for client authentication. |
OptionCompress | Preference to compress outgoing data. |
OptionEncrypt | Preference to encrypt outgoing data. |
OptionSign | Preference to sign outgoing data. |
Organization | The name of your, or your trading partner's organization. |
PartnerCount | The number of partners found in DataDir . |
RequestMDN | Preference to receive MDNs from trading partner. |
RequestMDNSigned | Preference to request for signed MDNs. |
RequestMDNSynchronous | Preference to request for synchronous MDNs. |
RequireEncrypt | Preference to receive encrypted messages. |
RequireSign | Preference to receive signed messages. |
SigningCertEncoded | The certificate (PEM/base64 encoded). |
SigningCertStore | The name of the certificate store for the client certificate. |
SigningCertStorePassword | If the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store. |
SigningCertStoreType | The type of certificate store for this certificate. |
SigningCertSubject | The subject of the certificate used for client authentication. |
SSLCertEncoded | The certificate (PEM/base64 encoded). |
SSLCertStore | The name of the certificate store for the client certificate. |
SSLCertStorePassword | If the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store. |
SSLCertStoreType | The type of certificate store for this certificate. |
SSLCertSubject | The subject of the certificate used for client authentication. |
URL | The URL for posting EDI data. |
Method List
The following is the full list of the methods of the class with short descriptions. Click on the links for further details.
Config | Sets or retrieves a configuration setting . |
DeleteProfile | Deletes the configuration of the specified partner. |
GetProperty | Gets the property propName . |
GetTPInfo | Gets the profile of the specified partner as a XML TPInfo. |
ListPartners | Lists trading partners known to the ProfileMgr . |
ListProperties | Lists the properties read from self or partner profile. |
LoadProfile | Loads the profile of the trading partner identified by partnerOrganization . |
Reset | Resets the state of the control. |
SaveProfile | Saves the profile of the trading partner identified by partnerOrganization . |
SetProperty | Sets the property propName to propValue . |
Event List
The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.
Error | Information about errors during data delivery. |
Partner | Fired when ListPartners is invoked. |
PartnerDirectory | Fired before accessing partner.cfg of a trading partner. |
Property | Fired when ListProperties is invoked. |
Configuration Settings
The following is a list of configuration settings for the class with short descriptions. Click on the links for further details.
SelectWaitMillis | The length of time in milliseconds the component will wait when DoEvents is called if there are no events to process. |
CodePage | The system code page used for Unicode to Multibyte translations. |
UseInternalSecurityAPI | Tells the component whether or not to use the system security libraries or an internal implementation. |