Users - Formatting Data in XML or JSON

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

Users - Formatting Data in XML or JSON

Vinay Agarwal

Hello,

 

I want to send a somewhat complex data structure (made up of Maps and Lists) from server to client in either XML or JSON format as response to xmlHttpRequest using a regular request url. Since OFBiz already does SOAP, it has functionality to convert data structure into XML. Can it be used to create generalized XML output? I would appreciate your suggestions.

 

Thanks in advance,

Vinay Agarwal

 


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Formatting Data in XML or JSON

David E. Jones

You could try the XmlSerializer class in OFBiz to see if it does what you need/want. Of course, then you need something on the other side in JavaScript to do something with the XML. You might want to consider more special purpose formats to make that easier. Of course, I have no experience with this... just some thoughts on it.

-David


Vinay Agarwal wrote:

> Hello,
>
>  
>
> I want to send a somewhat complex data structure (made up of Maps and
> Lists) from server to client in either XML or JSON format as response to
> xmlHttpRequest using a regular request url. Since OFBiz already does
> SOAP, it has functionality to convert data structure into XML. Can it be
> used to create generalized XML output? I would appreciate your suggestions.
>
>  
>
> Thanks in advance,
>
> Vinay Agarwal
>
>  
>
>
> ------------------------------------------------------------------------
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Formatting Data in XML or JSON

Vinay Agarwal
David,

