Sei sulla pagina 1di 22
Project Creation (SEGW) Data Model Definition Service implementation Service Maintenance/Pubsh Service Project Creation Create Projectin SEGW =_—— ‘ata Model Definition ers Gateway Backend Gatoway Server (Hub) SAP NetWeaver Gateway Service Builder CIGNA) (416) (@\3) = 9 Homie] uae Cloner eotereruen Grune nice : Soveruneee Service Recisration and Ganaration of Runtine Objects Service implementation Serves Activation Test service ‘Serwce dovebprent demo Building the OData Model Reuse existing data structures > loens gene edetne ade € Manually create model components Runtime Artifacts of an OData Service SAP Ne Gateway Service Builder (Ces) [=] ¥ Powoc_t pisicow [Terelat: 83 > Data Model > Biiservice Implementation © Bp Runtime artifacts + PB) ch_cun0o_t_sasrcow_prc + B ct_cvr00_t_sastcow_prc_ext + By ct_curoo_r pasrccu_uec - DB cx_cuno0 7 pasrcow_urc_sxt (fae s eastee od - PB} ouico > Bastcow sey + By rr_parr_zrm_so_oer_peraru7 + By xrcearr_eru_so_cet ist? > BiServce Mantenance The two base classes contain logic, which is generated by the Service Builder. The logic in the base classes is overwiiien every time the Project is regenerated. For this reason, you should not modify the code in these classes, as the Service Builder overwntes their contents, The extension class names have the suffix EXT. An extension class is a subclass of the base class that is crealed once, only when the project 1s generated for the ‘frst time._An extension class initially contains no logic. The ‘Service Builder provides the extension class for you 10 wile your own code. Regenerating the Project does not overwrite your code in the extension classes, therefore the service implementation takes place in the data provider exlension class, Usually, there is no need to maintain the MPC_EXT also. HTTP Requests —> OData Operations —> ABAP Methods Data Consumer Er /rotactsee (40-4 HTTP(S) G2° (1) [Intemet Communication Framework System ay Gateway Tab Famawork @) RFC (4) [Gateway Backend Framework | amr: 6) Model & Tata Brae Class aw Backend (@) —_— one System en Code Base Implementation Direct navigation to the CRUD methods of the DPC EXT class: - Create > e msresparaeset ~ Query> GET_ENTITYSET > s=conacser Y eopoaeset - Update > _UPDATE_ENTITY ‘cea oe + Delete > | Data Hodel fiom Fle Pe search Data Model Import Taper obIc Severe [RFCIBOR or Soeeh otp ntsc Y zem0n 000 oem > : maces iby ; gene > root >| Data Modal fom Fe Redefre >| poke souctue Iretde >) FCIBOR nteace Baste Search Heb Runtime Artifacts Generating Runtime Artifacts of an OData Service Model Definition + Base Class * Implementation Class Service Implementation + Base Class * Implementation Class Service Registration * Backend Model + B zc1_zcna0e em oem pec + B zcu_zco204 em pnw nec » Backend Service Drazen enionese or Generated Model Provider Base Class inherits from Model Provider] | WBEPICL_MGW_PUS Ses H_ABS_MODEL GETLAsT.NOOEED Bo rer apes OEFB PRODUCT ‘superclass of the Model Provider Extension Class "EXT jer Class Important Methods include: + DEFINE + GET_LAST_MODIFIED + DEFINE_ ‘The Mode! Provider Class usually does not require manual coding, Use tho Model Provider Extension Class for custom code, oe parent Ace Lheeeces Beebe rds nae MI sees ines neat 1 Pacmater | excepton al BURG [SES FE OF (a) eh rer sees Ler Vie Moe Deszoton (merit vous sehen no Sms Joeataea Grr ustestri —tayea Pen ocr woe Wasi asta. Pro oreo me race. Pro ere recoct asta Pei. yap Tor epars — fayea Feb ‘ons the suc del eta aa etars tha t rechten ef rd ast rele (6.9. wes eng rfemacen) Dene matod fer mdel-rees tobe mlemented ature the Sst moatcaton of mde cis resume eel rower Fee (oho Tor ABMENTS Generated Data Provider Extension Class ‘ala Provider Extension Class Inherits from the inherited methods for (CRUD and query operations Registration and Activation = = a ala Model Definition ore) at Mode Befiritin ‘Service implementation es (orc) ‘Cenarion ‘Service Maintenance Pb seve Gateway Server (Hub) Publish the Service on the Hub Service Document: http://:/sap/opu/odata/sap/_SRV/?Sformat=xml Service Maintenance + Transaction /WFND/MAINT_SERVICE + Add/Remove Services from Hub ~ Maintain assigned System Aliases = Test Services: Gateway Client Service Publishing on the Hub + Publish the Service from within the Service Builder + Repository objects are created on the hub + External Service name stems from Service registration in the backend Gateway Backend Gateway Server __—<—— Service Publishing on the Hub + Publish the Service from within the Service Builder + Repository objects are created on the hub + External Service name stems from Service registration in the backend ‘Gateway Backend Gateway Server “AP etteaver Gateway Serves Ber Ding) 6.6) [oi eo Sov ns Implementation of a Query Operation Implomontng tno mothods in he Data Prowdor Edensen Class means” overunting the oresponaing motods fom tho suparcass ‘Tho most equonty Todehnod momods sro as folios est = presparis to POST rues, and Cronies the esau ety fovresponaing fo a spoctid ony comes fp of ho data moos Geletes a resource ofa specie entity ype onthe backend servr Tetneves an en of@ spaced ety pe ws cantity.set>_com_swrrazser— ‘stoves a colodion oa poate tnt type ws cancicy,set>_oang_mezey— Corresponds othe HTTP For poration, and changes a servor ‘Bout fora spectod ent ypa Code-Based Implementation Direct navigation to the CRUD methods of the DPC EXT cla + Create > _GET_ENTITYSET = Update >

Potrebbero piacerti anche