HTTP 500 (Bad Request) when sending an MTOM request to a published service on the Gateway
search cancel

HTTP 500 (Bad Request) when sending an MTOM request to a published service on the Gateway

book

Article ID: 42818

calendar_today

Updated On:

Products

STARTER PACK-7 CA Rapid App Security CA API Gateway

Issue/Introduction

The following information may be recorded in the audit records:

Message was not processed: Bad Request (400)
INFO 3023 Service does not accept multipart data
INFO 3017 Policy evaluation for service resulted in status 400 (Bad Request)

The following information may be recorded in the Gateway logs:

com.l7tech.server.message: Message was not processed: Bad Request (400)
com.l7tech.server.MessageProcessor: 3023: Service does not accept multipart data
com.l7tech.server.MessageProcessor: 3017: Policy evaluation for service EchoServiceService [5144579] resulted in status 400 (Bad Request)

 

Environment

Release:
Component: APIGTW

Cause

MTOM is a technology that allows the Gateway to send binary data to protected web services and servers in XML-formatted messages. This is extremely useful for sending binary attachments to web services that require non-XML binary data (such as text files, PDF documents, or images). A published service on the Gateway must be configured to accept MTOM messages or certain errors may appear. This article will prescribe the necessary steps and changes required in a service policy to allow a published service to accept MTOM messages.

Resolution

Resolving this issue involves making changes to the service policy associated with the published service on the Gateway. Log in to the Policy Manager as a user authorized to update the impacted service policy and add one of the following assertions:

  • Validate MTOM Message
  • Decode MTOM Message

 

The presence of either of these assertions will allow a published service to accept MTOM messages. Please see the Layer 7 Tech docs, for the applicable version of the Gateway for more information on using these assertions in a service policy.