The Designer can handle blob parameters in the body of a REST interface. This can be configured on a REST operation by four attributes provided by stereotype REST Operation.
This is only available for manually created REST interfaces. You cannot change REST operations that have been imported to a connector.
Find below an overview on these attributes and what combinations make sense.
Direction
Attribute
Description
Request
Blob Body Content Type
Specify which content types the endpoint requires.
Reject Other Response Content Type
Specifies if the REST adapter should reject calls to this endpoint using a content type that does not match the content types listed in Blob Body Content Type. If set to true, the adapter does not contact the endpoint at all but rejects calls with an exception (Request content type not declared as accepted by the service).
Response
Accepted Request Content Type
Specify a list of content types the endpoint returns.
Reject Other Request Content Types
Specifies if the REST adapter should reject calls to this endpoint using a content type that does not match the content types listed in Accepted Request Content Type. If set to true, the adapter does not contact the endpoint at all but rejects calls with an exception (Set "accept" header does not accept any of declared response content types).
Examples
GET Examples
Nr
Location
Tag
Remark
1
Service
acceptsapplication/msexcel
request performed
REST service may return error
Adapter
Accepted Request Content Type
-
Reject Other Request Content Types
-
Header
accept:
msword
2
Service
acceptsapplication/msexcel
request rejected by REST adapter
Exception: Set "accept" header does not accept any of declared response content types
Adapter
Accepted Request Content Type
msexcel
Reject Other Request Content Types
true
Header
accept:
msword
POST Examples
Nr
Location
Tag
Remark
1
Service
acceptsapplication/msexcel
request performed
REST service may return error
Adapter
Blob Body Content Type
-
Reject Other Response Content Type
-
Header
content-type:
msword
2
Service
acceptsapplication/msexcel
request rejected by REST adapter
Exception: RESTLM/48: Request content type not declared as accepted by the service