|
|
(28 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
− | <br>
| |
| | | |
− | :
| |
− |
| |
− | = EDT version .7 =
| |
− |
| |
− | In EDT version .7, a service is accessible only from a Rich UI application, and your task follows this pattern: declare a service-access variable and use it in a call statement.
| |
− |
| |
− | == Accessing a dedicated service ==
| |
− |
| |
− | <source lang="java"><br>
| |
− |
| |
− | // use the Service or Interface type to declare the service-access variable <br> myService MyServiceType?{@dedicatedService};<br>
| |
− |
| |
− | // call the service
| |
− |
| |
− |
| |
− |
| |
− |
| |
− |
| |
− | </source><br>
| |
− |
| |
− | == Accessing an EGL REST-RPC service ==
| |
− |
| |
− | == Accessing a third-party REST service ==
| |
− |
| |
− | = EDT version .8 =
| |
− |
| |
− | <br>
| |
− |
| |
− | <br>
| |
− |
| |
− | <br>
| |
− |
| |
− | <br>
| |
− |
| |
− | <br>
| |
− |
| |
− | <br> <source lang="java">
| |
− |
| |
− | // From a a Access a dedicated service
| |
− |
| |
− |
| |
− |
| |
− |
| |
− |
| |
− |
| |
− |
| |
− | http HttpRest{request.uri="http:host\\myService"};
| |
− | srvc IRest?;
| |
− | srvc = ServiceLib.completeBind(srvc, http);
| |
− | </source>
| |
− |
| |
− | '''Accessing HTTP request headers'''
| |
− |
| |
− | <source lang="java">
| |
− | http HttpRest{};
| |
− | http.request.headers = new Dictionary { param1 = "a value to pass to my service" };
| |
− | srvc IRest?{@Resource {}};
| |
− | srvc = ServiceLib.completeBind(srvc, http);
| |
− | </source>
| |
− |
| |
− | '''HTTP request and response'''
| |
− |
| |
− | <source lang="java">
| |
− | function invokeDoSomething()
| |
− | call srvc.doSomething() returning to serviceCallback;
| |
− | end
| |
− |
| |
− | function serviceCallback(returnValueOne String, callbackHttp IHTTP in)
| |
− | // process callback request or response
| |
− | end
| |
− | </source>
| |