You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Deepaks <de...@gmail.com> on 2008/01/30 21:10:06 UTC

Calling a service from script

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 ) 
------------------------
-- 
View this message in context: http://www.nabble.com/Calling-a-service-from-script-tp15190744p15190744.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: Calling a service from script

Posted by Jacques Le Roux <ja...@les7arts.com>.
Did you provide definition and implementation ?

Jacques

From: "Deepaks" <de...@gmail.com>
> 
> 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.
> 
>

Re: Calling a service from script

Posted by Deepaks <de...@gmail.com>.
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.