Is there a tool to convert LDAP data to Java bean based on schema
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Directory Project > Is there a tool to convert LDAP data to Java bean based on schema




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Is there a tool to convert LDAP data to Java bean based on schema  
Weijian Fang


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-10-07 06:11 PM

Hi,

Is there a tool to convert LDAP data to Java bean based on LDAP
schema? What I want is quite like what JAXB does on XML. Given an XML
schema, JAXB is able to generate Java classes that translate schema
compliant XML to Java beans and back. Now I have a LDAP schema, and a
LDAP server where data complies with the scheam. I need to read LDAP
data and conert to Java beans. I can do this manually. But if there is
a tool able to automatically generate the code based on the LDAP
schema, it wiil be great!

Is there such a tool? Any hint? Thanks a lot!

Cheers,

Weijian






[ Post a follow-up to this message ]



    Re: Is there a tool to convert LDAP data to Java bean based on schema  
Emmanuel Lecharny


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-10-07 06:11 PM

Weijian Fang a écrit :

> Hi,

Hi !

>
> Is there a tool to convert LDAP data to Java bean based on LDAP
> schema? What I want is quite like what JAXB does on XML. Given an XML
> schema, JAXB is able to generate Java classes that translate schema
> compliant XML to Java beans and back. Now I have a LDAP schema, and a
> LDAP server where data complies with the scheam. I need to read LDAP
> data and conert to Java beans. I can do this manually. But if there is
> a tool able to automatically generate the code based on the LDAP
> schema, it wiil be great!

I haven't heard of such a tool. But this would be pretty easy to write
one. We have a tool which converts Schema files to Ldif files, and one
could easily create something which generates Java classes.

Wanna try ?

Emmanuel







[ Post a follow-up to this message ]



    Re: Is there a tool to convert LDAP data to Java bean based on schema  
Stefan Zoerner


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-10-07 06:11 PM

Weijian Fang wrote:
> Is there a tool to convert LDAP data to Java bean based on LDAP
> schema? What I want is quite like what JAXB does on XML. Given an XML
> schema, JAXB is able to generate Java classes that translate schema
> compliant XML to Java beans and back. Now I have a LDAP schema, and a
> LDAP server where data complies with the scheam. I need to read LDAP
> data and conert to Java beans. I can do this manually. But if there is
> a tool able to automatically generate the code based on the LDAP
> schema, it wiil be great!
>
> Is there such a tool? Any hint? Thanks a lot!

I had a conversation after a talk on the JAX conference last month. A
participant had exactly the same question. We thought about generating
classes which implement the JNDI interfaces StateFactory and
ObjectFactory from schema elements. This would be a nice feature within
Directory LDAP Studio. But no, we have not implemented it yet. Perhaps
we should?

Greetings, Stefan









[ Post a follow-up to this message ]



    Re: Is there a tool to convert LDAP data to Java bean based on schema  
Weijian Fang


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-10-07 06:11 PM

Thanks for your quick response!

On 10/05/07, Emmanuel Lecharny <elecharny-1oDqGaOF3Lkdnm+yROfE0A@public.gmane.org> wrote:[vb
col=seagreen]
> Weijian Fang a =E9crit :
> 
>
> Hi !
> 
>
> I haven't heard of such a tool. But this would be pretty easy to write
> one. We have a tool which converts Schema files to Ldif files, and one
> could easily create something which generates Java classes.
>
> Wanna try ?
>[/vbcol]
Sure. Please send me the tool and possibly some doc. And please tell
me more hints on how to do it.

Thanks a lot!

Weijian


> Emmanuel
>
>






[ Post a follow-up to this message ]



    Re: Is there a tool to convert LDAP data to Java bean based on schema  
Ole Ersoy


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-11-07 12:11 AM

Hi Weijian,


Weijian Fang wrote:
> Hi,

SNIP

> I need to read LDAP
> data and convert to Java beans. I can do this manually. But if there is
> a tool able to automatically generate the code based on the LDAP
> schema, it wiil be great!

We are working on a DAS for LDAP
(See Tuscany RDB DAS)

This tool will be able to start with an XML Schema,
write the corresponding LDAP Schema, and perform CRUD with
SDO DataGraph instances (Effectively object graphs where
each object has a change summary for fast updates, etc.)

So you will be able to go from XML Schema to LDAP.
If you write a tool that generates the XML Schema
from the LDAP Schema, then you have what you are
searching for, once the DAS is complete.

You will be able to go from/to XML Schema/LDAP Schema,
and have a Apache Licensed (Tuscany) or Eclipse Licensed (EMF)
SDO API
to work with.

