You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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.

DirectionAttributeDescription
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

NrLocationTagRemark
1Serviceaccepts application/msexcel
  • request performed
  • REST service may return error
Adapter

Accepted Request Content Type

-

Reject Other Request Content Types

-

Header

accept:

msword

2Serviceaccepts application/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

NrLocationTagRemark
1Serviceaccepts application/msexcel
  • request performed
  • REST service may return error
Adapter

Blob Body Content Type

-

Reject Other Response Content Type

-
Header

content-type:

msword
2Serviceaccepts application/msexcel
  • request rejected by REST adapter
  • Exception: RESTLM/48: Request content type not declared as accepted by the service
Adapter

Blob Body Content Type

application/msexcel

Reject Other Response Content Type

true
Header

content-type:

msword

  • No labels