Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGL Development Tools » Dedicated service changes
Dedicated service changes [message #810252] Wed, 29 February 2012 17:27 Go to next message
Justin Spadea is currently offline Justin Spadea
Messages: 66
Registered: July 2009
Member
Hi Folks,

Some changes have been made today to dedicated services that will probably break your RUI applications. Please read this if you use the nightly builds, otherwise this won't pertain to you until the next milestone is released.

The call statement was updated not too long ago to support a new "using" clause, where you specify a variable that tells the call how to reach the service. A new type "HttpProxy" has been added to the system parts which you can specify for the using clause when invoking a dedicated service. The DedicatedService annotation has been removed, and you must now use the using clause, passing in an HttpProxy.

Old syntax:
serviceVariable MyService{@DedicatedService};
call serviceVariable.functionName() returning to handleResponse onException serviceExceptionHandler;


New syntax (two usages):

When referencing a service part the HttpProxy doesn't need anything set in the variable:
call MyService.functionName() using new HttpProxy returning to handleResponse onException serviceExceptionHandler;

When referencing an interface part you must specify the implementation name:
http HttpProxy = new HttpProxy("server.MyService");
call IMyService.functionName() using http returning to handleResponse onException serviceExceptionHandler;

Here's the wiki page about service access (feel free to fill in any gaps!): wiki.eclipse.org/ EDT:Accessing_a_service (delete the space character, the forum won't allow me to post links)

-Justin
Re: Dedicated service changes [message #823606 is a reply to message #810252] Sun, 18 March 2012 11:53 Go to previous messageGo to next message
Swamy Narayanaswamy is currently offline Swamy Narayanaswamy
Messages: 2
Registered: March 2012
Junior Member
I just upgraded to 0.8.0 from 0.7.0 (where my code was working) and ran into the dedicated service problem. I've been making corresponding changes in my "service" and in my "client" code to keep up with the upgrade. I believe I am following your instructions properly. Perhaps not.

My service (NewDBService) declares an SQLDataSource (now using 0.8.0 syntax), and has some functions using that data source. My revised Rich UI Client calls one of the functions in the NewDBService as follows:

call NewDBService.createDefaultTable() using new HttpProxy returning to myfun
onException serviceExceptionHandler;

I see a run time error when I preview:

[CRRUI3664E] An EGL service is being invoked in a dedicated fashion but no service name has been supplied.
[CRRUI2094E] Here are the EGL function calls leading to this error:

handlers/MainClient.egl() at line 51

(line 51 is the line above). Any ideas on how to proceed would be greatly appreciated.
Re: Dedicated service changes [message #823699 is a reply to message #823606] Sun, 18 March 2012 14:58 Go to previous messageGo to next message
Brian Svihovec is currently offline Brian Svihovec
Messages: 55
Registered: July 2009
Member
Hi. Your revised call syntax looks correct to me. I tried invoking a Dedicated Service two different ways, and it seems to be working for me. For example:

// Create and bind an instance of our service.
srvConnection HttpProxy = new HttpProxy("gallery.sayhelloservice.SayHelloService");

//use existing connnection
call SayHelloService.hello(name) using srvConnection returning to serviceCallback onException handleError;

//use anonymous connection
call SayHelloService.hello(name) using new HttpProxy returning to serviceCallback onException handleError;


Can you try invoking your service with an "existing connection" and see if you get the same message again?

Are you seeing this error message in the Preview pane, or in the deployed version of the application?

Is the Service located in the same project, or in a different project? My example had the Service located in the same project.

Also, what version of EDT .8 did you install? I am working with the latest version of the code from CVS, which would represent the latest Nightly build.

-Brian
Re: Dedicated service changes [message #823709 is a reply to message #823699] Sun, 18 March 2012 15:16 Go to previous messageGo to next message
Swamy Narayanaswamy is currently offline Swamy Narayanaswamy
Messages: 2
Registered: March 2012
Junior Member
Thanks for the reply, Brian.

o I am seeing the message when trying to Preview the app. I have not tried deploying.

o The service and client are in different projects in my case. The service project is in the build path for the client project.

o I got the software by doing "Install Software" from
download.eclipse.org/edt/milestones/1.0/ -- I seem to have:
0.8.0.v201203151558-1DV-FjuJ6QMOD_jhix2SCSSd
I could use the latest build if there's evidence it would help.

o If by "use existing connection" you mean declaring the HttpProxy separately, I have tried that. Same error.

Thanks again for your response.

Swamy

Re: Dedicated service changes [message #824772 is a reply to message #823709] Mon, 19 March 2012 23:13 Go to previous messageGo to next message
Brian Svihovec is currently offline Brian Svihovec
Messages: 55
Registered: July 2009
Member
Swamy,

I tried splitting my simple example up into two projects, and I am having issues loading the service, but I am not getting the same message as you. I am going to investigate this a bit further, but will most likely open a bug so that the appropriate team members can determine what is happening. If I open a bug, I will post the number here.

Also, if you have a chance, it would be good to know if you still have an issue if the application is deployed.

-Brian
Re: Dedicated service changes [message #835587 is a reply to message #824772] Tue, 03 April 2012 08:35 Go to previous messageGo to next message
Andy Blackman is currently offline Andy Blackman
Messages: 1
Registered: April 2012
Junior Member
Hi

I have been experiencing the same problem. However, i believe I have found a solution. When the service is in a separate project to the client what I found was that by defining the SQL Database Binding in the client project as well as the Service project this resolved the issue.

It seems that the error message is a little misleading.

Hope this helps.

Andy

Re: Dedicated service changes [message #836405 is a reply to message #835587] Wed, 04 April 2012 08:56 Go to previous message
Justin Spadea is currently offline Justin Spadea
Messages: 66
Registered: July 2009
Member
Hi Andy,

When you do not specify the deployment descriptor file in your binding (such that it uses the default), a dedicated service will use the default deployment descriptor specified on the *RUI* project, not the project containing the service. This is to simulate how a deployed application would behave.

A REST service invocation would use the default deployment descriptor specified on the project containing the service.

I tried this scenario out and got an error message that indicated it was looking in the RUI project's DD for the binding. What was the message you were seeing?

-Justin
Previous Topic:New blog - IDE test server overview
Next Topic:Tutorial - Access a database
Goto Forum:
  


Current Time: Mon Jul 28 22:39:16 EDT 2014

Powered by FUDForum. Page generated in 0.02784 seconds