You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by chris snow <ch...@gmail.com> on 2010/09/18 18:32:32 UTC
using json
Are there any instructions for connecting to ofbiz using
javascript+json from an external web application. I would like to
make a call to a service/controller that requires authentication.
Many thanks,
Chris
Re: using json
Posted by Brett Palmer <br...@gmail.com>.
Chris,
We use the DojoJSONServiceEventHandler in our controller.xml file to make
service request via an AJAX client. The client specifies the service name
and appropriate parameters. Then the handler returns a json string back to
the client. We've like using json for many things as it is lighter than RMI
and easy to parse.
Sample controller elements:
<handler name="dojojson" type="request"
class="org.ofbiz.webapp.event.DojoJSONServiceEventHandler"/>
.....
<request-map uri="getTestQuestions">
<security https="true" auth="true"/>
<event type="dojojson" invoke="getTestQuestions"/>
<response name="success" type="none" value="CommonContentAdmin"/>
</request-map>
Brett
On Sat, Sep 18, 2010 at 11:24 AM, chris snow <ch...@gmail.com> wrote:
> Hi BJ, thanks for the response. Unfortunately, an iframe won't do - I
> need to have a json client running on a remote server.
>
> On Sat, Sep 18, 2010 at 6:16 PM, BJ Freeman <bj...@free-man.net> wrote:
> > how about an Iframe from the website to the login you want to use.
> > I use this a lot for backend Customer login for my portal, on clients
> > websites that ofbiz is the back end but not the ecommerce provider.
> >
> > chris snow sent the following on 9/18/2010 9:32 AM:
> >>
> >> Are there any instructions for connecting to ofbiz using
> >> javascript+json from an external web application. I would like to
> >> make a call to a service/controller that requires authentication.
> >>
> >> Many thanks,
> >>
> >> Chris
> >>
> >
> >
>
Re: using json
Posted by BJ Freeman <bj...@free-man.net>.
http://ci.apache.org/projects/ofbiz/site/javadocs/
org.ofbiz.base.json
chris snow sent the following on 9/18/2010 10:24 AM:
> Hi BJ, thanks for the response. Unfortunately, an iframe won't do - I
> need to have a json client running on a remote server.
>
> On Sat, Sep 18, 2010 at 6:16 PM, BJ Freeman<bj...@free-man.net> wrote:
>> how about an Iframe from the website to the login you want to use.
>> I use this a lot for backend Customer login for my portal, on clients
>> websites that ofbiz is the back end but not the ecommerce provider.
>>
>> chris snow sent the following on 9/18/2010 9:32 AM:
>>>
>>> Are there any instructions for connecting to ofbiz using
>>> javascript+json from an external web application. I would like to
>>> make a call to a service/controller that requires authentication.
>>>
>>> Many thanks,
>>>
>>> Chris
>>>
>>
>>
>
Re: using json
Posted by chris snow <ch...@gmail.com>.
Hi BJ, thanks for the response. Unfortunately, an iframe won't do - I
need to have a json client running on a remote server.
On Sat, Sep 18, 2010 at 6:16 PM, BJ Freeman <bj...@free-man.net> wrote:
> how about an Iframe from the website to the login you want to use.
> I use this a lot for backend Customer login for my portal, on clients
> websites that ofbiz is the back end but not the ecommerce provider.
>
> chris snow sent the following on 9/18/2010 9:32 AM:
>>
>> Are there any instructions for connecting to ofbiz using
>> javascript+json from an external web application. I would like to
>> make a call to a service/controller that requires authentication.
>>
>> Many thanks,
>>
>> Chris
>>
>
>
Re: using json
Posted by BJ Freeman <bj...@free-man.net>.
how about an Iframe from the website to the login you want to use.
I use this a lot for backend Customer login for my portal, on clients
websites that ofbiz is the back end but not the ecommerce provider.
chris snow sent the following on 9/18/2010 9:32 AM:
> Are there any instructions for connecting to ofbiz using
> javascript+json from an external web application. I would like to
> make a call to a service/controller that requires authentication.
>
> Many thanks,
>
> Chris
>