How To Discover OData Services in SAP NetWeaver Gateway
Explore, discover, and identify the entities, their associations, operations, and properties in an OData service before using it for your business solution.
With SAP NetWeaver Gateway plug-in for Eclipse – Framework, you can quickly create applications to retrieve, and interact with data in your existing SAP systems through OData services in SAP NetWeaver Gateway.
Tacked into this framework, is a search provider (based on a Search Console plug-in) designed to help you to explore and discover the OData services that are available in your SAP NetWeaver Gateway system.
To follow the procedures in this post, make sure that you have following:
- Installed and configured the SAP NetWeaver Gateway plug-in for Eclipse – Framework software. It is available at: http://www.sdn.sap.com/irj/scn/downloads?rid=%2Fwebcontent%2Fuuid%2Fb09d414f-f227-2f10-bdbf-ba31c844b432
- Documentation for the SAP NetWeaver Gateway plug-in for Eclipse – Framework guide is also available at: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0864eb5-9129-2f10-d285-dfd3ff….
- Configured the framework to connect to the SAP NetWeaver Gateway demo system, SAP Gateway Demo System.
- Working knowledge in Eclipse, and Open Data (OData) protocol should suffice.
The following is an overview of the procedures for using the search provider (Search Console):
- Open the Search Console.
- Search for the service.
- Understanding the capabilities of the service.
Opening the Search Console
Open the Search Console:
- From the Eclipse menu, select , and the select Search Console.
- Click OK.
The Search Console tab displays in your Eclipse workspace.
You can start searching for specific OData services or simply browse through the listed services in an SAP NetWeaver Gateway system.
Note: No services are listed if you have not connected the framwork to an SAP NetWeaver Gateway system. In this case, choose Manage Destinations to configure the connection to the SAP NetWeaver Gateway Demo system.
Search for the Service
Your search item or query can be the exact name of the OData service you are looking for, or part of a name, or simply use the wildcard character, * to get all services.
The results will include items such as workflowprocessing, workflow_processing, or workflowdecisiontaskprocessing.
The search items are case insensitive, however search must not contain punctuations, including, @, #, $, %, ^, &, (, ), =, +, [, ], \, ?, and other special characters.
To search for an OData service:
- Select Gateway Service, in Search for. All the SAP NetWeaver Gateway systems that have been configured to connect to the framework are listed.
- In Search in, select the Gateway system in which to perform the search. For example, GWDEMO.
- In Find, enter the query or search item, and in Group by, choose Services.
- Click Search to start searching. Retrieving search results may take some time.
The search results are provided in the same page as the search item so that you can see the search item and the results at the same time. If you are not satisfied with the results, you can edit the search item to perform a new search.
Understanding the Selected Service
The results are presented as a tree where each item in the tree represents an OData service. You can choose and expand a service to explore its collection of entities.
You can find detailed information about the service, including a description, technical and service names, identifier, title, date and others, by navigating through its elements in the tree.
When you select an element, such as, a collection in a service the following displays:
- Properties tab: This shows the URL of the selected collection.
Click the URL to get the metadata for the service.See details about the properties; with a working knowledge in OData you can easily understand the content.
- Associations tab: Presents the navigation properties.
- Entity Description tab: Presents the attributes and details of the entity set.
When you discover the service you want, you can use it directly from the search provider.
In addition, you can explore and discover the services you want to use directly from the wizards of the framework.
Generate Code for the Service Proxy
You can quickly generate code for the discovered OData service as a proxy, from the Search Console.
Right click the service, and choose Generate Proxy. The Proxy Generation wizard opens.
If the selected service is not well formed, you cannot do this procedure.