on 12-16-2008 3:15 PM
Hi,
I need to login to SAP MDM Repository by a Java Project made using Java Web Dynpro.
I wrote the Login method and called it in main() method.
package searching;
import a2i.common.A2iField;
import a2i.common.A2iResultSet;
//import a2i.common.CatalogData;
import a2i.common.ResultSetDefinition;
import a2i.core.StringException;
import a2i.core.Value;
import a2i.search.Search;
import a2i.generated.RepositoryInfo;
import com.sun.corba.se.ActivationIDL.Repository;
/**
* @author kaushikb
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class TestSearch {
public static void main(String[] args) {
Repository rep;
CatalogData.Login("http://10.114.20.9", //ServerAddress
2399,//port
"Admin", //UserName String
"", //Password
"English[US]", //LanguageTag
"log.txt"); //LogFileName
}
class CatalogData {
// Login Method.
//Opens a Connection to the MDM Server.
Repository rep;
public static Repository Login(String serverName, int port,String userName,
String passWord, String regionTag, String logfile) {
Repository MyRep = null;
Login(serverName, port, userName, passWord,regionTag,logfile);
return MyRep;
}
}
But this code is logically wrong and will run into StackOverFlow Exception due to Recursion in Login method.
Second Login method does not properly define what to do with the parameters passed and Repository instance MyRep returns a null value.
Need some valuable suggestion on writting the Login method.
Regards
Kaushik Banerjee
Hi Kaushik,
FYI
Now we can delete the thread if posted mistakenly or if you dont want the replies. But it is possible if no one has replied to the thread else you can mark the thread status so that no one should reply it further.
Regards,
Jitesh Talreja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Ignore the previous post. As the method is irrevelant with basics of Java Fundamentals violated.
As object MyRep seems to be calling static method Login() which is not possible.
I just took the code from article.
It is better to use provided Login() methods A2i to login to MDM Repository.
I need to know, do a2i.*; have any method which can be used as Login() method to login to
MDM Repository.
Regards
Kaushik Banerjee
Edited by: Kaushik Banerjee on Dec 17, 2008 5:47 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.