REST Binding Component User's Guide

Creating the REST BC WSDL Document

The following topics provide instructions for creating an inbound and outbound REST WSDL document, and also provide reference information for the fields on the New WSDL Wizard.

ProcedureTo Create a WSDL Document for REST Inbound

  1. In the NetBeans Projects window, right-click the project or a folder within the project where you want to add the WSDL document.

  2. Point to New and then select WSDL Document.

    The New WSDL Document Wizard appears.

  3. Enter a name for the WSDL document, and verify or update the folder location for the file.

  4. Select Concrete WSDL Document.

    The Binding and Type fields appear.

  5. For the Binding, select REST; for the Type, select REST – Inbound.

    Figure shows the Name and Location window of
the WSDL wizard.
  6. Click Next.

    The Operation Detail window appears with the Get tab displayed.

  7. To add a GET operation, do the following:

    1. On the Get tab, click Add Operation.

      New fields appear on the wizard.

      Figure shows the operation fields on the WSDL
wizard.
    2. Enter a name for the operation, and click the Browse buttons to select the request and response message types.

    3. Click Edit Operation.

      The Edit Operation Properties window appears.

      Figure shows the Edit Operation Properties window.
    4. Enter values for the fields described in Table 1.

  8. To add PUT, POST, DELETE, and HEAD operations, repeat the above steps from the appropriate tab on the wizard.

  9. On the New WSDL Document Wizard, click Finish.

ProcedureTo Create a WSDL Document for REST Outbound

  1. In the NetBeans Projects window, right-click the project or a folder within the project where you want to add the WSDL document.

  2. Point to New and then select WSDL Document.

    The New WSDL Document Wizard appears.

  3. Enter a name for the WSDL document, and verify or update the folder location for the file.

  4. Select Concrete WSDL Document.

    The Binding and Type fields appear.

  5. For the Binding, select REST; for the Type, select REST – Outbound.

    Figure shows the Name and Location window of
the WSDL wizard.
  6. Click Next.

    The Operation Detail window appears with the Get tab displayed.

  7. To add a GET operation, do the following:

    1. On the Get tab, click Add Operation.

      New fields appear on the wizard.

      Figure shows the operation properties on the
WSDL wizard.
    2. Enter a name for the operation, and click the Browse buttons to select the request and response message types.

    3. Click Edit Operation.

      The Edit Operation Properties window appears.

      Figure shows the Edit Operation Properties window.
    4. Enter values for the fields described in Table 2.

  8. To add PUT, POST, DELETE, and HEAD operations, repeat the above steps from the appropriate tab on the wizard.

  9. On the New WSDL Document Wizard, click Finish.

New WSDL Wizard Properties for REST

The following tables list and describe the inbound and outbound operation properties for the REST BC. These properties are accessed from the Operation Details page of the New WSDL Wizard.

Table 1 Edit Operation Properties (Inbound)

Property 

Description 

Path 

The path to the operation resource. This property is required. 

HTTP Listener 

The name of the HTTP listener to bind to. The default value is Default HTTP Listener. This property is optional.

Consume Types 

The acceptable MIME types for the request payload, 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: 

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

This property is optional. 

Produce Types 

The acceptable MIME types for the response payload, specified in JSON format as above. This property is optional. 

Forward as Attachment 

An indicator of whether to forward the payload as an attachment. Select the check box to have the payload forwarded as an attachment. This property is optional. 

User Defined 

A list of user-defined properties in java.util.Properties format (key and value pairs). For example:

serverName=test

This property is optional. 

Table 2 Edit Operation Properties (Outbound)

Property 

Description 

URL 

The URL to the external resource. This property is required. 

Accept Types 

The acceptable media types for the response, 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" ]

This property is optional. 

Accept Languages 

The preferred natural languages for the response, specified in JSON format. 

This property is optional. 

Content Types 

The content type of the outbound payload. If no value is specified, this defaults to any type. 

This property is optional. 

Headers 

Custom HTTP headers for the outbound payload. 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"}

Custom headers are optional. 

Param Style 

A style for the URI parameters. Select one of the following options: 

  • 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.

Params 

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"}

Custom parameters are optional. 

Basic Auth User Name 

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

Basic Auth Password 

The login password corresponding with the above user name. 

User Defined 

A list of user-defined properties in java.util.Properties format (key and value pairs). For example:

serverName=test

This property is optional.