package org.xillium.tool.core;

import java.io.*;
import java.util.*;
import org.xillium.base.beans.*;
import org.xillium.base.util.*;
import org.xillium.data.DataBinder;
import org.xillium.core.util.RemoteService;


public class call {
    public static void main(String[] args) throws Exception {
        boolean data = false;
        int argc = args.length - 2;

        if (args.length > 0 && args[0].equals("--data")) {
            data = true;
            --argc;
        }

        if (argc < 0) {
            System.err.println("Usage: core.call [ --data ] SERVER SERVICE [ ARGUMENTS ... ]");
            System.exit(0);
        }

        if (data) {
            //System.err.println("# enter additional parameters below ... (names wrapped by underscores are ignored)");
            DataBinder binder = new DataBinder();
            Reader reader = new InputStreamReader(System.in);
            binder.load(new XilliumProperties(reader));
            reader.close();
            if (argc == 0) {
                System.out.println(Beans.toString(RemoteService.call(args[1], args[2], binder)));
            } else {
                System.out.println(Beans.toString(RemoteService.call(args[1], args[2], binder, Arrays.copyOfRange(args, 3, args.length))));
            }
        } else {
            if (argc == 0) {
                System.out.println(Beans.toString(RemoteService.call(args[0], args[1])));
            } else {
                System.out.println(Beans.toString(RemoteService.call(args[0], args[1], Arrays.copyOfRange(args, 2, args.length))));
            }
        }

    }

}

@@ -292,16 +292,117 @@
 ption %7B%0A
+        final PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out, %22UTF-8%22), true);%0A%0A
         
@@ -983,16 +983,25 @@
 ystem.in
+, %22UTF-8%22
 );%0A     
@@ -1075,24 +1075,25 @@
 er.close();%0A
+%0A
             
@@ -1117,39 +1117,32 @@
                 
-System.
 out.println(Bean
@@ -1229,39 +1229,32 @@
                 
-System.
 out.println(Bean
@@ -1422,39 +1422,32 @@
                 
-System.
 out.println(Bean
@@ -1534,23 +1534,16 @@
         
-System.
 out.prin

use of UTF-8 encoding