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 CA Service Desk Manager

Issue/Introduction

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

Environment

CA Service Desk Manager 17.3 RU18 and later and 17.4.x

Cause

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.  

With MTOM, it is essential to send the binary data as a handler.  CXF does not support the use of DIME, which is itself a deprecated element.

Resolution

From the 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" under the Attachment area of SOAP UI.

An example of this is shown below:

From the 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" under the Attachment area of SOAP UI.

An example of this is shown below:

A full demo of the createAttachment demo in CXF Web Services via SOAPUI is available.

Additional Information

Reference documentation:

Apache CXF

Converting attachment format form MTOM to DIME

SOAP Web Services Demo using SOAPUI