Create document

Hi, How to create a document? I have used the below code to create but couldnt know what to place at “theBinderId” and “profile”. How can i get those values?

Library lib = new Library(“http://aspire250/help/decsdoc.nsf”);

    lib.connectAs("amandai", "amandai");



    Binder binder = lib.getBinderById(theBinderId);



    // fill out a profile for the new document

    // profile = your code here ...



    DDDocument newDoc = binder.createDocument();

    newDoc.setContents(new File("C:\\My Documents\\Corbin.doc"));

    newDoc.setName("New Java created document");

    newDoc.setProfile(profile);

    newDoc.save();

    newDoc.checkin(Constants.CHECKIN_VERSION, Constants.CHECKIN_NEW,

        false, "check in from Java");

    System.out.println("new doc id = " + newDoc.getId());

Subject: Create document

import javax.servlet.;import javax.servlet.http.;

import lotus.domino.*;

import java.io.*;

NotesThread.sinitThread();

String host = null;

String args = new String[1];

args[0] = “-ORBEnableSSLSecurity”;

String user = “username”;

String pwd = “password”;

Session session = NotesFactory.createSession(host, args, user, pwd);

Database db = session.getDatabase(null, “somewhere\filename.nsf”);

Document doc = db.createDocument();

doc.replaceItemValue(“FieldName”, “New Value”);

doc.save(true, false, false);