Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359338 - Service call with Decimal return type got runtime error
Summary: Service call with Decimal return type got runtime error
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Scott Greer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-29 02:12 EDT by Xin Wu CLA
Modified: 2017-02-23 14:20 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xin Wu CLA 2011-09-29 02:12:17 EDT
Build Identifier: 20110928 nightly build

Service call with Decimal return type got runtime error

Reproducible: Always

Steps to Reproduce:
1. Create Web Client with Service project, create a service
2. Add function with decimal return type

       function returnDecimal2() returns(decimal(5,2))
		res decimal(5,2) = 123.45;
		return(res);
       end

3. Create Web Client Project, create RUIHandler
4. Config the REST service binding resource
5. In RUIHandler add service call and callback function

 call srv_return.returnDecimal2() returning to callback_decimal onException handle_exeption;

    function callback_decimal(dec decimal(5,2) in)
    	//dec_field.text = dec;
    end

6. Run in preview mode, got the following error message

[CRRUI2082E] (Inner error:got inner error when invoke construction function of EDecimal)
ReferenceError: i is not defined at new (edt_runtime.js:193:43) at [object Object].eze$$thisClass (egl.js:592:28) at [object Object]. (ServiceRuntimes.js:194:59) at ServiceRuntimes.js:344:30 at [object Object].runCallback (ServiceRuntimes.js:488:13) at XMLHttpRequest.onreadystatechange (ServiceRuntimes.js:398:59)

i is not defined
[CRRUI2094E] (this function invocation of EGL caused the error) :

    RUI Runtime.Handling callback for workspace://server/server.ServiceWithReturn() [native JavaScript]
    client/TestReturn.egl() at line 181
Comment 1 Scott Greer CLA 2011-09-29 07:17:52 EDT
Joe,

Please triage this and assign it back to me if it's in JS gen....thanks.
Comment 2 Joseph Vincens CLA 2011-10-03 11:17:46 EDT
this appears to be a JS runitme issue.
/****************************************************************************
 * EDecimal
 ****************************************************************************/
egl.defineClass( "eglx.lang", "EDecimal"
				,"eglx.lang", "AnyBoxedObject",
{
	"constructor" : function(s){
		egl.eglx.lang.AnyBoxedObject.call(this, i); //TODO no ctor chaining?!
	}
}
);

(this, i) the i is undefined.
Comment 3 Scott Greer CLA 2011-10-06 12:11:41 EDT
Fixed.
Comment 4 Xin Wu CLA 2011-10-11 22:00:23 EDT
Verified in build 20111011