I have problem with the getter in LS2J, i can't have the result of the get in my prog !! I take some tests, this is the results :
My class in java :
public String getFonctionWS() {
System.out.println("get : " + fonctionWS);
return fonctionWS;
}
public void setFonctionWS(String fonctionWS) {
System.out.println("set : " + fonctionWS);
this.fonctionWS = fonctionWS;
}
This same class called in LS2J :
Class LogWSDTO
sessionJava As JAVASESSION
classJava As JAVACLASS
objectJava As JAVAOBJECT
methodJava As JAVAMETHOD
Public Sub New()
Set sessionJava = New JAVASESSION
Set classJava = sessionJava.GetClass("com.pasquier.DTO.WS/LogWSDTO")
Set objectJava = classJava.CreateObject
End Sub
Public function getFonctionWS()
Set methodJava = classJava.GetMethod("getFonctionWS","()Ljava/lang/String;")
getFonctionWS = objectJava.getFonctionWS
End function
I call this class in lotus :
Dim session As NotesSession
logDTO.setFonctionWS("GetAllDocuments")
dt = logDTO.getFonctionWS
the result print : set : GetAllDocuments
Agent 'GetAllDocuments_LogWS GADBKWS' error: Wrong number of arguments for method
Sorry if i'm not very clear ^^ I have several problems and i was difficulty to explain one by one... thanks for your help !
i begin to understand : in ls2j for get the getter, we must take a parameter ... !!!!(????)
when i try :
public String getEssai(String dt){
System.out.println("get essai test20002");
return fonctionWS;
}
it' fine, i have my result !! i don't understand why but it works !!
could you explain me ??
it should be:
getFonctionWS = objectJava.getFonctionWS()