40 likes | 133 Views
Rich UI Inter-Program Communication. Course. Units:. Creating an end-to-end RESTful Service. From your EGLWeb project: Create a new Service part in the EGLSourceservices folder, named: RUIRestServices (remember to start Tomcat) Be sure to check:
E N D
Rich UI Inter-Program Communication Course Units: • Creating an end-to-end RESTful Service
From your EGLWeb project: Create a new Service part in the \EGLSource\services\ folder, named: RUIRestServices (remember to start Tomcat) Be sure to check: Create as WEB (REST) service Here is the service code You can either code this from scratch, or copy/paste this function from the Slide ***Notes When you’ve saved and all syntax errors are cleaned up: From Project Explorer, Generate the entire EGLWeb project This action will also deploy your EGL Rest Service to Tomcat Create an End-to-End EGL Web Service using REST only
In the Project Explorer, right-mouse click your service and then click on: EGL Services Extract Interface… In the wizard, select the EGLSource folder in the RUI Projecti.e. EGLRichUI Create a new RUI Handler called RUIRestServiceTest in the mysamples package Copy the RUI code fromthe Slide ***Notes All EGL REST services use this pattern: http://<Server>:<PortNumber>/<ProjectName> /restservices/<ServiceName> Note: If you are seeing errors, make sure to Generate your service project Run your service on Tomcat Verify that Tomcat is using port 8080 Consume an End-to-End EGL Web Service using REST only --- Client
Create an End-to-End EGLWeb Service using REST only After copy\pasting the REST Service code into the editor, press CTRL + S to Save, then select the preview tab : • Note : You will have 2 projects: • A service project that is deployed on TOMCAT • A RUI project that invokes the service using an interface