Hi,

I am trying to interact with OfBiz using RMI.
I got the example code from:
ExampleRemoteClient.java

Everything works fine with the test message:

        context.put("message", "Remote Service Test");
        return rd.runSync("testScv", context);
        ...
        

But if I try to access the userLogin service:
        res = rd.runSync("userLogin", UtilMisc.toMap("login.username", username,
"login.password", password));

I am unable to access the results "res".

As a test code I have:

        res = rd.runSync("userLogin", UtilMisc.toMap("login.username", username,
"login.password", password));

        resultCollValues = res.values();

        Set rkv = res.keySet();
        Collection rcv = resultCollValues;

        if (res.keySet().isEmpty()) {
            System.out.println("---: Service Result Map Key: EMPTY!!!");
        } else {
            for (Object o : rkv) {
                System.out.println("---: Service Result Map Keys Objs:
"+o.getClass().getName());
                System.out.println("---: Service Result Map Keys String: 
"+o.toString());
                Object kv = res.get(o.toString());
                System.out.println("---: Service Result Map KV Objs:
"+kv.getClass().getName());
                // ERROR: System.out.println("---: Service Result Map KV String:
"+kv.toString());
                
            }
        }

The Error is typically: java.lang.NullPointerException

I am new to both OfBiz and Java.. so maybe I am doing something
fundamentally wrong ;)

The generic question is: what is the best way to access the result from the
remoteDispatcher.runSync()?

Or alternatively, How can I handle the GV Object?

I am accessing OfBiz from an external application I started to write in
Spring.

Thank a lot





--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/RMI-null-GenericValue-userLogin-problem-tp4645375.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply via email to