We are hanging on some Exceptions with the new
Schema Capabilities new in 1.5.0, so it may be a little
while before the DAS is done, but once these are cleared,
it should go very quickly.

Cheers,
- Ole







[ Post a follow-up to this message ]



    Re: Is there a tool to convert LDAP data to Java bean based on schema  
Alex Karasulu


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-16-07 12:11 AM

Hi Weijian,

As others have already confirmed such a tool does not exist in totality.
There
were some efforts out there with partial support for such functionality.

Spring LDAP (not really but handles some glue code)
Hibernate LDAP (incomplete)
Castor LDAP (some say it is complete but I have not tried it)

BTW it would be nice to start such an effort here.  There are several
interesting
approaches one of which was mentioned by Stefan Zoerner regarding he use of
Object and State factories for JNDI.  I thought heavily about this a while
back however
there are some issues with using OF and OS namely in the area of managing
references
in an object graph.  I think the DAS stuff Ole spoke about has potential
however
the timeline is unknown and we only have one person looking into it at the
moment.

If enough people are interested I think we can find a solid approach with a
visible
timeline to implement such a Object-LDAP (OL) mapping tool.

HTH,
Alex


On 5/10/07, Weijian Fang <wf-jaJdc+oKuOm+cE1VCfRBVw@public.gmane.org> wrote:
>
> Hi,
>
> Is there a tool to convert LDAP data to Java bean based on LDAP
> schema? What I want is quite like what JAXB does on XML. Given an XML
> schema, JAXB is able to generate Java classes that translate schema
> compliant XML to Java beans and back. Now I have a LDAP schema, and a
> LDAP server where data complies with the scheam. I need to read LDAP
> data and conert to Java beans. I can do this manually. But if there is
> a tool able to automatically generate the code based on the LDAP
> schema, it wiil be great!
>
> Is there such a tool? Any hint? Thanks a lot!
>
> Cheers,
>
> Weijian
>






[ Post a follow-up to this message ]



    Re: Is there a tool to convert LDAP data to Java bean based on schema  
Ole Ersoy


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
05-16-07 12:11 AM

Hi Weijian,

In case you are still interested,
I'll be publishing a new revision
of the DAS LDAP Design Guide in a few days.

This is written as a cook book for how
to write the DAS, so it should be fairly straight
forward to follow.

Also - Apache Tuscany is very supportive
of this approach (We've had many discussions already)
and the project will
likely be moved into Tuscany as soon
as the initial implementation is complete.

I could have a working implementation
right now that reads and writes data graphs,
but there are a few bugs in the ADS
Dynamic Schema capabilities that need to be cleared
first.  As soon as that's done I'll commit to
having an implementation that reads and writes SDO DataGraphs
within 10 days.

Note that SDO DataGraphs are really XSD Instances
and SDO was designed to use XML Schema for Typing.

Cheers,
- Ole


Alex Karasulu wrote:
> Hi Weijian,
>
> As others have already confirmed such a tool does not exist in
> totality.  There
> were some efforts out there with partial support for such functionality.
>
> Spring LDAP (not really but handles some glue code)
> Hibernate LDAP (incomplete)
> Castor LDAP (some say it is complete but I have not tried it)
>
> BTW it would be nice to start such an effort here.  There are several
> interesting
> approaches one of which was mentioned by Stefan Zoerner regarding he use o
f
> Object and State factories for JNDI.  I thought heavily about this a
> while back however
> there are some issues with using OF and OS namely in the area of
> managing references
> in an object graph.  I think the DAS stuff Ole spoke about has potential
> however
> the timeline is unknown and we only have one person looking into it at
> the moment.
>
> If enough people are interested I think we can find a solid approach
> with a visible
> timeline to implement such a Object-LDAP (OL) mapping tool.
>
> HTH,
> Alex
>
>
> On 5/10/07, *Weijian Fang* <wf-jaJdc+oKuOm+cE1VCfRBVw@public.gmane.org
> <mailto:wf-jaJdc+oKuOm+cE1VCfRBVw@public.gmane.org>> wrote:
>
>     Hi,
>
>     Is there a tool to convert LDAP data to Java bean based on LDAP
>     schema? What I want is quite like what JAXB does on XML. Given an XML
>     schema, JAXB is able to generate Java classes that translate schema
>     compliant XML to Java beans and back. Now I have a LDAP schema, and a
>     LDAP server where data complies with the scheam. I need to read LDAP
>     data and conert to Java beans. I can do this manually. But if there is
>     a tool able to automatically generate the code based on the LDAP
>     schema, it wiil be great!
>
>     Is there such a tool? Any hint? Thanks a lot!
>
>     Cheers,
>
>     Weijian
>
>






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:46 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register