Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » EGL Development Tools » JavascriptGen error in Handler when ref server(Getting error in the handler on a line ref a server)
JavascriptGen error in Handler when ref server [message #893606] Wed, 04 July 2012 19:58 Go to next message
Douglas Weber is currently offline Douglas WeberFriend
Messages: 2
Registered: July 2012
Junior Member
I am getting an error from the compile of a handler. This started with the latest milestone last week. Is this a known issue and is there a workaround for it?


EGL level

Version: 0.8.1.v201206280959-1Ds7rFmiVCcYWyaY3NTPd8hSh



Error

IWN.HtmlGen.9990.e 0/0 Generation Failed
Generation completed for handler com.dougw.test.client.client with 2 errors and 0 warnings.

Generation Error
IWN.JavascriptGen.9998.e 27/913 Exception occurred: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
IWN.JavascriptGen.9999.e 27/913 Stack Trace: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException


Line in the Handler where the error is occuring

function Send_onClick(event Event in)
call AbstractEchoServer.echo(Request.getValue())
using new HttpProxy("com.dougw.test.server2.Echoer") returning to echo
onException wasError;

end

package com.dougw.test.common;


The definition of the the interface
// interface
interface AbstractEchoServer

function echo(parameterName string in) returns (string);

end



The definition of the server
package com.dougw.test.server2;

import com.dougw.test.common.AbstractEchoServer;


service Echoer implements AbstractEchoServer

function echo(parameter string in) returns (string)
return parameter;
end

end


Re: JavascriptGen error in Handler when ref server [message #893764 is a reply to message #893606] Thu, 05 July 2012 13:32 Go to previous messageGo to next message
Joseph Vincens is currently offline Joseph VincensFriend
Messages: 31
Registered: December 2011
Location: Prospect CT
Member
Hi,

There was an enhancement implemented 378384 that changed the syntax of service invocations. Interfaces are no longer used for service invocations.


There are 2 ways to code your service invocation:
1 use the service as the target:
function Send_onClick(event Event in)
    call Echoer.echo(Request.getValue())
        using new HttpProxy 
        returning to echo
        onException wasError;

end


Create a proxy function:
function Send_onClick(event Event in)
    call AbstractEchoServer.echo(Request.getValue())
        using new HttpProxy 
        returning to echo
        onException wasError;
end
[color=red]library[/color] AbstractEchoServer

    function echo(parameterName string in) returns (string){
        @EGLService{ serviceName="com.dougw.test.server2.Echoer"}
    }
    end

end


regards,
Joe
Re: JavascriptGen error in Handler when ref server [message #893847 is a reply to message #893764] Thu, 05 July 2012 16:37 Go to previous messageGo to next message
Douglas Weber is currently offline Douglas WeberFriend
Messages: 2
Registered: July 2012
Junior Member
Thanks. That solved it.

Is there someplace where the mechanisms for calling servers is defined? This seems to be the third change in the process and it is a vital part of the product.

Re: JavascriptGen error in Handler when ref server [message #893874 is a reply to message #893847] Thu, 05 July 2012 18:55 Go to previous message
Ben Margolis is currently offline Ben MargolisFriend
Messages: 10
Registered: December 2011
Junior Member
Yes, it is vital. The change means that a developer can use a similar approach to access services or other back-end logic.

Here's a description:

http://wiki.eclipse.org/EDT:Resource_Binding_Services

http://wiki.eclipse.org/EDT:Resource_Binding_Introduction

-- Ben

[Updated on: Thu, 05 July 2012 19:06]

Report message to a moderator

Previous Topic:Java generation error when calling service.
Next Topic:Dedicated service call
Goto Forum:
  


Current Time: Wed Dec 04 01:11:01 GMT 2024

Powered by FUDForum. Page generated in 0.03844 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top