Error when connecting to IBM i [message #879553] |
Thu, 31 May 2012 12:17 |
Billy Weeks Messages: 6 Registered: May 2012 Location: Norcross, GA |
Junior Member |
|
|
I'm trying to follow the example in the video of connecting to an IBMi, I'm getting an error:An exception occured during a service call. Service:server.CallRpgService, Function:server.CallRpgService
I don't see any messages generated on the IBMi. My code seems to match the example that worked. Not sure where to look next to resolve it.
Server code is below:
package server;
// service
service CallRpgService
function hello (name string inout)
{
@IBMiProgram {
programName = "MYRPG",
libraryName = "/QSYS.LIB/BWEEKS.LIB/",
parameterAnnotations = [ @AS400Text { length = 40}
],
connectionResourceBindingURI = "binding:MyConnection"
}
}
end
end
client code below:
package client;
// RUI Handler
import org.eclipse.edt.rui.widgets.GridLayout;
import org.eclipse.edt.rui.widgets.TextLabel;
import org.eclipse.edt.rui.widgets.GridLayoutData;
import org.eclipse.edt.rui.widgets.TextField;
import org.eclipse.edt.rui.widgets.Button;
import server.*;
//
//
handler CallRPGClient type RUIhandler{initialUI =[ui
], onConstructionFunction = start, cssFile = "css/MyIBM2.css", title = ""}
ui GridLayout{columns = 3, rows = 4, cellPadding = 4, children = [ varButton2, varErrorLabel, varButton, varNameField, varNameLabel ]};
varNameLabel TextLabel{ layoutData = new GridLayoutData{ row = 1, column = 1 }, text = "Name" };
varNameField TextField{ layoutData = new GridLayoutData{ row = 1, column = 2 }};
varButton Button{ layoutData = new GridLayoutData{ row = 3, column = 2 }, text = "Go!", onClick ::= varButton_onClick };
varErrorLabel TextLabel{ layoutData = new GridLayoutData{ row = 4, column = 2 }, text = " " };
varButton2 Button{ layoutData = new GridLayoutData{ row = 3, column = 3 }, text = "Clear", onClick ::= varButton2_onClick };
function start()
end
function varButton_onClick(event Event in)
call CallRpgService.hello(varNameField.text)
using new HttpProxy
returning to myCallbackFunction
onException myExceptionHandler;
end
function myCallbackFunction( name string in)
varNameField.text = name;
end
function myExceptionHandler( exp AnyException in);
varErrorLabel.text = exp.message;
end
function varButton2_onClick(event Event in)
varErrorLabel.text = "";
varNameField.text = "";
end
end
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04733 seconds