webMethods 10.2 | Service Development Help | Working with OData Services | Adding OData Elements to the OData Service
 
Adding OData Elements to the OData Service
Entity types are named structured types with a key. For example, uniquely identifiable records such as a Customer or Employee. Complex types are structural types consisting of a list of properties but with no key. For example, Address, which includes city, street, state, and country. External entity types are entity types available through an external source provider. For example, if you choose to use webMethods Adapter for JDBC as your external source provider or source type, you can use Database Tables as entity types to create your entities.
* To add OData elements to an OData service
1. Open the OData service to which you want to add an OData element.
2. In the Palette view of the OData editor, under OData Elements perform one of the following:, select the type of element you want to add and drag it to the Tree tab of the OData service.
For details about adding each type of element, see the following steps.
Note: If the Palette view is not visible, display it by clicking on the right side of the editor.
3. To add an entity type as an OData element, do the following:
a. Select Entity Type and drag it to the Tree tab.
b. Provide a name for the entity type.
Note: The name of an entity type must be unique among all the entity types in the OData service.
4. To add the external entity type as an OData element, do the following:
a. Select External Entity Type and drag it to the Tree tab.
b. Select an external source from the list and click Next
c. In the Select a Connection Alias dialog box, select the connection to use with the source type from the Connection Name list and click and click Next.
d. In the Select the Entity and Properties dialog box, select the entities that you want to include in your OData service. You can also change the Java Type for the entity selected.
e. Click Finish.
The selected external entity types appear on the Tree tab of the OData service.
5. To add a complex type as an OData element, do the following:
a. Select Complex Type and drag it to the Tree tab.
b. Provide a name for the complex type.
Note: The name of the complex type element must be unique across all of the complex types in the OData service.
6. Click File > Save to save the OData elements.

Copyright © 2017-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release