I use a SOAP client based on jQuery. I can't really say how good/bad it is, but 
I tried to use another client first which was a PITA and I never got it 
working. I then tried this and found it easy to use. You can get it from 
http://plugins.jquery.com/project/jqSOAPClient

-----Original Message-----
From: Ján Valkovič [mailto:[email protected]] 
Sent: Friday, February 27, 2009 8:25 AM
To: [email protected]
Subject: Re: Using Ajax in Ofbiz

Hi,
try DWR ( http://directwebremoting.org/ ). You will need create service broker 
in java, like this (code sample):

@RemoteMethod
public Map callOfbizService(String serviceName, Map serviceContext) {

        WebContext ctx = WebContextFactory.get();

        try {
                HttpServletRequest request = ctx.getHttpServletRequest();
                GenericValue userLogin = (GenericValue) 
request.getSession().getAttribute("userLogin");
                LocalDispatcher dispatcher = (GenericValue) 
request.getSession().getAttribute("dispatcher");
// some code
                serviceContext.put("userLogin", userLogin);
                Map resultFromRequestedService = 
dispatcher.runSync(serviceName, serviceContext);
// some other code 1
        { catch(Exception e) {
                // catch action
        }
// some other code 2
        return resultFromRequestedService;
{

Hope this helps
ya

Dňa Pi, 2009-02-27 o 17:22 +0530, jayakumar t napísal:
> Hi All,
> 
> I am having a problem with Ajax in Ofbiz .In Ofbiz ajax request Send by
> using
> 
> new Ajax.Request("productService",........etc
> 
> but it is not calling my jsonservice "productService".
> 
> Is there any need to include any other JS files in my ftl?
> 
> 
> regards
> 
> Jayakumar T


Reply via email to