Error while receiving response from SOAP call w.r.t AttachmentPart objects

Error while receiving response from SOAP call w.r.t AttachmentPart objects

book

Article ID: KB0077679

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks BW 6.x

Description

Error: <CausedBy> java.lang.IllegalStateException: The attachments stream can only be accessed once; either by using the IncomingAttachmentStreams class or by getting a collection of AttachmentPart objects. They cannot both be called within the life time of the same service request.

 

Issue/Introduction

Error while receiving response from SOAP call w.r.t AttachmentPart objects

Resolution

This usually happens when the "Attachment Style" in the "Binding" in the "References" is "SwA". For BW 6.4.2 (with HF or higher) change the attachment style from "SwA" to "MTOM".