SetTPInfo Method
A convenient way to set AS2 communication parameters using XML strings.
Syntax
ANSI (Cross Platform) int SetTPInfo(const char* lpszProfile); Unicode (Windows) INT SetTPInfo(LPCWSTR lpszProfile);
- (void)setTPInfo:(NSString*)profile;
#define MID_AS2SENDER_SETTPINFO 12 IPWORKSEDI_EXTERNAL int IPWORKSEDI_CALL IPWorksEDI_AS2Sender_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);
Remarks
SetTPInfo offers a convenient way to set AS2 communication parameters using XML strings. The format of the XML is the same as provided by the method GetTPInfo of AS2ProfileMgr.
The "self" information should always precede the partner information as shown below.
AS2Sender as2sender = new AS2Sender(); AS2Profilemgr mgr = new AS2Profilemgr(); mgr.DataDir = @"C:\as2data"; as2sender.SetTPInfo(mgr.GetTPInfo("self")); as2sender.SetTPInfo(mgr.GetTPInfo("partnerOrg")); as2sender.EDIFile = @"C:\as2Data.x12"; as2sender.Post();
Error Handling (C++)
This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)