Java generation error when calling service. [message #893555] |
Wed, 04 July 2012 14:33 |
Steve Doody Messages: 4 Registered: June 2012 |
Junior Member |
|
|
Hi,
I'm experimenting with EGL and making calls to IBM i commands.
I would like to separate the actual implementation of the EGL calls to the IBM i commands from any client programs.
I've created a project called EGLCommon which contains 2 packages; libraries and services.
The libraries package contains an EGL library which is made up of one function that calls QCMDEXC:
package libraries;
library iLibrary
function QCMDEXC(input string in, length decimal(15,5) in)
{
@Resource{ uri = "binding:IBMi" },
@IBMiProgram {
programName = "QCMDEXC",
libraryName = "/QSYS.LIB",
parameterAnnotations = [
@StructText {length = 80},
@StructPackedDecimal {}
]
}
}
end
end
The services package contains an EGL service which is a function called runCmd which calls iLibrary.QCMDEXC:
package services;
import libraries.*;
service iService
function runCmd(command string in)
iLibrary.QCMDEXC(command, characterLen(clip(command)));
end
end
The deployment descriptor in this project contains an IBM i binding pointing to our i5.
I've then created another project called EGLClient. This contains a program called TestClient which calls runCmd. The EGLCommon project is in the EGL build path and I've created a REST binding to iService.
The code for TestClient is:
package client;
import services.*;
program TestClient
function main()
iServicesSvc IHttp?{@Resource {uri="binding:iService"}};
command string = "SNDMSG MSG(HELLO) TOUSR(TOMYUSR)";
call iService.runCmd(command) using iServicesSvc;
end
end
The EGLCommon project has generated OK but I'm getting java generation errors on the EGLClient project. The errors I get are:
com.ibm.javart cannot be resolved to a type
ezeProgram cannot be resolved
ezeProgram cannot be resolved to a variable
iService cannot be resolved to a variable
Type mismatch: cannot convert from String to JavartSerializable
So, is it not possible to have this level of separation, or am I missing something from the EGLClient project?
I'm using EDT milestone 3 (Version: 0.8.1.v201206280959-1Ds7rFmiVCcYWyaY3NTPd8hSh)
Thanks
Steve
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04119 seconds