Hi,
I would like to use this simple Java code but I get an error "7 - The remote server returned: NOK Logon failed".
How can I correct this error ?
Where can I find documentation on API errors ?
Java :
<code>
System.out.println("Start");
MvxSockJ obj2;
int i, j;
String str, str2;
String sendstr;
double ver;
/**
* Setup communication parameters: FPW has host name intentia.se and is
* listening on port 6000. We do NOT want encryption (0), last argument
* "" is ignored. :
*/
obj2 = new MvxSockJ("akiolprd.ad.fr", 16305, "", 0, "");
obj2.DEBUG = true; // Have MvxSockJ print out debug info
/**
* For old FPW we give LOCALA as the system name, new FPW and NextGen
* does not care. We use the AS400 account USER with password PASSWORD
* We want to connect to program CRS610MI in library MVXBOBJ.
*/
i = obj2.mvxInit("LOGIN", "PSW","CRS610MI");
if (i > 0) {
System.out.println("mvxInit() returned " + i + " " + obj2.mvxGetLastError());
return;
}
</code>
Knowing that I used exactly the same login information in a similar code in C# and everything worked fine.
C# :
<code>
SERVER_ID sid = new SERVER_ID();
uint rc;
rc = MvxSock.Connect(ref sid, "akiolprd.ad.fr", 16305, LOGIN, PWD, "CRS610MI", null);
if (rc != 0)
{
MvxSock.ShowLastError(ref sid, "Error no " + rc + "
");
}
if (id == null) id = "00000001";
MvxSock.SetField(ref sid, "CUNO", id);
rc = MvxSock.Access(ref sid, "LstByNumber");
if (rc != 0)
{
MvxSock.ShowLastError(ref sid, "Error no " + rc + "
");
MvxSock.Close(ref sid);
}
</code>
Thanks in advance 