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_AS2RECEIVER_SETTPINFO 13

IPWORKSEDI_EXTERNAL int IPWORKSEDI_CALL IPWorksEDI_AS2Receiver_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.

An example usage scenario is shown below.

  AS2Receiver as2receiver = new AS2Receiver();
  
  AS2Profilemgr mgr = new AS2Profilemgr();
  mgr.DataDir = "C:\as2data";
  
  as2receiver.setTPInfo(mgr.getTPInfo("self"));
  as2receiver.readRequest();
  
  as2sender.setTPInfo(mgr.getTPInfo(as2receiver.getAS2From()));
  
  as2receiver.processRequest();
  as2receiver.sendResponse();

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.)

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks EDI 2020 C++ Edition - Version 20.0 [Build 8203]