parameter for service implementations

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

parameter for service implementations

Anders Hessellund-2
Hi,

when I implement a service in Java, I am supposed to use the following
method signature:

   public static Map someService(DispatchContext ctx, Map context)

Where can I find a description of the significance of these two
parameters. Specifically, it seems that my context-map contains more
than the parameters defined in the service-xml file. Where do these
extra keys come from, and what are they used for?

Why don't OFBiz use custom parameter objects instead of these very
generic maps? It seems that errors like misspelling a key in
context.get(...) could be avoided.

Thanks,

Anders
Reply | Threaded
Open this post in threaded view
|

Re: parameter for service implementations

Jacques Le Roux
Administrator
I will not answer all your questions, just one : you get automatically other standard parameters like userLogin, locale, etc. I
think that it's
obvious why : easier to work with.

Jacques

> Hi,
>
> when I implement a service in Java, I am supposed to use the following
> method signature:
>
>    public static Map someService(DispatchContext ctx, Map context)
>
> Where can I find a description of the significance of these two
> parameters. Specifically, it seems that my context-map contains more
> than the parameters defined in the service-xml file. Where do these
> extra keys come from, and what are they used for?
>
> Why don't OFBiz use custom parameter objects instead of these very
> generic maps? It seems that errors like misspelling a key in
> context.get(...) could be avoided.
>
> Thanks,
>
> Anders
>