[OPEN-ILS-DEV] OpenSRF API Question

Bill Ott bott at grpl.org
Wed May 14 16:35:32 EDT 2008


Mike Rylander said the following on 05/10/2008 08:56 AM:
> Actually, because you have your config file in the default location
> (not required, but makes it simpler) and you're require'ing the
> oils_header.pl example, you already have access to the full
> Fieldmapper API, which happens to be what you're looking for.
>
> You'll notice that the arrays there are blessed into Perl packages
> like Fieldmapper::actor::card.  That package defines accessor/mutator
> methods for each field, on the actor.card table in this particular
> case, as well as some methods that return some class-level information
> and some administrative and state-maintenance fields.  You can see
> what accessors are defined by looking for the class in the Evergreen
> Fieldmapper IDL xml file, which you'll find at
> /openils/conf/fm_IDL.xml .  To find the class in question, you'll
> actually look an oils_obj:fieldmapper attribute containing the part of
> the Perl package name after 'Fieldmapper::'.
>
> That IDL file defines how Evergreen apps written in any supported
> programming language communicate with one another and interpret data.
> It's also used to generate a great many interfaces (programmatic and
> user interfaced) in Evergreen.
>   

Having spent a couple hours today working with the API, I've got to say, 
I'm all but giddy with the possibilities!

We tracked down wrap_perl in XMLRPCGateway.pm, and I agree with the 
comment, "These should probably be moved out to a library somewhere".  
Doug grafted it into oils_header.pl, which makes for a very handy way to 
hash'ify the results of a simplereq.






More information about the Open-ils-dev mailing list