Attaching Files to Service Operations

This section provides an overview of attaching files to service operations and discusses how to:

  • Use the FTP Attachment utility.

  • Send attachment information with service operations.

  • Process attachment information that is included in service operations.

PeopleSoft Integration Broker provides an FTP Attachment Upload utility that enables you to upload attachments from any directory to your FTP server and then provide the location of the attachments in service operation PeopleCode. The attachments can be in any file format, such as text files, EDI files, word processing files, and so on.

As the operation is consumed, you can access these attachments using the attachment API. The recipient can get the necessary information about the attachment and can retrieve it using a URL or file location that you provide.

Note: The FTP Attachment Upload utility does not support uploading attachments from the database. To upload attachments from the database, manually retrieve and copy them to the FTP server.

Use the FTP Attachment Upload page in the Files Utilities component (IB_FILEUPLOAD) to upload files to your FTP server for attaching to service operations.

To access the FTP Attachment Upload page, select PeopleTools > Integration Broker > File Utilities > File Upload.

Image: FTP Attachment Upload page

This example illustrates the fields and controls on the FTP Attachment Upload page. You can find definitions for the fields and controls later on this page.

FTP Attachment Upload page

You work with the following page elements:

Field or Control



Indicates the user ID of the FTP server.


Indicates the password to the FTP server.

FTP Host

Indicates the machine name of the FTP server.

Remote Directory

Indicates the directory path to the file to upload.

File Name Prepend

Enter text to prepend the file name to build the final file name to copy to the target directory.

Add Attachment

Click to upload the indicated file.

The following example shows sample PeopleCode for sending attachment information:

Local Message &MSG;
Local Rowset &Flight_Profile;
Local String &Attachment_id;


&FLIGHT_PROFILE = GetLevel0();

&MSG = CreateMessage (Operation.ASYNC_RR);

&Attachment_id = &MSG.IBInfo.AddAttachment (c:\\temp\\myfile.txt);

&attachReturn = &MSG.IBInfo.SetAttachmentProperty(&Attachment_id, 
     %Attachment_Encoding, "UTF-8");

&attachReturn = &MSG.IBInfo.SetAttachmentProperty(&Attachment_id, 
     %Attachment_Base, "Standard");

&attachReturn = &MSG.IBInfo.SetAttachmentProperty(&Attachment_id, 
     %Attachment_Disposition, "Pending");

&attachReturn = &MSG.IBInfo.SetAttachmentProperty(&Attachment_id, 
     %Attachment_Language, "English");

&attachReturn = &MSG.IBInfo.SetAttachmentProperty(&Attachment_id, 
     %Attachment_Description, "Parts data");



The following example shows sample PeopleCode for processing an attachment from a notification:

import PS_PT:Integration:INotificationHandler;

class FLIGHTPROFILE implements PS_PT:Integration:INotificationHandler;
     method FLIGHTPROFILE();
     method OnNotify(&MSG As Message);


/* Constructor */
     %Super = create PS_PT:Integration:INotificationHandler();
end method;

method OnNotify
     /+ $MSG as Message +/
     /+ Extends/implements PS_PT:Integration:INotificationHandler.OnNotify +/

     Local Rowset &rs;
     Local integer &count;
     Local string &Attachment_ID &Results;

     &rs = &MSG.GetRowset();

     &count = &MSG.IBInfo.NumberOfAttachments;
     If &count > 0 Then

          &Attachment_ID = &MSG.IBInfo.GetAttachmentContentID(1);
          &Results = &MSG.IBInfo.GetAttachmentProperty(&Attachment_ID, 
          &Results = &MSG.IBInfo.GetAttachmentProperty(&Attachment_ID,
          &Results = &MSG.IBInfo.GetAttachmentProperty(&Attachment_ID, 
          &Results = &MSG.IBInfo.GetAttachmentProperty(&Attachment_ID, 
          &Results = &MSG.IBInfo.GetAttachmentProperty(&Attachment_ID, 
          &Results = &MSG.IBInfo.GetAttachmentProperty(&Attachment_ID, 
          &Results = &MSG.IBInfo.GetAttachmentProperty(&Attachment_ID,

     /* Process data from message */