CXF Web Service "createAttachment" method show a new attribute "fileData".
search cancel

CXF Web Service "createAttachment" method show a new attribute "fileData".

book

Article ID: 367715

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager

Issue/Introduction

A new attribute <fileData> is displayed when you create a "createAttachment" or "createAttmnt" request. What is it for?

Environment

17.3 RU18 and later, 17.4.x

Resolution

The attribute "fileData" is required to send an attachment because CXF Web Services uses MTOM standard to transfer binary data whereas AXIS Web Services used DIME standard. In MTOM way, it is essential to send the binary data as a handler. 

Ref.
Apache CXF
Converting attachment format form MTOM to DIME

From SOAP UI tool, whenever we open a createAttachment request, the fileData is automatically generated with cid:XXXXX. This XXXXX needs to be specified as Part in the Attachment area of SOAP UI.
An example of this is shown below:

If you are using the Java based SOAP client, you can refer to the $NX_ROOT\samples\sdk\cxfwebsvc\java\test3_attachments where DataHandler is created for the attachment.

Additional Information