REST Binding Component User's Guide

REST Binding Component Normalized Message Properties

The following properties are specific to the REST Binding Component. Available properties are different for request messages than for response messages. All property values are of the type java.lang.String.

Table 11 REST Binding Component NM Properties (Request)

Property Name in Source 

Property Name in Mapper 

Description 

org.glassfish.openesb.rest.url 

HTTP Request URL 

The HTTP URL of the external resource to be invoked. 

org.glassfish.openesb.rest.method 

HTTP Request Method 

The HTTP method to use when invoking the resource defined above. Available methods are GET, POST, PUT, HEAD, and DELETE. 

org.glassfish.openesb.rest.content-type 

HTTP Request Content-Type 

The content type header for the requesting entity, if any. 

org.glassfish.openesb.rest.accept-types 

HTTP Request Accept-Types 

The acceptable media types for the request, specified in JSON format. Enter the types in square brackets with each type contained in double-quotes. Separate multiple values by a comma. For example:  

[ "application/json", "text/plain" ]

org.glassfish.openesb.rest.accept-languages 

HTTP Request Accept Languages 

The preferred natural languages, specified in JSON format. 

org.glassfish.openesb.rest.headers 

HTTP Request Headers 

Custom HTTP headers for the request. Enter the headers in curly brackets as name value pairs with the name and value each in double-quotes and separated by a space, a colon, and another space. Separate multiple name value pairs by a comma. For example: 

{ "host" : "MyServer.com", "Content-Subtype" : "application/json/customers"}

org.glassfish.openesb.rest.headers.* 

Not applicable 

Arbitrary custom HTTP headers for the request. For example, to add the content type as a custom header parameter, you would enter a property similar to org.glassfish.openesb.rest.headers.content-type.

These properties can only be defined using the BPEL Designer's Source view. 

org.glassfish.openesb.rest.params 

HTTP Request Parameters 

Custom parameters for the request. Enter the parameters in curly brackets as name value pairs with the name and value each in double-quotes and separated by a space, a colon, and another space. Separate multiple name value pairs by a comma. For example: 

{ "status" : "Active", "billing" : "Current"}

org.glassfish.openesb.rest.params* 

Not applicable 

Arbitrary custom properties for the request. For example, if you are querying for telephone fields, you might have a set of properties like the following: 

  • org.glassfish.openesb.rest.params.areaCode

  • org.glassfish.openesb.rest.params.number

  • org.glassfish.openesb.rest.params.extension

These properties can only be defined using the BPEL Designer's Source view. 

org.glassfish.openesb.rest.param-style 

HTTP Request Parameter Style 

A style for the URI parameters. The following values are supported: 

  • Query – Name and value pairs that specify attributes of the full URI (external resource). Query parameters are delimited by an ampersand (&) and are separated from the rest of the URI by a question mark (?).

  • Matrix – Name and value pairs that specify attributes of one segment in a URI. Matrix parameters can occur after the segment in the URI that they modify. Matrix parameters are delimited by a semicolon (;) and are also separated from the segment they modify by a semicolon.

org.glassfish.openesb.rest.path-params 

HTTP Request Path Parameters 

Custom HTTP parameters for the URI. Enter the parameters in curly brackets as name value pairs with the name and value each in double-quotes and separated by a space, a colon, and another space. Separate multiple name value pairs by a comma. For example: 

{ "status" : "Active", "billing" : "Current"}

org.glassfish.openesb.rest.path-params.* 

Not applicable 

Arbitrary custom HTTP parameters for the URI. For example, the following properties define custom user login properties: 

  • org.glassfish.openesb.rest.path-params.userName

  • org.glassfish.openesb.rest.path-params.password

These properties can only be defined using the BPEL Designer's Source view. 

org.glassfish.openesb.rest.basic-auth-username 

Not applicable 

The login ID of the user for authentication. If the property is populated, a basic authentication header is added to the HTTP request. 

org.glassfish.openesb.rest.basic-auth-password 

Not applicable 

The login password corresponding with the above user name. This property can only be access from the BPEL Designer's Source view. 

Table 12 REST Binding Component NM Properties (Response)

Property Name in Source 

Property Name in Mapper 

Description 

org.glassfish.openesb.rest.response.status 

HTTP Response Status  

The status code for the response. 

org.glassfish.openesb.rest.response.url 

HTTP Response Location 

The location header for the response. 

org.glassfish.openesb.rest.response.content-type 

HTTP Response Content-Type 

The content type header for the response. 

org.glassfish.openesb.rest.response.headers 

HTTP Response Headers 

Other headers for the response. Enter the headers in curly brackets as name value pairs with the name and value each in double-quotes and separated by a space, a colon, and another space. Separate multiple name value pairs by a comma. For example: 

{ "host" : "MyServer.com", "Content-Subtype" : "application/json/customers"}

org.glassfish.openesb.rest.response.headers.* 

Not Applicable 

Arbitrary custom HTTP headers for the response. For example, to add the content type as a custom header parameter, you would enter a property similar to org.glassfish.openesb.rest.headers.content-type.

These properties can only be defined using the BPEL Designer's Source view.