The delegatorName variable is assigned in the web.xml
file for each webapp.  Out of the box all of the
delegatorName variables = "default" which is calling
the definition from
/framework/entity/config/entityengine.xml <deleagotor
name="default" ...> 

So in short, call the same method but set String
delegatorName = (String) "default";

--- John Martin <[EMAIL PROTECTED]> wrote:

> Hey Raj,
> 
> Thanks for the getAllFields() call, that worked.  It
> would be nice to
> figure out what the delegator initialization issue
> was though.
> 
> John
> 
> On 8/8/06, Raj <[EMAIL PROTECTED]>
> wrote:
> > U CAN CONVERT INTo MAP USING getallfields() method
> and then u can use.i need
> > some help on how to see GenericEntity in eclipse
> debug mode .i can't able to
> > do.i think ,I miss some classpath in eclipse
> >
> > -----Original Message-----
> > From: Jacopo Cappellato [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, August 09, 2006 10:18 AM
> > To: [email protected]
> > Subject: Re: How to properly access fields from
> GenericEntity
> >
> > Hi John,
> >
> > John Martin wrote:
> > > I'm trying to integrate another system with
> ofBiz using a few RMI
> > > calls.  Not being familiar with the ofBiz
> objects, I've gotten a
> > > little stuck.
> > >
> > > I'm calling the userLogin service and get back
> in the Map, a
> > > [GenericEntity:UserLogin].  I cast the object
> back into a
> > > GenericEntity and attempt to get various fields
> out but the system
> > > bombs. Here's my code:
> > >
> > > ...
> > > RemoteDispatcher rd.Naming.lookup(RMI_URL);
> > > ...
> > > Map context = new HashMap();
> > > context.put("login.username", username);
> > > context.put("login.password", password);
> > > Map result = rd.runSync("userLogin", context);
> > > GenericEntity ge = (GenericEntity)
> result.get("userLogin");
> > > // The object looks good in the debugger at this
> point, I can see the
> > > key/value pairs
> > >
> >
> > The above line should be:
> >
> > GenericValue ge = (GenericValue)
> result.get("userLogin");
> >
> > The GenericEntity class models the entity
> definitions, while the
> > GenericValue class models the records in the
> entity.
> >
> > Jacopo
> >
> > > String userId =  ge.getString("userLoginId");
> > > // This is where I try and access a field but it
> blows up.
> > >
> > > What is the proper way to access the values from
> the GenericEntity?
> > >
> > > Thanks,
> > >
> > > John
> >
> >
> >
> 

Reply via email to