JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Java CAPS REST Binding Component User's Guide     Java CAPS Documentation
search filter icon
search icon

Document Information

Using the REST Binding Component

About the REST Binding Component

REST Binding Component Features

Supported HTTP Methods

REST BC Sample Projects

Working With the REST BC WSDL Document

Creating the REST BC WSDL Document

To Create a WSDL Document for REST Inbound

To Create a WSDL Document for REST Outbound

New WSDL Wizard Properties for REST

Configuring REST BC WSDL Attributes

To Configure REST BC WSDL Attributes

Service Level REST WSDL Element

Binding Level REST WSDL Elements

REST Binding Element

REST Operation Element

Configuring the REST Binding Component Runtime Properties

To Configure REST BC Runtime Properties

REST Binding Component Runtime Property Descriptions

Creating Application Configurations for Connectivity Parameters (URLs)

To Create Application Configurations

To Add the Application Configuration to the Endpoint

To Change Application Configuration Values

Using Application Variables

To Create an Application Variable

To Use an Application Variable for Password Protection

Using REST BC Normalized Message Properties in a Business Process

Using Predefined Normalized Message Properties

To Use Predefined Normalized Message Properties in Mapper View

To Use Predefined Normalized Message Properties in Source View

Normalized Message Properties for REST

General Normalized Message Properties

REST Binding Component Normalized Message Properties

Implementing Jersey Client Filters

To Define the Jersey Filter

To Add the Filter to the Composite Application

Using Application Variables

Application variables allow you to define a list of variable names and values along with their type. The application variable name can then be used as a token for a WSDL extensibility element attribute for the REST BC. For example, you could define a string variable named ServerName with a value of MyHost.com. To reference this in the WSDL document, you would enter ${ServerName}. When you deploy an application that uses application variables, any variable that is referenced in the application's WSDL document is loaded automatically.


Note - If you start an application and a value is not defined for an application variable, an exception is thrown.


You can define the following four variable types:

Variables allow greater flexibility in WSDL documents. For example, you can use the same WSDL document for multiple runtime environments by using application variables to specify system-specific information. The variable values can be changed from the binding component runtime properties for each specific environment.

To change a property when the application is running, change your Application Variable property value, then right-click your application in the Services window under Servers -> GlassFish -> JBI -> Service Assemblies, and click Stop in the popup menu. When you restart your project, your new settings will take effect.

To Create an Application Variable

  1. On the NetBeans IDE Services window, expand Servers > GlassFish v2.1 > JBI > Binding Components.
  2. Right-click sun-rest-binding, and then select Properties.

    The Properties window appears.

  3. Click the ellipsis next to Application Variables.

    The Application Variables Editor appears.

  4. Click Add.

    A list of possible variable types appears.

  5. Select String, Number, Boolean, or Password, and then click OK.

    A new row appears in the application list.

  6. In the new row, enter a variable name and then do one of the following:
    • For a Boolean variable, select the check box if the variable value should be true; otherwise leave it deselected.
    • For all other variables types, enter the variable value.

      Note - If you created a password variable, the value you enter appears as asterisks.



      image:Figure shows the Application Variables Editor.

    The variable can now be reference from WSDL documents using a dollar sign and curly brackets to indicate the variable; for example, ${MyVariable}.

To Use an Application Variable for Password Protection

To protect passwords that would otherwise appear as clear text in your WSDL document, you can enter a Password application variable as a token. In the following example, a password application variable is created that uses the name SECRET and the password PROTECT.

  1. On the NetBeans IDE Services window, expand Servers > GlassFish v2.1 > JBI > Binding Components.
  2. Right-click sun-rest-binding, and then select Properties.

    The Properties window appears.

  3. Click the ellipsis next to Application Variables.

    The Application Variables Editor appears.

  4. Click Add, select Password, and then click OK.

    A new row appears in the variable list.

  5. Enter SECRET as the name, and enter PROTECT as the value.

    Because this is a password type, the characters appear as asterisks.

  6. Use the application variable name ${SECRET} as the WSDL password attribute, using the dollar sign and curly braces as shown.