OData Service Binding

OData Service Binding provides external connectivity for OData over HTTP. It supports QUERY, READ, CREATE, UPDATE and DELETE operations. It also supports JSON and XML message types.

Binding

This section has the following fields.

Field Description
Resource Name The name of the resource.
Resource Path This field is used to customize the OData URL.

The default Resource Path is '/' when a new OData Service is created. The Resource Path should end with a '/'.

On providing the Resource Path, it is reflected in between the application name and resource name of the endpoint URL. For example,

http://<hostname>:<port_name>/<application_name>/<Resource_Path>/<Resource_name>

Entity Container Schema Value for the schema namespace of the entity container.
Entity Set Name The name of the entity set.
Include in Service Document Indicates that the boolean value of the entity set is advertised in the service document. If the value is set to false, then the Entity Set is not present in the metadata file. By default, the check-box is selected.
HTTP Connector Name The name of the HTTP Connector.
Tip: Click on the HTTP Connector Name field to display details about the HTTP Connector resource.

By default, a new HTTP Connector Shared Resource is created when you create a new OData Service binding. Change the field value type to Module Property to specify a module property that has been defined as an HTTP Connector Shared Resource.

Response Client Format The type of response message format.

The supported response message formats are JSON or XML.

Resource Schema Displays the schema selected.

Entity Type

This section has the following tabs.

General tab
Field Description
Entity Type Name The name of the entity type.
Base Type Select the Base type property of an entity. It is the name of an Entity Type where all properties and keys of the parent Entity Type (Base Type) are inherited by this Entity Type.
Open Type Select the check-box for Open type property of an entity. It indicates the Flag, if the Entity Type is Open. An open type allows clients to add properties dynamically to instances of the Entity Type by specifying uniquely named values in the payload which is used to insert or update an instance of the Entity Type.
Properties tab
Field Description
Adding and Removing Properties

You can add or remove the properties for the given entity type.

This pane has 4 columns:

  • Name

    Name of the properties. Users can edit the properties name by clicking on the properties added.

  • Type

    The data type of the properties.

  • Nullable

    Displays the nullable value of the property as true or false.

  • Key

    Displays the key value of the property as true or false.

Operation Details

Displays the operations specified in the Operations section:
  • QUERY
  • READ
  • CREATE
  • UPDATE
  • DELETE

This section has the following tabs.

Request tab
Field Description
Query and Header Parameters You can perform the following operations:
  • Add Query Parameter
  • Add Header Parameter
  • Remove Parameter
  • Scroll Up
  • Scroll Down

This pane has 4 columns:

  • Parameter Name

    Name of the parameter. Users can edit the parameter name by clicking on the parameter added.

  • Type

    The data type of the parameter.

    • String
    • Integer
    • Long
    • Float
    • Double
    • Boolean
    • Byte
    • Binary
    • Date
    • Date Time
    • Password
  • Repeating

By default, the field is set to No.

  • Required

By default, the field is set to No.

Response tab
Field Description
Header Parameters All options are disabled in the Response tab.
Response Status tab
Field Description
Code These are unique numbers. A drop down is added to select the particular error codes.
Type Data type of the error code. Following types are supported:
  • XSD Element...

    Select this option to either select the XSD schema element available under the Schemas folder of your project or create a new XML schema resource.

  • String
  • Integer
  • Boolean

The default data type is String.

Reason Phrase Reason Phrase will get reflected based on the selected response code. This is in sync with the Code picked from the drop down.

Restrictions on OData Service Binding

The following are the features that are not supported by the OData Service Binding:
  • Containment Navigation Property
  • Functions
  • Actions
  • Lambda Operators
  • ETag
  • Open Type
  • Batch
  • Csdl files from Shared Module
  • Querying Data
    • Nested Filter in Expand
    • System Query Option $expand

Policies

To associate a new or existing policy with the OData Service, click Policies node under the OData Service tree, then click Add Policy to create a new policy. To edit an existing policy details, click the policy name and edit any of the following fields.

Field Description
Policy Name The name of the policy.
Policy Type The type of policy associated with the binding. The OData Service binding supports the Basic Authentication policy. For more information, see Enforcing Basic Authentication.
Description A description of the policy.