Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » EGL Development Tools » Service Call Syntax
Service Call Syntax [message #974033] Tue, 06 November 2012 20:24 Go to next message
Gregory Testa is currently offline Gregory TestaFriend
Messages: 28
Registered: April 2012
Junior Member
trying to follow the tutorial for creating a service (using an MS SQL connection) and then calling the service in the handler code. Can't get past this one error message. Any ideas?

Service Function:

function getUser(libuser String in) returns (userrec)
user userrec;
logEntry("getUser");
try
get user from dataSource
with #sql{
select * from Users
where user_key = :libuser
};
return (user);
onException(ex sqlException)
logException(ex);
end
end

Invocation:

call SQLService.getUser("Some String ID")
returning to pin_return
onException pin_onException;
end

function pin_return(userrec Users in)
statusMessage.text = "Return code = " + userrec.pin;
end

function pin_onException(exp AnyException in)

e ServiceInvocationException = exp;
statusMessage.text = e.message + "\n" +
e.detail1 + "\n" +
e.detail2 + "\n" +
e.detail3;
end

Error Message: IWN.VAL.3399.e The type userrec cannot be passed to the parameter userrec of the function pin_return. It is not assignment compatible with Users.


Thanks,
Gregory
Re: Service Call Syntax [message #974043 is a reply to message #974033] Tue, 06 November 2012 20:30 Go to previous messageGo to next message
Justin Spadea is currently offline Justin SpadeaFriend
Messages: 66
Registered: July 2009
Member
Hi Gregory,

It looks like you have the name and type backwards for function pin_return(userrec Users in).

It should be "pin_return(Users userrec in)" - EGL syntax is name, then type - so it thinks you want a parameter named userrec of type Users.

-Justin
Re: Service Call Syntax [message #974066 is a reply to message #974043] Tue, 06 November 2012 20:58 Go to previous message
Gregory Testa is currently offline Gregory TestaFriend
Messages: 28
Registered: April 2012
Junior Member
Thanks Justin! That did it. Excuse me while I go bang my head into the screen. Thanks for the second set of eyes.
Previous Topic:Birt & Email samples
Next Topic:Extending the Google Map widget
Goto Forum:
  


Current Time: Sat Oct 05 22:20:11 GMT 2024

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

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

Back to the top