Using Java script as a service [message #1368845] |
Tue, 20 May 2014 09:50 |
Patrick P. Messages: 4 Registered: May 2014 |
Junior Member |
|
|
Hello,
I have to use a Java script (a very simple class with one method in order to test) as a service.
I follow the two recommandation concerning the fact that :
- the first parameter must be an EObject,
- the class is imported using a Java Extension in the odesign model.
But when I use this service in my model, I have a message saying that the compilator cannot find my method for the object.
What did I forget ?
OK subject closed thanks to a response to my previous topic telling me to look at ecore example in sirius...
[Updated on: Tue, 20 May 2014 14:37] Report message to a moderator
|
|
|
Re: Using Java script as a service [message #1371228 is a reply to message #1368845] |
Wed, 21 May 2014 09:18 |
|
Hi,
Which interpreter do you use to call your service? There is two possible
interpreters: acceleo3 and “service:” interpreter.
In the second case (“service:” interpreter), your Java Class that
contains the service must be deployed in your bundle. (see “Using the
Specialized interpreters” section in Sirius > Sirius Specifier
Manual>Writing Queries and Interpreted Expressions for more details).
In addition, the java service class has to declare a default constructor
which takes no argument.
Regards,
Florian
On 05/20/2014 11:50 AM, Patrick P. wrote:
> Hello,
>
> I have trued to use a Java script (a very simple class with one method
> in order to test) as a service.
> I follow the two recommandation concerning the fact that : - the first
> parameter must be an EObject, - the class is imported using a Java
> Extension in the odesign model.
>
> But when I use this service in my model, I have a message saying that
> the compilator cannot find my method for the object.
> What did I forget ?
>
|
|
|
Powered by
FUDForum. Page generated in 0.03046 seconds