Hi Folks,
I have created proxy program which sends an attachment to the XI system Along with the payload. The sequence is as below
1. Attachment
2. MainDocument(Payload)
Seems like the XI folks expect the data to receive in the receive order i.e.
1. MainDocument
2. Attachment.
The below is the code I wrote
TRY.
attachment_protocol ?= prxy->get_protocol( if_wsprotocol=>attachments ).
attachment = attachment_protocol->get_attachment_from_text( data = attach_string type = if_ai_attachment=>c_mimetype_text_plain name = lv_name ).
* attachment(sequence) = '2'.
APPEND attachment TO attachments.attachment_protocol->set_attachments( attachments ).
it-transactional_data_ecc = ls_transactional_data_ecc.
CALL METHOD prxy->transactional_data_ecc_out
EXPORTING
output = it.
COMMIT WORK.
CATCH cx_ai_system_fault .
DATA fault TYPE REF TO cx_ai_system_fault .
CREATE OBJECT fault.
WRITE :/ fault->errortext.
ENDTRY.
Appreciate a quick response.