You are right that deserialization of a somewhat complex data structure,
from xml to javascript, can be complex. On the other hand, JSON can be
deserialized in javascript by a single statement. Therfore, I am looking to
use org.json library to serialize java objects for now. Another library
JSON-RPC-Java (http://oss.metaparadigm.com/jsonrpc/) makes data transfer
completely transparent but possibly requires interfacing with servlet.

Regards,
Vinay Agarwal


-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
On Behalf Of David E. Jones
Sent: Friday, June 09, 2006 2:49 PM
To: OFBiz Users / Usage Discussion
Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON


You could try the XmlSerializer class in OFBiz to see if it does what you
need/want. Of course, then you need something on the other side in
JavaScript to do something with the XML. You might want to consider more
special purpose formats to make that easier. Of course, I have no experience
with this... just some thoughts on it.

-David


Vinay Agarwal wrote:
> Hello,
>
>  
>
> I want to send a somewhat complex data structure (made up of Maps and
> Lists) from server to client in either XML or JSON format as response
> to xmlHttpRequest using a regular request url. Since OFBiz already
> does SOAP, it has functionality to convert data structure into XML.
> Can it be used to create generalized XML output? I would appreciate your
suggestions.

>
>  
>
> Thanks in advance,
>
> Vinay Agarwal
>
>  
>
>
> ----------------------------------------------------------------------
> --
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Formatting Data in XML or JSON

BJ Freeman
In reply to this post by David E. Jones
There is already an RPC (RMI) framework in ofbiz.
what dos json-rpc offer, above this?
here is a non ofbiz example
http://java.sun.com/developer/onlineTraining/rmi/exercises/UMLDefinition/index.html

I have taken the sourceforge AS2 (java EDINT) and integrated it as a
separate application.  this is more so I can interface with VANS and
create my Own VANS between ofbiz installations.
http://faq.businessesnetwork.com/default.asp?Action=Cat&ID=15

Vinay Agarwal sent the following on 6/9/06 5:59 PM:

> David,
>
> You are right that deserialization of a somewhat complex data structure,
> from xml to javascript, can be complex. On the other hand, JSON can be
> deserialized in javascript by a single statement. Therfore, I am looking to
> use org.json library to serialize java objects for now. Another library
> JSON-RPC-Java (http://oss.metaparadigm.com/jsonrpc/) makes data transfer
> completely transparent but possibly requires interfacing with servlet.
>
> Regards,
> Vinay Agarwal
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> On Behalf Of David E. Jones
> Sent: Friday, June 09, 2006 2:49 PM
> To: OFBiz Users / Usage Discussion
> Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>
>
> You could try the XmlSerializer class in OFBiz to see if it does what you
> need/want. Of course, then you need something on the other side in
> JavaScript to do something with the XML. You might want to consider more
> special purpose formats to make that easier. Of course, I have no experience
> with this... just some thoughts on it.
>
> -David
>
>
> Vinay Agarwal wrote:
>
>>Hello,
>>
>>
>>
>>I want to send a somewhat complex data structure (made up of Maps and
>>Lists) from server to client in either XML or JSON format as response
>>to xmlHttpRequest using a regular request url. Since OFBiz already
>>does SOAP, it has functionality to convert data structure into XML.
>>Can it be used to create generalized XML output? I would appreciate your
>
> suggestions.
>
>>
>>
>>Thanks in advance,
>>
>>Vinay Agarwal
>>
>>
>>
>>
>>----------------------------------------------------------------------
>>--
>>
>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/users
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Formatting Data in XML or JSON

Vinay Agarwal
BJ,

JSON and JSON-RPC-Java can get information from server into the browser
without disturbing the current page. This can be used to implement richer UI
or simplify server to browser data transfer. I don't know if RMI can do
that.

Regards,
Vinay Agarwal


-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
On Behalf Of BJ Freeman
Sent: Friday, June 09, 2006 8:14 PM
To: OFBiz Users / Usage Discussion
Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON

There is already an RPC (RMI) framework in ofbiz.
what dos json-rpc offer, above this?
here is a non ofbiz example
http://java.sun.com/developer/onlineTraining/rmi/exercises/UMLDefinition/ind
ex.html

I have taken the sourceforge AS2 (java EDINT) and integrated it as a
separate application.  this is more so I can interface with VANS and create
my Own VANS between ofbiz installations.
http://faq.businessesnetwork.com/default.asp?Action=Cat&ID=15

Vinay Agarwal sent the following on 6/9/06 5:59 PM:
> David,
>
> You are right that deserialization of a somewhat complex data
> structure, from xml to javascript, can be complex. On the other hand,
> JSON can be deserialized in javascript by a single statement.
> Therfore, I am looking to use org.json library to serialize java
> objects for now. Another library JSON-RPC-Java
> (http://oss.metaparadigm.com/jsonrpc/) makes data transfer completely
transparent but possibly requires interfacing with servlet.

>
> Regards,
> Vinay Agarwal
>
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]
> On Behalf Of David E. Jones
> Sent: Friday, June 09, 2006 2:49 PM
> To: OFBiz Users / Usage Discussion
> Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>
>
> You could try the XmlSerializer class in OFBiz to see if it does what
> you need/want. Of course, then you need something on the other side in
> JavaScript to do something with the XML. You might want to consider
> more special purpose formats to make that easier. Of course, I have no
> experience with this... just some thoughts on it.
>
> -David
>
>
> Vinay Agarwal wrote:
>
>>Hello,
>>
>>
>>
>>I want to send a somewhat complex data structure (made up of Maps and
>>Lists) from server to client in either XML or JSON format as response
>>to xmlHttpRequest using a regular request url. Since OFBiz already
>>does SOAP, it has functionality to convert data structure into XML.
>>Can it be used to create generalized XML output? I would appreciate
>>your
>
> suggestions.
>
>>
>>
>>Thanks in advance,
>>
>>Vinay Agarwal
>>
>>
>>
>>
>>----------------------------------------------------------------------
>>--
>>
>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/users
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Formatting Data in XML or JSON

Andrew Sykes
RMI could do it if we had a client...

- Andrew

On Sat, 2006-06-10 at 07:45 -0700, Vinay Agarwal wrote:

> BJ,
>
> JSON and JSON-RPC-Java can get information from server into the browser
> without disturbing the current page. This can be used to implement richer UI
> or simplify server to browser data transfer. I don't know if RMI can do
> that.
>
> Regards,
> Vinay Agarwal
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> On Behalf Of BJ Freeman
> Sent: Friday, June 09, 2006 8:14 PM
> To: OFBiz Users / Usage Discussion
> Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>
> There is already an RPC (RMI) framework in ofbiz.
> what dos json-rpc offer, above this?
> here is a non ofbiz example
> http://java.sun.com/developer/onlineTraining/rmi/exercises/UMLDefinition/ind
> ex.html
>
> I have taken the sourceforge AS2 (java EDINT) and integrated it as a
> separate application.  this is more so I can interface with VANS and create
> my Own VANS between ofbiz installations.
> http://faq.businessesnetwork.com/default.asp?Action=Cat&ID=15
>
> Vinay Agarwal sent the following on 6/9/06 5:59 PM:
> > David,
> >
> > You are right that deserialization of a somewhat complex data
> > structure, from xml to javascript, can be complex. On the other hand,
> > JSON can be deserialized in javascript by a single statement.
> > Therfore, I am looking to use org.json library to serialize java
> > objects for now. Another library JSON-RPC-Java
> > (http://oss.metaparadigm.com/jsonrpc/) makes data transfer completely
> transparent but possibly requires interfacing with servlet.
> >
> > Regards,
> > Vinay Agarwal
> >
> >
> > -----Original Message-----
> > From: [hidden email]
> > [mailto:[hidden email]]
> > On Behalf Of David E. Jones
> > Sent: Friday, June 09, 2006 2:49 PM
> > To: OFBiz Users / Usage Discussion
> > Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
> >
> >
> > You could try the XmlSerializer class in OFBiz to see if it does what
> > you need/want. Of course, then you need something on the other side in
> > JavaScript to do something with the XML. You might want to consider
> > more special purpose formats to make that easier. Of course, I have no
> > experience with this... just some thoughts on it.
> >
> > -David
> >
> >
> > Vinay Agarwal wrote:
> >
> >>Hello,
> >>
> >>
> >>
> >>I want to send a somewhat complex data structure (made up of Maps and
> >>Lists) from server to client in either XML or JSON format as response
> >>to xmlHttpRequest using a regular request url. Since OFBiz already
> >>does SOAP, it has functionality to convert data structure into XML.
> >>Can it be used to create generalized XML output? I would appreciate
> >>your
> >
> > suggestions.
> >
> >>
> >>
> >>Thanks in advance,
> >>
> >>Vinay Agarwal
> >>
> >>
> >>
> >>
> >>----------------------------------------------------------------------
> >>--
> >>
> >>
> >>_______________________________________________
> >>Users mailing list
> >>[hidden email]
> >>http://lists.ofbiz.org/mailman/listinfo/users
> >
> >  
> > _______________________________________________
> > Users mailing list
> > [hidden email]
> > http://lists.ofbiz.org/mailman/listinfo/users
> >  
> > _______________________________________________
> > Users mailing list
> > [hidden email]
> > http://lists.ofbiz.org/mailman/listinfo/users
> >
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Formatting Data in XML or JSON

BJ Freeman
In reply to this post by BJ Freeman
one question, if a page has sensitive data on it, could some one uses
the information in JSON, being java script, to gain access to the
complete database?
The one thing now is all data is created on the server side, so no
information about how to access the data is not available to the end user.

Also ofbiz now uses XUI for POS, I would think that a RMI client that
supports that would be something to consider.



Vinay Agarwal sent the following on 6/10/06 7:45 AM:

> BJ,
>
> JSON and JSON-RPC-Java can get information from server into the browser
> without disturbing the current page. This can be used to implement richer UI
> or simplify server to browser data transfer. I don't know if RMI can do
> that.
>
> Regards,
> Vinay Agarwal
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> On Behalf Of BJ Freeman
> Sent: Friday, June 09, 2006 8:14 PM
> To: OFBiz Users / Usage Discussion
> Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>
> There is already an RPC (RMI) framework in ofbiz.
> what dos json-rpc offer, above this?
> here is a non ofbiz example
> http://java.sun.com/developer/onlineTraining/rmi/exercises/UMLDefinition/ind
> ex.html
>
> I have taken the sourceforge AS2 (java EDINT) and integrated it as a
> separate application.  this is more so I can interface with VANS and create
> my Own VANS between ofbiz installations.
> http://faq.businessesnetwork.com/default.asp?Action=Cat&ID=15
>
> Vinay Agarwal sent the following on 6/9/06 5:59 PM:
>
>>David,
>>
>>You are right that deserialization of a somewhat complex data
>>structure, from xml to javascript, can be complex. On the other hand,
>>JSON can be deserialized in javascript by a single statement.
>>Therfore, I am looking to use org.json library to serialize java
>>objects for now. Another library JSON-RPC-Java
>>(http://oss.metaparadigm.com/jsonrpc/) makes data transfer completely
>
> transparent but possibly requires interfacing with servlet.
>
>>Regards,
>>Vinay Agarwal
>>
>>
>>-----Original Message-----
>>From: [hidden email]
>>[mailto:[hidden email]]
>>On Behalf Of David E. Jones
>>Sent: Friday, June 09, 2006 2:49 PM
>>To: OFBiz Users / Usage Discussion
>>Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>>
>>
>>You could try the XmlSerializer class in OFBiz to see if it does what
>>you need/want. Of course, then you need something on the other side in
>>JavaScript to do something with the XML. You might want to consider
>>more special purpose formats to make that easier. Of course, I have no
>>experience with this... just some thoughts on it.
>>
>>-David
>>
>>
>>Vinay Agarwal wrote:
>>
>>
>>>Hello,
>>>
>>>
>>>
>>>I want to send a somewhat complex data structure (made up of Maps and
>>>Lists) from server to client in either XML or JSON format as response
>>>to xmlHttpRequest using a regular request url. Since OFBiz already
>>>does SOAP, it has functionality to convert data structure into XML.
>>>Can it be used to create generalized XML output? I would appreciate
>>>your
>>
>>suggestions.
>>
>>
>>>
>>>Thanks in advance,
>>>
>>>Vinay Agarwal
>>>
>>>
>>>
>>>
>>>----------------------------------------------------------------------
>>>--
>>>
>>>
>>>_______________________________________________
>>>Users mailing list
>>>[hidden email]
>>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Formatting Data in XML or JSON

Vinay Agarwal
BJ,

JSON-RPC-Java can only call existing functions on the server which should
authenticate requests like any other type of call.

Regarding XUI for POS, unfortunately I am not familiar with it so I don't
know whether it can do the same thing.

>From my research yesterday, I also get feeling that this kind of
communication (AJAX) is clearly moving from XML encoding to JSON encoding
because of its ease of use in Javascript. I saw Yahoo services becoming
available with JSON encoding and IBM using it in its Eclipse plugin for AJAX
(through dojo toolset).

Regards,
Vinay Agarwal


-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
On Behalf Of BJ Freeman
Sent: Saturday, June 10, 2006 8:19 AM
To: OFBiz Users / Usage Discussion
Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON

one question, if a page has sensitive data on it, could some one uses the
information in JSON, being java script, to gain access to the complete
database?
The one thing now is all data is created on the server side, so no
information about how to access the data is not available to the end user.

Also ofbiz now uses XUI for POS, I would think that a RMI client that
supports that would be something to consider.



Vinay Agarwal sent the following on 6/10/06 7:45 AM:
> BJ,
>
> JSON and JSON-RPC-Java can get information from server into the browser
> without disturbing the current page. This can be used to implement richer
UI

> or simplify server to browser data transfer. I don't know if RMI can do
> that.
>
> Regards,
> Vinay Agarwal
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> On Behalf Of BJ Freeman
> Sent: Friday, June 09, 2006 8:14 PM
> To: OFBiz Users / Usage Discussion
> Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>
> There is already an RPC (RMI) framework in ofbiz.
> what dos json-rpc offer, above this?
> here is a non ofbiz example
>
http://java.sun.com/developer/onlineTraining/rmi/exercises/UMLDefinition/ind
> ex.html
>
> I have taken the sourceforge AS2 (java EDINT) and integrated it as a
> separate application.  this is more so I can interface with VANS and
create

> my Own VANS between ofbiz installations.
> http://faq.businessesnetwork.com/default.asp?Action=Cat&ID=15
>
> Vinay Agarwal sent the following on 6/9/06 5:59 PM:
>
>>David,
>>
>>You are right that deserialization of a somewhat complex data
>>structure, from xml to javascript, can be complex. On the other hand,
>>JSON can be deserialized in javascript by a single statement.
>>Therfore, I am looking to use org.json library to serialize java
>>objects for now. Another library JSON-RPC-Java
>>(http://oss.metaparadigm.com/jsonrpc/) makes data transfer completely
>
> transparent but possibly requires interfacing with servlet.
>
>>Regards,
>>Vinay Agarwal
>>
>>
>>-----Original Message-----
>>From: [hidden email]
>>[mailto:[hidden email]]
>>On Behalf Of David E. Jones
>>Sent: Friday, June 09, 2006 2:49 PM
>>To: OFBiz Users / Usage Discussion
>>Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>>
>>
>>You could try the XmlSerializer class in OFBiz to see if it does what
>>you need/want. Of course, then you need something on the other side in
>>JavaScript to do something with the XML. You might want to consider
>>more special purpose formats to make that easier. Of course, I have no
>>experience with this... just some thoughts on it.
>>
>>-David
>>
>>
>>Vinay Agarwal wrote:
>>
>>
>>>Hello,
>>>
>>>
>>>
>>>I want to send a somewhat complex data structure (made up of Maps and
>>>Lists) from server to client in either XML or JSON format as response
>>>to xmlHttpRequest using a regular request url. Since OFBiz already
>>>does SOAP, it has functionality to convert data structure into XML.
>>>Can it be used to create generalized XML output? I would appreciate
>>>your
>>
>>suggestions.
>>
>>
>>>
>>>Thanks in advance,
>>>
>>>Vinay Agarwal
>>>
>>>
>>>
>>>
>>>----------------------------------------------------------------------
>>>--
>>>
>>>
>>>_______________________________________________
>>>Users mailing list
>>>[hidden email]
>>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Formatting Data in XML or JSON

Andrew Sykes
In reply to this post by BJ Freeman
BJ,

Do you mean a full blown XUI based OFBiz client? - sounds like a big
job! :-)

- Andrew

On Sat, 2006-06-10 at 08:19 -0700, BJ Freeman wrote:

> one question, if a page has sensitive data on it, could some one uses
> the information in JSON, being java script, to gain access to the
> complete database?
> The one thing now is all data is created on the server side, so no
> information about how to access the data is not available to the end user.
>
> Also ofbiz now uses XUI for POS, I would think that a RMI client that
> supports that would be something to consider.
>
>
>
> Vinay Agarwal sent the following on 6/10/06 7:45 AM:
> > BJ,
> >
> > JSON and JSON-RPC-Java can get information from server into the browser
> > without disturbing the current page. This can be used to implement richer UI
> > or simplify server to browser data transfer. I don't know if RMI can do
> > that.
> >
> > Regards,
> > Vinay Agarwal
> >
> >
> > -----Original Message-----
> > From: [hidden email] [mailto:[hidden email]]
> > On Behalf Of BJ Freeman
> > Sent: Friday, June 09, 2006 8:14 PM
> > To: OFBiz Users / Usage Discussion
> > Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
> >
> > There is already an RPC (RMI) framework in ofbiz.
> > what dos json-rpc offer, above this?
> > here is a non ofbiz example
> > http://java.sun.com/developer/onlineTraining/rmi/exercises/UMLDefinition/ind
> > ex.html
> >
> > I have taken the sourceforge AS2 (java EDINT) and integrated it as a
> > separate application.  this is more so I can interface with VANS and create
> > my Own VANS between ofbiz installations.
> > http://faq.businessesnetwork.com/default.asp?Action=Cat&ID=15
> >
> > Vinay Agarwal sent the following on 6/9/06 5:59 PM:
> >
> >>David,
> >>
> >>You are right that deserialization of a somewhat complex data
> >>structure, from xml to javascript, can be complex. On the other hand,
> >>JSON can be deserialized in javascript by a single statement.
> >>Therfore, I am looking to use org.json library to serialize java
> >>objects for now. Another library JSON-RPC-Java
> >>(http://oss.metaparadigm.com/jsonrpc/) makes data transfer completely
> >
> > transparent but possibly requires interfacing with servlet.
> >
> >>Regards,
> >>Vinay Agarwal
> >>
> >>
> >>-----Original Message-----
> >>From: [hidden email]
> >>[mailto:[hidden email]]
> >>On Behalf Of David E. Jones
> >>Sent: Friday, June 09, 2006 2:49 PM
> >>To: OFBiz Users / Usage Discussion
> >>Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
> >>
> >>
> >>You could try the XmlSerializer class in OFBiz to see if it does what
> >>you need/want. Of course, then you need something on the other side in
> >>JavaScript to do something with the XML. You might want to consider
> >>more special purpose formats to make that easier. Of course, I have no
> >>experience with this... just some thoughts on it.
> >>
> >>-David
> >>
> >>
> >>Vinay Agarwal wrote:
> >>
> >>
> >>>Hello,
> >>>
> >>>
> >>>
> >>>I want to send a somewhat complex data structure (made up of Maps and
> >>>Lists) from server to client in either XML or JSON format as response
> >>>to xmlHttpRequest using a regular request url. Since OFBiz already
> >>>does SOAP, it has functionality to convert data structure into XML.
> >>>Can it be used to create generalized XML output? I would appreciate
> >>>your
> >>
> >>suggestions.
> >>
> >>
> >>>
> >>>Thanks in advance,
> >>>
> >>>Vinay Agarwal
> >>>
> >>>
> >>>
> >>>
> >>>----------------------------------------------------------------------
> >>>--
> >>>
> >>>
> >>>_______________________________________________
> >>>Users mailing list
> >>>[hidden email]
> >>>http://lists.ofbiz.org/mailman/listinfo/users
> >>
> >>
> >>_______________________________________________
> >>Users mailing list
> >>[hidden email]
> >>http://lists.ofbiz.org/mailman/listinfo/users
> >>
> >>_______________________________________________
> >>Users mailing list
> >>[hidden email]
> >>http://lists.ofbiz.org/mailman/listinfo/users
> >>
> >
> >  
> > _______________________________________________
> > Users mailing list
> > [hidden email]
> > http://lists.ofbiz.org/mailman/listinfo/users
> >  
> > _______________________________________________
> > Users mailing list
> > [hidden email]
> > http://lists.ofbiz.org/mailman/listinfo/users
> >
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Formatting Data in XML or JSON

BJ Freeman
In reply to this post by BJ Freeman
Java script by it very nature is open to anyone that can see the source
code of an HTML page.
so if you have the object that is declaring how to access a field of
data from the source, all someone has to do is change the quest to get
more data in the same area.
I would think look at this from a security point of view is very
important, since ofbiz carries Financial and Employee records.
My point being that all data retrieval should be done on the servers
side or thru communication that has to have a certificate at both ends.

It world seem that using an XSL to transform data would be just as
simple as JSON with out introduction another layer.

Vinay Agarwal sent the following on 6/10/06 8:43 AM:

> BJ,
>
> JSON-RPC-Java can only call existing functions on the server which should
> authenticate requests like any other type of call.
>
> Regarding XUI for POS, unfortunately I am not familiar with it so I don't
> know whether it can do the same thing.
>
>>From my research yesterday, I also get feeling that this kind of
> communication (AJAX) is clearly moving from XML encoding to JSON encoding
> because of its ease of use in Javascript. I saw Yahoo services becoming
> available with JSON encoding and IBM using it in its Eclipse plugin for AJAX
> (through dojo toolset).
>
> Regards,
> Vinay Agarwal
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> On Behalf Of BJ Freeman
> Sent: Saturday, June 10, 2006 8:19 AM
> To: OFBiz Users / Usage Discussion
> Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>
> one question, if a page has sensitive data on it, could some one uses the
> information in JSON, being java script, to gain access to the complete
> database?
> The one thing now is all data is created on the server side, so no
> information about how to access the data is not available to the end user.
>
> Also ofbiz now uses XUI for POS, I would think that a RMI client that
> supports that would be something to consider.
>
>
>
> Vinay Agarwal sent the following on 6/10/06 7:45 AM:
>
>>BJ,
>>
>>JSON and JSON-RPC-Java can get information from server into the browser
>>without disturbing the current page. This can be used to implement richer
>
> UI
>
>>or simplify server to browser data transfer. I don't know if RMI can do
>>that.
>>
>>Regards,
>>Vinay Agarwal
>>
>>
>>-----Original Message-----
>>From: [hidden email] [mailto:[hidden email]]
>>On Behalf Of BJ Freeman
>>Sent: Friday, June 09, 2006 8:14 PM
>>To: OFBiz Users / Usage Discussion
>>Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>>
>>There is already an RPC (RMI) framework in ofbiz.
>>what dos json-rpc offer, above this?
>>here is a non ofbiz example
>>
>
> http://java.sun.com/developer/onlineTraining/rmi/exercises/UMLDefinition/ind
>
>>ex.html
>>
>>I have taken the sourceforge AS2 (java EDINT) and integrated it as a
>>separate application.  this is more so I can interface with VANS and
>
> create
>
>>my Own VANS between ofbiz installations.
>>http://faq.businessesnetwork.com/default.asp?Action=Cat&ID=15
>>
>>Vinay Agarwal sent the following on 6/9/06 5:59 PM:
>>
>>
>>>David,
>>>
>>>You are right that deserialization of a somewhat complex data
>>>structure, from xml to javascript, can be complex. On the other hand,
>>>JSON can be deserialized in javascript by a single statement.
>>>Therfore, I am looking to use org.json library to serialize java
>>>objects for now. Another library JSON-RPC-Java
>>>(http://oss.metaparadigm.com/jsonrpc/) makes data transfer completely
>>
>>transparent but possibly requires interfacing with servlet.
>>
>>
>>>Regards,
>>>Vinay Agarwal
>>>
>>>
>>>-----Original Message-----
>>>From: [hidden email]
>>>[mailto:[hidden email]]
>>>On Behalf Of David E. Jones
>>>Sent: Friday, June 09, 2006 2:49 PM
>>>To: OFBiz Users / Usage Discussion
>>>Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>>>
>>>
>>>You could try the XmlSerializer class in OFBiz to see if it does what
>>>you need/want. Of course, then you need something on the other side in
>>>JavaScript to do something with the XML. You might want to consider
>>>more special purpose formats to make that easier. Of course, I have no
>>>experience with this... just some thoughts on it.
>>>
>>>-David
>>>
>>>
>>>Vinay Agarwal wrote:
>>>
>>>
>>>
>>>>Hello,
>>>>
>>>>
>>>>
>>>>I want to send a somewhat complex data structure (made up of Maps and
>>>>Lists) from server to client in either XML or JSON format as response
>>>>to xmlHttpRequest using a regular request url. Since OFBiz already
>>>>does SOAP, it has functionality to convert data structure into XML.
>>>>Can it be used to create generalized XML output? I would appreciate
>>>>your
>>>
>>>suggestions.
>>>
>>>
>>>
>>>>Thanks in advance,
>>>>
>>>>Vinay Agarwal
>>>>
>>>>
>>>>
>>>>
>>>>----------------------------------------------------------------------
>>>>--
>>>>
>>>>
>>>>_______________________________________________
>>>>Users mailing list
>>>>[hidden email]
>>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>
>>>
>>>_______________________________________________
>>>Users mailing list
>>>[hidden email]
>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>
>>>_______________________________________________
>>>Users mailing list
>>>[hidden email]
>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>
>>
>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Formatting Data in XML or JSON

BJ Freeman
In reply to this post by Andrew Sykes
This is going back to my efforts to using Swing client.
what would have to happen to make this viable, is a complier that
converted widgets to XUI. At this point I don't have any effort put into
this other than my Swing Clients, that get generated from an Xml file.


Andrew Sykes sent the following on 6/10/06 8:46 AM:

> BJ,
>
> Do you mean a full blown XUI based OFBiz client? - sounds like a big
> job! :-)
>
> - Andrew
>
> On Sat, 2006-06-10 at 08:19 -0700, BJ Freeman wrote:
>
>>one question, if a page has sensitive data on it, could some one uses
>>the information in JSON, being java script, to gain access to the
>>complete database?
>>The one thing now is all data is created on the server side, so no
>>information about how to access the data is not available to the end user.
>>
>>Also ofbiz now uses XUI for POS, I would think that a RMI client that
>>supports that would be something to consider.
>>
>>
>>
>>Vinay Agarwal sent the following on 6/10/06 7:45 AM:
>>
>>>BJ,
>>>
>>>JSON and JSON-RPC-Java can get information from server into the browser
>>>without disturbing the current page. This can be used to implement richer UI
>>>or simplify server to browser data transfer. I don't know if RMI can do
>>>that.
>>>
>>>Regards,
>>>Vinay Agarwal
>>>
>>>
>>>-----Original Message-----
>>>From: [hidden email] [mailto:[hidden email]]
>>>On Behalf Of BJ Freeman
>>>Sent: Friday, June 09, 2006 8:14 PM
>>>To: OFBiz Users / Usage Discussion
>>>Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>>>
>>>There is already an RPC (RMI) framework in ofbiz.
>>>what dos json-rpc offer, above this?
>>>here is a non ofbiz example
>>>http://java.sun.com/developer/onlineTraining/rmi/exercises/UMLDefinition/ind
>>>ex.html
>>>
>>>I have taken the sourceforge AS2 (java EDINT) and integrated it as a
>>>separate application.  this is more so I can interface with VANS and create
>>>my Own VANS between ofbiz installations.
>>>http://faq.businessesnetwork.com/default.asp?Action=Cat&ID=15
>>>
>>>Vinay Agarwal sent the following on 6/9/06 5:59 PM:
>>>
>>>
>>>>David,
>>>>
>>>>You are right that deserialization of a somewhat complex data
>>>>structure, from xml to javascript, can be complex. On the other hand,
>>>>JSON can be deserialized in javascript by a single statement.
>>>>Therfore, I am looking to use org.json library to serialize java
>>>>objects for now. Another library JSON-RPC-Java
>>>>(http://oss.metaparadigm.com/jsonrpc/) makes data transfer completely
>>>
>>>transparent but possibly requires interfacing with servlet.
>>>
>>>
>>>>Regards,
>>>>Vinay Agarwal
>>>>
>>>>
>>>>-----Original Message-----
>>>>From: [hidden email]
>>>>[mailto:[hidden email]]
>>>>On Behalf Of David E. Jones
>>>>Sent: Friday, June 09, 2006 2:49 PM
>>>>To: OFBiz Users / Usage Discussion
>>>>Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>>>>
>>>>
>>>>You could try the XmlSerializer class in OFBiz to see if it does what
>>>>you need/want. Of course, then you need something on the other side in
>>>>JavaScript to do something with the XML. You might want to consider
>>>>more special purpose formats to make that easier. Of course, I have no
>>>>experience with this... just some thoughts on it.
>>>>
>>>>-David
>>>>
>>>>
>>>>Vinay Agarwal wrote:
>>>>
>>>>
>>>>
>>>>>Hello,
>>>>>
>>>>>
>>>>>
>>>>>I want to send a somewhat complex data structure (made up of Maps and
>>>>>Lists) from server to client in either XML or JSON format as response
>>>>>to xmlHttpRequest using a regular request url. Since OFBiz already
>>>>>does SOAP, it has functionality to convert data structure into XML.
>>>>>Can it be used to create generalized XML output? I would appreciate
>>>>>your
>>>>
>>>>suggestions.
>>>>
>>>>
>>>>
>>>>>Thanks in advance,
>>>>>
>>>>>Vinay Agarwal
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>----------------------------------------------------------------------
>>>>>--
>>>>>
>>>>>
>>>>>_______________________________________________
>>>>>Users mailing list
>>>>>[hidden email]
>>>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>>
>>>>
>>>>_______________________________________________
>>>>Users mailing list
>>>>[hidden email]
>>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>>
>>>>_______________________________________________
>>>>Users mailing list
>>>>[hidden email]
>>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>>
>>>
>>>
>>>_______________________________________________
>>>Users mailing list
>>>[hidden email]
>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>
>>>_______________________________________________
>>>Users mailing list
>>>[hidden email]
>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>
>>
>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Formatting Data in XML or JSON

Andrew Sykes
Do you think it's necessary to use XUI at all for this?

Sounds like Widget to Swing would be more efficient. In fact it sounds
like that's pretty much what you're doing. Just the wrong kind of
XML :-)

On Sat, 2006-06-10 at 09:10 -0700, BJ Freeman wrote:

> This is going back to my efforts to using Swing client.
> what would have to happen to make this viable, is a complier that
> converted widgets to XUI. At this point I don't have any effort put into
> this other than my Swing Clients, that get generated from an Xml file.
>
>
> Andrew Sykes sent the following on 6/10/06 8:46 AM:
> > BJ,
> >
> > Do you mean a full blown XUI based OFBiz client? - sounds like a big
> > job! :-)
> >
> > - Andrew
> >
> > On Sat, 2006-06-10 at 08:19 -0700, BJ Freeman wrote:
> >
> >>one question, if a page has sensitive data on it, could some one uses
> >>the information in JSON, being java script, to gain access to the
> >>complete database?
> >>The one thing now is all data is created on the server side, so no
> >>information about how to access the data is not available to the end user.
> >>
> >>Also ofbiz now uses XUI for POS, I would think that a RMI client that
> >>supports that would be something to consider.
> >>
> >>
> >>
> >>Vinay Agarwal sent the following on 6/10/06 7:45 AM:
> >>
> >>>BJ,
> >>>
> >>>JSON and JSON-RPC-Java can get information from server into the browser
> >>>without disturbing the current page. This can be used to implement richer UI
> >>>or simplify server to browser data transfer. I don't know if RMI can do
> >>>that.
> >>>
> >>>Regards,
> >>>Vinay Agarwal
> >>>
> >>>
> >>>-----Original Message-----
> >>>From: [hidden email] [mailto:[hidden email]]
> >>>On Behalf Of BJ Freeman
> >>>Sent: Friday, June 09, 2006 8:14 PM
> >>>To: OFBiz Users / Usage Discussion
> >>>Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
> >>>
> >>>There is already an RPC (RMI) framework in ofbiz.
> >>>what dos json-rpc offer, above this?
> >>>here is a non ofbiz example
> >>>http://java.sun.com/developer/onlineTraining/rmi/exercises/UMLDefinition/ind
> >>>ex.html
> >>>
> >>>I have taken the sourceforge AS2 (java EDINT) and integrated it as a
> >>>separate application.  this is more so I can interface with VANS and create
> >>>my Own VANS between ofbiz installations.
> >>>http://faq.businessesnetwork.com/default.asp?Action=Cat&ID=15
> >>>
> >>>Vinay Agarwal sent the following on 6/9/06 5:59 PM:
> >>>
> >>>
> >>>>David,
> >>>>
> >>>>You are right that deserialization of a somewhat complex data
> >>>>structure, from xml to javascript, can be complex. On the other hand,
> >>>>JSON can be deserialized in javascript by a single statement.
> >>>>Therfore, I am looking to use org.json library to serialize java
> >>>>objects for now. Another library JSON-RPC-Java
> >>>>(http://oss.metaparadigm.com/jsonrpc/) makes data transfer completely
> >>>
> >>>transparent but possibly requires interfacing with servlet.
> >>>
> >>>
> >>>>Regards,
> >>>>Vinay Agarwal
> >>>>
> >>>>
> >>>>-----Original Message-----
> >>>>From: [hidden email]
> >>>>[mailto:[hidden email]]
> >>>>On Behalf Of David E. Jones
> >>>>Sent: Friday, June 09, 2006 2:49 PM
> >>>>To: OFBiz Users / Usage Discussion
> >>>>Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
> >>>>
> >>>>
> >>>>You could try the XmlSerializer class in OFBiz to see if it does what
> >>>>you need/want. Of course, then you need something on the other side in
> >>>>JavaScript to do something with the XML. You might want to consider
> >>>>more special purpose formats to make that easier. Of course, I have no
> >>>>experience with this... just some thoughts on it.
> >>>>
> >>>>-David
> >>>>
> >>>>
> >>>>Vinay Agarwal wrote:
> >>>>
> >>>>
> >>>>
> >>>>>Hello,
> >>>>>
> >>>>>
> >>>>>
> >>>>>I want to send a somewhat complex data structure (made up of Maps and
> >>>>>Lists) from server to client in either XML or JSON format as response
> >>>>>to xmlHttpRequest using a regular request url. Since OFBiz already
> >>>>>does SOAP, it has functionality to convert data structure into XML.
> >>>>>Can it be used to create generalized XML output? I would appreciate
> >>>>>your
> >>>>
> >>>>suggestions.
> >>>>
> >>>>
> >>>>
> >>>>>Thanks in advance,
> >>>>>
> >>>>>Vinay Agarwal
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>----------------------------------------------------------------------
> >>>>>--
> >>>>>
> >>>>>
> >>>>>_______________________________________________
> >>>>>Users mailing list
> >>>>>[hidden email]
> >>>>>http://lists.ofbiz.org/mailman/listinfo/users
> >>>>
> >>>>
> >>>>_______________________________________________
> >>>>Users mailing list
> >>>>[hidden email]
> >>>>http://lists.ofbiz.org/mailman/listinfo/users
> >>>>
> >>>>_______________________________________________
> >>>>Users mailing list
> >>>>[hidden email]
> >>>>http://lists.ofbiz.org/mailman/listinfo/users
> >>>>
> >>>
> >>>
> >>>_______________________________________________
> >>>Users mailing list
> >>>[hidden email]
> >>>http://lists.ofbiz.org/mailman/listinfo/users
> >>>
> >>>_______________________________________________
> >>>Users mailing list
> >>>[hidden email]
> >>>http://lists.ofbiz.org/mailman/listinfo/users
> >>>
> >>
> >>
> >>_______________________________________________
> >>Users mailing list
> >>[hidden email]
> >>http://lists.ofbiz.org/mailman/listinfo/users
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
--
Kind Regards
Andrew Sykes <[hidden email]>
Sykes Development Ltd
http://www.sykesdevelopment.com

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Formatting Data in XML or JSON

BJ Freeman
I have a XSL that coverts widgets to the xml the current complier uses.
there is a lot lost. so it is a work in progress.
My thought on XUI was to stay in the confines of what is in ofbiz.
But that is a project for a couple of winters from now.


Andrew Sykes sent the following on 6/10/06 9:20 AM:

> Do you think it's necessary to use XUI at all for this?
>
> Sounds like Widget to Swing would be more efficient. In fact it sounds
> like that's pretty much what you're doing. Just the wrong kind of
> XML :-)
>
> On Sat, 2006-06-10 at 09:10 -0700, BJ Freeman wrote:
>
>>This is going back to my efforts to using Swing client.
>>what would have to happen to make this viable, is a complier that
>>converted widgets to XUI. At this point I don't have any effort put into
>>this other than my Swing Clients, that get generated from an Xml file.
>>
>>
>>Andrew Sykes sent the following on 6/10/06 8:46 AM:
>>
>>>BJ,
>>>
>>>Do you mean a full blown XUI based OFBiz client? - sounds like a big
>>>job! :-)
>>>
>>>- Andrew
>>>
>>>On Sat, 2006-06-10 at 08:19 -0700, BJ Freeman wrote:
>>>
>>>
>>>>one question, if a page has sensitive data on it, could some one uses
>>>>the information in JSON, being java script, to gain access to the
>>>>complete database?
>>>>The one thing now is all data is created on the server side, so no
>>>>information about how to access the data is not available to the end user.
>>>>
>>>>Also ofbiz now uses XUI for POS, I would think that a RMI client that
>>>>supports that would be something to consider.
>>>>
>>>>
>>>>
>>>>Vinay Agarwal sent the following on 6/10/06 7:45 AM:
>>>>
>>>>
>>>>>BJ,
>>>>>
>>>>>JSON and JSON-RPC-Java can get information from server into the browser
>>>>>without disturbing the current page. This can be used to implement richer UI
>>>>>or simplify server to browser data transfer. I don't know if RMI can do
>>>>>that.
>>>>>
>>>>>Regards,
>>>>>Vinay Agarwal
>>>>>
>>>>>
>>>>>-----Original Message-----
>>>>>From: [hidden email] [mailto:[hidden email]]
>>>>>On Behalf Of BJ Freeman
>>>>>Sent: Friday, June 09, 2006 8:14 PM
>>>>>To: OFBiz Users / Usage Discussion
>>>>>Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>>>>>
>>>>>There is already an RPC (RMI) framework in ofbiz.
>>>>>what dos json-rpc offer, above this?
>>>>>here is a non ofbiz example
>>>>>http://java.sun.com/developer/onlineTraining/rmi/exercises/UMLDefinition/ind
>>>>>ex.html
>>>>>
>>>>>I have taken the sourceforge AS2 (java EDINT) and integrated it as a
>>>>>separate application.  this is more so I can interface with VANS and create
>>>>>my Own VANS between ofbiz installations.
>>>>>http://faq.businessesnetwork.com/default.asp?Action=Cat&ID=15
>>>>>
>>>>>Vinay Agarwal sent the following on 6/9/06 5:59 PM:
>>>>>
>>>>>
>>>>>
>>>>>>David,
>>>>>>
>>>>>>You are right that deserialization of a somewhat complex data
>>>>>>structure, from xml to javascript, can be complex. On the other hand,
>>>>>>JSON can be deserialized in javascript by a single statement.
>>>>>>Therfore, I am looking to use org.json library to serialize java
>>>>>>objects for now. Another library JSON-RPC-Java
>>>>>>(http://oss.metaparadigm.com/jsonrpc/) makes data transfer completely
>>>>>
>>>>>transparent but possibly requires interfacing with servlet.
>>>>>
>>>>>
>>>>>
>>>>>>Regards,
>>>>>>Vinay Agarwal
>>>>>>
>>>>>>
>>>>>>-----Original Message-----
>>>>>>From: [hidden email]
>>>>>>[mailto:[hidden email]]
>>>>>>On Behalf Of David E. Jones
>>>>>>Sent: Friday, June 09, 2006 2:49 PM
>>>>>>To: OFBiz Users / Usage Discussion
>>>>>>Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>>>>>>
>>>>>>
>>>>>>You could try the XmlSerializer class in OFBiz to see if it does what
>>>>>>you need/want. Of course, then you need something on the other side in
>>>>>>JavaScript to do something with the XML. You might want to consider
>>>>>>more special purpose formats to make that easier. Of course, I have no
>>>>>>experience with this... just some thoughts on it.
>>>>>>
>>>>>>-David
>>>>>>
>>>>>>
>>>>>>Vinay Agarwal wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Hello,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>I want to send a somewhat complex data structure (made up of Maps and
>>>>>>>Lists) from server to client in either XML or JSON format as response
>>>>>>>to xmlHttpRequest using a regular request url. Since OFBiz already
>>>>>>>does SOAP, it has functionality to convert data structure into XML.
>>>>>>>Can it be used to create generalized XML output? I would appreciate
>>>>>>>your
>>>>>>
>>>>>>suggestions.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Thanks in advance,
>>>>>>>
>>>>>>>Vinay Agarwal
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>----------------------------------------------------------------------
>>>>>>>--
>>>>>>>
>>>>>>>
>>>>>>>_______________________________________________
>>>>>>>Users mailing list
>>>>>>>[hidden email]
>>>>>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>>>>
>>>>>>
>>>>>>_______________________________________________
>>>>>>Users mailing list
>>>>>>[hidden email]
>>>>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>>>>
>>>>>>_______________________________________________
>>>>>>Users mailing list
>>>>>>[hidden email]
>>>>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>>>>
>>>>>
>>>>>
>>>>>_______________________________________________
>>>>>Users mailing list
>>>>>[hidden email]
>>>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>>>
>>>>>_______________________________________________
>>>>>Users mailing list
>>>>>[hidden email]
>>>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>>>
>>>>
>>>>
>>>>_______________________________________________
>>>>Users mailing list
>>>>[hidden email]
>>>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Formatting Data in XML or JSON

BJ Freeman
In reply to this post by BJ Freeman
the Yahoo services deal mostly with Ecommerce store front (selling). It
  is not used for the backend data at all.
Most store owners use RTML to generate static HTML with CGI scripts,
that is then published to their store server.


Vinay Agarwal sent the following on 6/10/06 8:43 AM:

> BJ,
>
> JSON-RPC-Java can only call existing functions on the server which should
> authenticate requests like any other type of call.
>
> Regarding XUI for POS, unfortunately I am not familiar with it so I don't
> know whether it can do the same thing.
>
>>From my research yesterday, I also get feeling that this kind of
> communication (AJAX) is clearly moving from XML encoding to JSON encoding
> because of its ease of use in Javascript. I saw Yahoo services becoming
> available with JSON encoding and IBM using it in its Eclipse plugin for AJAX
> (through dojo toolset).
>
> Regards,
> Vinay Agarwal
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> On Behalf Of BJ Freeman
> Sent: Saturday, June 10, 2006 8:19 AM
> To: OFBiz Users / Usage Discussion
> Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>
> one question, if a page has sensitive data on it, could some one uses the
> information in JSON, being java script, to gain access to the complete
> database?
> The one thing now is all data is created on the server side, so no
> information about how to access the data is not available to the end user.
>
> Also ofbiz now uses XUI for POS, I would think that a RMI client that
> supports that would be something to consider.
>
>
>
> Vinay Agarwal sent the following on 6/10/06 7:45 AM:
>
>>BJ,
>>
>>JSON and JSON-RPC-Java can get information from server into the browser
>>without disturbing the current page. This can be used to implement richer
>
> UI
>
>>or simplify server to browser data transfer. I don't know if RMI can do
>>that.
>>
>>Regards,
>>Vinay Agarwal
>>
>>
>>-----Original Message-----
>>From: [hidden email] [mailto:[hidden email]]
>>On Behalf Of BJ Freeman
>>Sent: Friday, June 09, 2006 8:14 PM
>>To: OFBiz Users / Usage Discussion
>>Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>>
>>There is already an RPC (RMI) framework in ofbiz.
>>what dos json-rpc offer, above this?
>>here is a non ofbiz example
>>
>
> http://java.sun.com/developer/onlineTraining/rmi/exercises/UMLDefinition/ind
>
>>ex.html
>>
>>I have taken the sourceforge AS2 (java EDINT) and integrated it as a
>>separate application.  this is more so I can interface with VANS and
>
> create
>
>>my Own VANS between ofbiz installations.
>>http://faq.businessesnetwork.com/default.asp?Action=Cat&ID=15
>>
>>Vinay Agarwal sent the following on 6/9/06 5:59 PM:
>>
>>
>>>David,
>>>
>>>You are right that deserialization of a somewhat complex data
>>>structure, from xml to javascript, can be complex. On the other hand,
>>>JSON can be deserialized in javascript by a single statement.
>>>Therfore, I am looking to use org.json library to serialize java
>>>objects for now. Another library JSON-RPC-Java
>>>(http://oss.metaparadigm.com/jsonrpc/) makes data transfer completely
>>
>>transparent but possibly requires interfacing with servlet.
>>
>>
>>>Regards,
>>>Vinay Agarwal
>>>
>>>
>>>-----Original Message-----
>>>From: [hidden email]
>>>[mailto:[hidden email]]
>>>On Behalf Of David E. Jones
>>>Sent: Friday, June 09, 2006 2:49 PM
>>>To: OFBiz Users / Usage Discussion
>>>Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>>>
>>>
>>>You could try the XmlSerializer class in OFBiz to see if it does what
>>>you need/want. Of course, then you need something on the other side in
>>>JavaScript to do something with the XML. You might want to consider
>>>more special purpose formats to make that easier. Of course, I have no
>>>experience with this... just some thoughts on it.
>>>
>>>-David
>>>
>>>
>>>Vinay Agarwal wrote:
>>>
>>>
>>>
>>>>Hello,
>>>>
>>>>
>>>>
>>>>I want to send a somewhat complex data structure (made up of Maps and
>>>>Lists) from server to client in either XML or JSON format as response
>>>>to xmlHttpRequest using a regular request url. Since OFBiz already
>>>>does SOAP, it has functionality to convert data structure into XML.
>>>>Can it be used to create generalized XML output? I would appreciate
>>>>your
>>>
>>>suggestions.
>>>
>>>
>>>
>>>>Thanks in advance,
>>>>
>>>>Vinay Agarwal
>>>>
>>>>
>>>>
>>>>
>>>>----------------------------------------------------------------------
>>>>--
>>>>
>>>>
>>>>_______________________________________________
>>>>Users mailing list
>>>>[hidden email]
>>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>
>>>
>>>_______________________________________________
>>>Users mailing list
>>>[hidden email]
>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>
>>>_______________________________________________
>>>Users mailing list
>>>[hidden email]
>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>
>>
>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Formatting Data in XML or JSON

Vinay Agarwal
In reply to this post by BJ Freeman
BJ,

"My point being that all data retrieval should be done on the servers side
or thru communication that has to have a certificate at both ends."

This is exactly how it happens even on JSON-RPC-Java. The server function
being called is responsible for authentication just like a servlet request.

Vinay Agarwal


-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
On Behalf Of BJ Freeman
Sent: Saturday, June 10, 2006 9:07 AM
To: OFBiz Users / Usage Discussion
Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON

Java script by it very nature is open to anyone that can see the source code
of an HTML page.
so if you have the object that is declaring how to access a field of data
from the source, all someone has to do is change the quest to get more data
in the same area.
I would think look at this from a security point of view is very important,
since ofbiz carries Financial and Employee records.
My point being that all data retrieval should be done on the servers side or
thru communication that has to have a certificate at both ends.

It world seem that using an XSL to transform data would be just as simple as
JSON with out introduction another layer.

Vinay Agarwal sent the following on 6/10/06 8:43 AM:

> BJ,
>
> JSON-RPC-Java can only call existing functions on the server which
> should authenticate requests like any other type of call.
>
> Regarding XUI for POS, unfortunately I am not familiar with it so I
> don't know whether it can do the same thing.
>
>>From my research yesterday, I also get feeling that this kind of
> communication (AJAX) is clearly moving from XML encoding to JSON
> encoding because of its ease of use in Javascript. I saw Yahoo
> services becoming available with JSON encoding and IBM using it in its
> Eclipse plugin for AJAX (through dojo toolset).
>
> Regards,
> Vinay Agarwal
>
>
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]]
> On Behalf Of BJ Freeman
> Sent: Saturday, June 10, 2006 8:19 AM
> To: OFBiz Users / Usage Discussion
> Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>
> one question, if a page has sensitive data on it, could some one uses
> the information in JSON, being java script, to gain access to the
> complete database?
> The one thing now is all data is created on the server side, so no
> information about how to access the data is not available to the end user.
>
> Also ofbiz now uses XUI for POS, I would think that a RMI client that
> supports that would be something to consider.
>
>
>
> Vinay Agarwal sent the following on 6/10/06 7:45 AM:
>
>>BJ,
>>
>>JSON and JSON-RPC-Java can get information from server into the
>>browser without disturbing the current page. This can be used to
>>implement richer
>
> UI
>
>>or simplify server to browser data transfer. I don't know if RMI can
>>do that.
>>
>>Regards,
>>Vinay Agarwal
>>
>>
>>-----Original Message-----
>>From: [hidden email]
>>[mailto:[hidden email]]
>>On Behalf Of BJ Freeman
>>Sent: Friday, June 09, 2006 8:14 PM
>>To: OFBiz Users / Usage Discussion
>>Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>>
>>There is already an RPC (RMI) framework in ofbiz.
>>what dos json-rpc offer, above this?
>>here is a non ofbiz example
>>
>
> http://java.sun.com/developer/onlineTraining/rmi/exercises/UMLDefiniti
> on/ind
>
>>ex.html
>>
>>I have taken the sourceforge AS2 (java EDINT) and integrated it as a
>>separate application.  this is more so I can interface with VANS and
>
> create
>
>>my Own VANS between ofbiz installations.
>>http://faq.businessesnetwork.com/default.asp?Action=Cat&ID=15
>>
>>Vinay Agarwal sent the following on 6/9/06 5:59 PM:
>>
>>
>>>David,
>>>
>>>You are right that deserialization of a somewhat complex data
>>>structure, from xml to javascript, can be complex. On the other hand,
>>>JSON can be deserialized in javascript by a single statement.
>>>Therfore, I am looking to use org.json library to serialize java
>>>objects for now. Another library JSON-RPC-Java
>>>(http://oss.metaparadigm.com/jsonrpc/) makes data transfer completely
>>
>>transparent but possibly requires interfacing with servlet.
>>
>>
>>>Regards,
>>>Vinay Agarwal
>>>
>>>
>>>-----Original Message-----
>>>From: [hidden email]
>>>[mailto:[hidden email]]
>>>On Behalf Of David E. Jones
>>>Sent: Friday, June 09, 2006 2:49 PM
>>>To: OFBiz Users / Usage Discussion
>>>Subject: Re: [OFBiz] Users - Formatting Data in XML or JSON
>>>
>>>
>>>You could try the XmlSerializer class in OFBiz to see if it does what
>>>you need/want. Of course, then you need something on the other side
>>>in JavaScript to do something with the XML. You might want to
>>>consider more special purpose formats to make that easier. Of course,
>>>I have no experience with this... just some thoughts on it.
>>>
>>>-David
>>>
>>>
>>>Vinay Agarwal wrote:
>>>
>>>
>>>
>>>>Hello,
>>>>
>>>>
>>>>
>>>>I want to send a somewhat complex data structure (made up of Maps
>>>>and
>>>>Lists) from server to client in either XML or JSON format as
>>>>response to xmlHttpRequest using a regular request url. Since OFBiz
>>>>already does SOAP, it has functionality to convert data structure into
XML.

>>>>Can it be used to create generalized XML output? I would appreciate
>>>>your
>>>
>>>suggestions.
>>>
>>>
>>>
>>>>Thanks in advance,
>>>>
>>>>Vinay Agarwal
>>>>
>>>>
>>>>
>>>>
>>>>--------------------------------------------------------------------
>>>>--
>>>>--
>>>>
>>>>
>>>>_______________________________________________
>>>>Users mailing list
>>>>[hidden email]
>>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>
>>>
>>>_______________________________________________
>>>Users mailing list
>>>[hidden email]
>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>
>>>_______________________________________________
>>>Users mailing list
>>>[hidden email]
>>>http://lists.ofbiz.org/mailman/listinfo/users
>>>
>>
>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>>_______________________________________________
>>Users mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users