Process Attachments for REST API (Multipart message preamble too large)
search cancel

Process Attachments for REST API (Multipart message preamble too large)

book

Article ID: 227705

calendar_today

Updated On: 04-21-2025

Products

CA API Gateway

Issue/Introduction

Validate MTOM assertion is returning below error message:

 <soapenv:Fault>
         <faultcode>soapenv:Server</faultcode>
         <faultstring>Error in assertion processing</faultstring>
         <faultactor>ssg</faultactor>
         <detail>
            <l7:policyResult status="Multipart message preamble too large" xmlns:l7="http://www.layer7tech.com/ws/policy/fault"/>
         </detail>
      </soapenv:Fault>

 

Not able to figure out what is causing this failure. Followed steps from this article

https://knowledge.broadcom.com/external/article?articleId=42880

Also here is the RAW request format

POST https://<GATEWAY_HOST>/urr/full-transfer HTTP/1.1
Accept-Encoding: gzip,deflate
MIME-Version: 1.0
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImRlZmF1bHRfc3NsX2tleSJ9.ew0KICAiaXNzIjogImh0dHBzOi8vaXAtMTAtMjM0LTExMi0xNDEuZWMyLmludGVybmFsOjg0NDMiLA0K........UhUTuKbJAFwCcq3KVPguKnuB4eChUfb7c2N6zaQ
messageid: b1e4a37c-325e-4223-af6f-c067f2cad489
partnerid: 03.FFE.PLM.001.001
Content-Type: multipart/form-data
Content-Length: 129129
Host: <GATEWAY_HOST>
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)


------=_Part_12_11645638.1635204636621
Content-Type: multipart/form-data
Content-Transfer-Encoding: 8bit

 

Environment

API Gateway

Resolution

  • The preamble portion of your message exceeds the gateway defined limit of 32768 bytes.
  • To increase the maximum length of the preamble portion of the message:
    • Add the following entry to: /opt/SecureSpan/Gateway/node/default/etc/conf/system.properties
    • com.l7tech.common.mime.preambleMaxSize=xxxxxx
    • where xxxxxx is the max preamble size to allow.  The default is 32768, perhaps set that to a higher value and see if that moves you forward.
  • Restart the gateway service for that change to take effect.