|
From: Torsten J. <tju...@ya...> - 2004-11-04 11:19:21
|
Maybe the bright people on the Spring developer list can give me a hint for the following non-Spring-related topic: We are using XML messages to communicate with external systems. At the boundaries of our system these XML messages are mapped / bound to JavaBeans via Castor. Within a system-specific adapter these external JavaBeans are mapped to our internal, generic JavaBeans. What we need now is an easy to use / configure and performant way to map data between different JavaBeans. Any experiences / suggestions? Thanx. Torsten __________________________________ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com |
|
From: Rob B. <cro...@ya...> - 2004-11-04 14:09:02
|
This may or may not work for you, but here's a suggestion. If possible, have the internal generic JavaBeans implement an interface. The code which uses these generic JavaBeans should be coded to the interface so that various implementations of it can be used. Then, instead of mapping data from the external JavaBeans to your generic ones, you implement new implementations of the generic JavaBeans, which encapsulate the system-specific ones within them. The implementation of the generic JavaBean interface can then call the appropriate methods of the system-specific JavaBean to obtain the data they would need. There is no "mapping" where data is read out of one bean and placed in another, just methods in your "generic" JavaBeans (which implement the interface) and make calls to the system-specific JavaBeans for data. Just an idea. Later Rob --- Torsten Juergeleit <tju...@ya...> wrote: > Maybe the bright people on the Spring developer list > can give me a hint for the following > non-Spring-related topic: > > We are using XML messages to communicate with > external > systems. At the boundaries of our system these XML > messages are mapped / bound to JavaBeans via Castor. > Within a system-specific adapter these external > JavaBeans are mapped to our internal, generic > JavaBeans. > > What we need now is an easy to use / configure and > performant way to map data between different > JavaBeans. > > Any experiences / suggestions? > > Thanx. > Torsten > > > > __________________________________ > Do you Yahoo!? > Check out the new Yahoo! Front Page. > www.yahoo.com > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for > FREE > LinuxWorld Reader's Choice Award Winner for best > database on Linux. > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > __________________________________ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com |
|
From: Dmitriy K. <dko...@ru...> - 2004-11-04 14:23:50
|
So basically this is a classic "GoF" Adapter pattern ;-) Cheers, Dmitriy. Rob Butler wrote: >This may or may not work for you, but here's a >suggestion. > >If possible, have the internal generic JavaBeans >implement an interface. The code which uses these >generic JavaBeans should be coded to the interface so >that various implementations of it can be used. > >Then, instead of mapping data from the external >JavaBeans to your generic ones, you implement new >implementations of the generic JavaBeans, which >encapsulate the system-specific ones within them. The >implementation of the generic JavaBean interface can >then call the appropriate methods of the >system-specific JavaBean to obtain the data they would >need. > >There is no "mapping" where data is read out of one >bean and placed in another, just methods in your >"generic" JavaBeans (which implement the interface) >and make calls to the system-specific JavaBeans for >data. > >Just an idea. >Later >Rob > >--- Torsten Juergeleit <tju...@ya...> wrote: > > > >>Maybe the bright people on the Spring developer list >>can give me a hint for the following >>non-Spring-related topic: >> >>We are using XML messages to communicate with >>external >>systems. At the boundaries of our system these XML >>messages are mapped / bound to JavaBeans via Castor. >>Within a system-specific adapter these external >>JavaBeans are mapped to our internal, generic >>JavaBeans. >> >>What we need now is an easy to use / configure and >>performant way to map data between different >>JavaBeans. >> >>Any experiences / suggestions? >> >>Thanx. >>Torsten >> >> >> >>__________________________________ >>Do you Yahoo!? >>Check out the new Yahoo! Front Page. >>www.yahoo.com >> >> >> >> >> >> >> >------------------------------------------------------- > > >>This SF.Net email is sponsored by: >>Sybase ASE Linux Express Edition - download now for >>FREE >>LinuxWorld Reader's Choice Award Winner for best >>database on Linux. >> >> >> >http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click > > >>_______________________________________________ >>Springframework-developer mailing list >>Spr...@li... >> >> >> >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > >__________________________________ >Do you Yahoo!? >Check out the new Yahoo! Front Page. >www.yahoo.com > > > > >------------------------------------------------------- >This SF.Net email is sponsored by: >Sybase ASE Linux Express Edition - download now for FREE >LinuxWorld Reader's Choice Award Winner for best database on Linux. >http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click >_______________________________________________ >Springframework-developer mailing list >Spr...@li... >https://lists.sourceforge.net/lists/listinfo/springframework-developer > > |
|
From: Torsten J. <tju...@ya...> - 2004-11-04 16:41:56
|
Good point. In our case the external JavaBeans (defined via XML schema and generated via Castor) contain only a very small subset of the data available in the internal JavaBeans (defined via XML schema and generated via Castor too). So the external ones only within the system-specific adapter. This adapter is responsible to create the generic JavaBeans (defined via XML schema and generated via Castor too) with the data from the external ones and sending these into our system or vice versa. This process of transforming JavaBeans is what I am looking for. Has anyone experience with tools like Altova's MapForce which support code generation for XML schema mapping (XSD to XSD)? Torsten --- Rob Butler <cro...@ya...> wrote: > This may or may not work for you, but here's a > suggestion. > > If possible, have the internal generic JavaBeans > implement an interface. The code which uses these > generic JavaBeans should be coded to the interface > so > that various implementations of it can be used. > > Then, instead of mapping data from the external > JavaBeans to your generic ones, you implement new > implementations of the generic JavaBeans, which > encapsulate the system-specific ones within them. > The > implementation of the generic JavaBean interface can > then call the appropriate methods of the > system-specific JavaBean to obtain the data they > would > need. > > There is no "mapping" where data is read out of one > bean and placed in another, just methods in your > "generic" JavaBeans (which implement the interface) > and make calls to the system-specific JavaBeans for > data. > > Just an idea. > Later > Rob > > --- Torsten Juergeleit <tju...@ya...> wrote: > > > Maybe the bright people on the Spring developer > list > > can give me a hint for the following > > non-Spring-related topic: > > > > We are using XML messages to communicate with > > external > > systems. At the boundaries of our system these XML > > messages are mapped / bound to JavaBeans via > Castor. > > Within a system-specific adapter these external > > JavaBeans are mapped to our internal, generic > > JavaBeans. > > > > What we need now is an easy to use / configure and > > performant way to map data between different > > JavaBeans. > > > > Any experiences / suggestions? > > > > Thanx. > > Torsten > > > > > > > > __________________________________ > > Do you Yahoo!? > > Check out the new Yahoo! Front Page. > > www.yahoo.com > > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: > > Sybase ASE Linux Express Edition - download now > for > > FREE > > LinuxWorld Reader's Choice Award Winner for best > > database on Linux. > > > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click > > _______________________________________________ > > Springframework-developer mailing list > > Spr...@li... > > > https://lists.sourceforge.net/lists/listinfo/springframework-developer > > > > > > > __________________________________ > Do you Yahoo!? > Check out the new Yahoo! Front Page. > www.yahoo.com > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for > FREE > LinuxWorld Reader's Choice Award Winner for best > database on Linux. > http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > __________________________________ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com |