IBM i Program Call under 0.81 M3 [message #894364] |
Sun, 08 July 2012 17:53 |
Dan Darnell Messages: 145 Registered: November 2011 Location: Arkansas |
Senior Member |
|
|
I am revisiting IBM i program calls and now that 0.81 M3 is out I see that some things have changed.
I really liked that we could invoke a program call from a Rich UI using a syntax that made it appear that we were calling the program from Rich UI client tier. (I know that there was actually a proxy layer in between but it was invisible to the programmer.) I can't seem to figure out how to make that type of call work now that M3 has dropped.
Taking the working example from my video (see http://www.youtube.com/watch?feature=player_embedded&v=6Kt90MVUdCM#!) I made what seemed to be the necessary modifications for 0.81 M3 (using the new @Resource and @StructXXXXX annotations). Here's the modified service code:
service CallRPGService
function hello(name string inout)
{
@Resource{uri = "binding:MyConnection"},
@IBMiProgram {
programName = "MYRPG",
libraryName = "/QSYS.LIB/*LIBL.LIB/",
parameterAnnotations = [
@StructText{length = 40}
]
}
}
end
end
In my Rich UI client I used to be able to do this:
function varGoButton_onClick(event Event in)
call CallRPGService.hello(varNameField.text)
using new HttpProxy
returning to myCallbackFunction
onException myExceptionHandler;
end
This no longer compiles. The errors are:
IWN.VAL.5727.e 28/13 CallRPGClient - The type of the using expression must be
eglx.jtopen.IBMiConnection. At lint 28 in file \CallRPGProgram\EGLSource\com\dandarnell\client
\CallRPGClient.egl.
IWN.VAL.5729.e 29/7 CallRPGClient - A "returning to" or "onexception" expression is not allowed for a
call to a local function. At lint 29 in file \CallRPGProgram\EGLSource\com\dandarnell\client
\CallRPGClient.egl.
IWN.VAL.5729.e 30/7 CallRPGClient - A "returning to" or "onexception" expression is not allowed for a
call to a local function. At lint 30 in file \CallRPGProgram\EGLSource\com\dandarnell\client
\CallRPGClient.egl.
I don't find an example in the online or product help for invoking an IBM i service function directly from a Rich UI client but the documentation DOES still indicate that this is possible. Question is, how?
--Dan
[Updated on: Mon, 09 July 2012 17:08] Report message to a moderator
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03947 seconds