Professional Documents
Culture Documents
Extending A Service Using The Gateway Service Builder - SAP Blogs
Extending A Service Using The Gateway Service Builder - SAP Blogs
Extending A Service Using The Gateway Service Builder - SAP Blogs
Community
Former Member
August 8, 2014 5 minute read
In this blog, I will introduce the service extensibility concept that was developed as part of the SP09 development for the SAP NetWeaver Gateway Service Builder.
Motivation: The motivation behind the service extensibility concept was to have a single service URL for both the original service and the new service (which is generated by rede ning the
original service). This will enable users to rede ne a particular service as per the requirements but still access the new rede ned service using the URL of the original service.
Prerequisites:
Step-by-Step Procedure
Following are the step by step procedures to extend a particular service. I will rede ne an original service into a new rede ned one and then showcase the service extensibility functionality.
Creation of a “Service with SAP Annotations” or “Service with Vocabulary-Based Annotations” service
Creation of a “Service with SAP Annotations” or “Service with Vocabulary-Based Annotations” service
2. Enter the details for the Project, Description, and Generation Strategy. Select project type as “Service with SAP Annotations” or “Service with Vocabulary-Based Annotations” from the drop-down. I have
mentioned the project name as “z_srvext_parent” for better comprehension.
https://blogs.sap.com/2014/08/08/extending-a-service-using-the-gateway-service-builder/ 1/10
2/10/2020 Extending a service using the Gateway Service Builder | SAP Blogs
3. Create few entities for this project by right clicking on “Data Model” and selecting “Create Entity”. Or you could also right-click on the “Data Model” and select the “Import”
mechanism to import a data source. I will import a RFC in this example.
4. I now have the service as follows. Let’s call this the “parent” service.
5. Generate the Runtime artifacts by clicking on . In the following dialog Click Continue.
https://blogs.sap.com/2014/08/08/extending-a-service-using-the-gateway-service-builder/ 2/10
2/10/2020 Extending a service using the Gateway Service Builder | SAP Blogs
The runtime artifacts for this “parent” service will be generated.
1. Let’s now create a new “Service with SAP Annotations project” and rede ne it from the “parent” service. Navigate to the SEGW transaction and create a new service as follows.
2. Right Click on the Data Model and select Rede ne -> OData Service (GW).
3. In the following wizard, enter the values for the “parent” service and click “Next”.
https://blogs.sap.com/2014/08/08/extending-a-service-using-the-gateway-service-builder/ 3/10
2/10/2020 Extending a service using the Gateway Service Builder | SAP Blogs
4. Select the entity of the “parent” service in the next wizard as follows and click on “Finish”.
5. Add another entity to this service by right-clicking on Data Model and selecting Create -> Entity Type.
Add a property for this entity. (I have tried to keep the entities and properties to be as simple as possibleJ). The “child” project now has two entities as shown below.
https://blogs.sap.com/2014/08/08/extending-a-service-using-the-gateway-service-builder/ 4/10
2/10/2020 Extending a service using the Gateway Service Builder | SAP Blogs
1. Generate the runtime artifacts for this “child” service by clicking on . The following dialog opens up.
The Overwrite Base/Extended Service under “Service Extension” is by-default unchecked. Once checked, we get the warning “Base service will be inaccessible” and the Technical Service Name
and the Service Version elds get lled with the values of the “parent” service that was entered in step 3.
(If the checkbox Overwrite Base/Extended Service is checked, the service extensibility concept comes into play. The service URL of the “parent” service (Z_SERVICEEXT_PARENT) will now be
re-directed (i.e. fetch the service details) to the “child” service (Z_SERVICEEXT_CHILD).
2. We will now register this service in the SAP NetWeaver Gateway Hub system. Click on Service Maintenance and select the Hub system and click on Register.
Click Ok and enter the system alias in the next dialog. Enter the package in the subsequent dialog and click Ok.
https://blogs.sap.com/2014/08/08/extending-a-service-using-the-gateway-service-builder/ 5/10
2/10/2020 Extending a service using the Gateway Service Builder | SAP Blogs
3. Register the “parent” service as well by following the same steps as above. Now since we have both the “parent” as well as the “child” services registered, we can check the service URLs.
1. Navigate to the “parent” service -> Service Maintenance, select the Hub system and click on Gateway Client to check the service details.
2. In the Gateway Client window, enter the details as mentioned in the picture below and execute to see the service details.
Alert Moderator
Now, in the metadata of the “parent” service, we can see the two entities associated with the “child” service. This happens because the service URL of the “parent” service gets redirected to the
Assigned tags as the “child” service has extended the “parent” service.
“child” service
BothGateway
SAP the “parent” and the “child” |service
| netweavergateway sap |can
sapbe accessed
netweaver using the
gateway URL of the “parent”
| servicebuilder | service.
View more...
Hope this post helped you get a perspective on the service extensibility concept in service builder
How to transport Fiori like applications using SAP Solution Managers Quality Gate Management
By Andre Fischer , Jul 07, 2014
Create Standalone Annotation using SAP Gateway Service Builder
By Former Member , Aug 16, 2014
Related Questions
https://blogs.sap.com/2014/08/08/extending-a-service-using-the-gateway-service-builder/ 6/10