Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
This is the client side of the sas demo. It just calls the single operation "printCert()" of the server. As you can see, sas is fully transparent.

Nicolas Noffke
public class GssUpClient {
    public static void main(String args[]) {
        if (args.length != 3) {
            ..println("Usage: java <ior_file> <username> <password>");
        try {
            // set security credentials
            GssUpContext.setUsernamePassword(args[1], args[2]);
            // initialize the ORB.
            ORB orb = ORB.init(argsnull);
            // get the server
            File f = new File(args[0]);
            if (!f.exists()) {
                ..println("File " + args[0] + " does not exist.");
            if (f.isDirectory()) {
                ..println("File " + args[0] + " is a directory.");
            BufferedReader br = new BufferedReader(new FileReader(f));
            org.omg.CORBA.Object obj = orb.string_to_object(br.readLine());
            SASDemo demo = SASDemoHelper.narrow(obj);
            //call single operation
            ..println("Call to server succeeded");
        } catch (Exception ex) {
New to GrepCode? Check out our FAQ X