Calling a service from script

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

Calling a service from script

Deepaks
Basically I am trying to call a service from zk. Which is basically bsh afaik (from <zscript> tags).

I tried the method explained in service engine guide - usage section

Creating a GenericDispatcher and using runSync("servicename",context);

The problem seems to be associated with GenericDispatcher's constructor. The error I get is "Cant find Constructor"

What im trying to do is, just trying to create a zk interface for a already present application. So want to use minimal code and just call the services once I create the context map. Though there isnt much, can post the code if that would help.

Any hints on where I might be going wrong would be very helpful.

Thanks in advance


PS: Error
------------------
Sourced file: inline evaluation of: ``addlistobj();'' : Constructor error: Can't find constructor: org.ofbiz.service.GenericDispatcher( java.lang.String, org.ofbiz.entity.GenericDelegator ) in class: org.ofbiz.service.GenericDispatcher : at Line: 45 : in file: inline evaluation of: ``import org.ofbiz.entity.GenericDelegator;     import org.ofbiz.service.LocalDisp . . . '' : new GenericDispatcher ( "appname" , delegator )
------------------------
Reply | Threaded
Open this post in threaded view
|

Re: Calling a service from script

Deepaks
Well, solved that part. Seems the docs are old and things have changed.

Got the fix from source.

Now im getting "Cannot locate service by name (servicename)"
Though, im sure it exists.
Reply | Threaded
Open this post in threaded view
|

Re: Calling a service from script

Jacques Le Roux
Administrator
Did you provide definition and implementation ?

Jacques

From: "Deepaks" <[hidden email]>

>
> Well, solved that part. Seems the docs are old and things have changed.
>
> Got the fix from source.
>
> Now im getting "Cannot locate service by name (servicename)"
> Though, im sure it exists.
>
> --
> View this message in context: http://www.nabble.com/Calling-a-service-from-script-tp15190744p15191450.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>