Skip to end of metadata
Go to start of metadata

The RESTEasy component in SwitchYard provides REST-based binding support for services and references in SwitchYard. 

Binding Services with RESTEasy

Composite-level services can be exposed as a REST-based service using the <binding.rest> binding definition.  The following configuration options are available for binding.rest when binding services:

  • interfaces : A comma seperated list of interfaces or abstract/empty classes with JAX-RS annotations.
  • contextPath : Additional context path for the REST endpoint. Default is none.

Here's an example of what a REST service binding looks like:

Binding References with RESTEasy

Binding a reference with REST can be used to make REST-based services available to SwitchYard services. The following configuration options are available for binding.rest when binding references:

  • interfaces : A comma seperated list of interfaces or abstract/empty classes with JAX-RS annotations.
  • address : A URL that points to the root path of resources. This is only applicable for Reference bindings. It is optional and if not specified will default to http://127.0.0.1:8080/.
  • timeout : The request's time-out value in milliseconds.
  • contextPath : Additional context path for the REST endpoint. Default is none.
  • proxy : HTTP Proxy settings for the endpoint.
  • basic/ntlm : authentication configuration for the endpoint.

Here's an example of what a REST reference binding looks like:

In this example above the resource URLs will start from http://localhost:8080/rest-binding.

Proxy Configuration

If the REST reference needs to pass through a proxy server then the proxy server configuration can be provided using the proxy element. The following configuration options are available:

  • host : The proxy host.
  • port : The proxy port (optional).
  • user : The proxy user (optional).
  • password : The proxy password (optional).
Authentication Configuration

If the REST reference endpoint is secured using BASIC/NTLM, then the authentication configuration can be provided using the basic or ntlm elements. The following configuration options are available:

  • user : The authentication user.
  • password : The authentication password.
  • realm/domain : The authentication realm or the Windows domain.

A sample NTLM authentication configuration:

SSL Configuration

If the REST reference endpoint is secured using SSL, the following optional configuration options are available:

  • verifier : Allowed options are ANY,STRICT or BROWSER. Please read Apache HTP component documentation for more info.
  • keystore : The SSL keystore.
  • keystorePass : The password for SSL keystore.
  • truststore : The SSL truststore.
  • truststorePass : The password for SSL truststore.

A sample configuration:

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.