Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
XML messaging

XML messaging

2004-09-15       - By Chris Rowse

 Back
Reply:     1     2     3     4     5     6     7     8  

Hi Bayarsaikhan

       Perhaps you want to look at JAXB (Part of JWS pack)

       You can use it to marshall and unmarshall all your XML
directly off the XSD into an object tree.

       The documents will be separated i.e. you get a class back based on the
XML you received, and by extension or delegation you can do whatever you
require. I use a factory to wrap this returned object in a standard
interface for all received messages. My application code doesnt need to
know what specific class came back, the factory handles that.

       You might also want (or need)  to look at a SAX parser to generate
events for you.

       I've used JAXB in a http client that http:POSTs java objects as XML,
then waits for the response and creates the correct java object trees
for me based on the response xml.

I use overridden action(), toString() etc methods in the interface to
create behaviour based on the class returned.

       I'm sure there are neater and better ways of doing this, but I now have
independance over changes to the XML schema since JAXB compiles the
external schema for me. The XML schema is out of my control.

The only flaws I can see in JAXB are

       a) It creates concrete classes. I would prefer interfaces.
       b) AS a result it does not map easily to EJB CMP2. I would love to be
able for instance to ....
    1) Create an XSM schema
    2) Use JAXB to create marshallers, unmarshallers, interfaces to
these XML objects
    3) Use XDoclet to create EJB CMP2 for these interface objects

       I now would have a system that transparently stores my XML as it
arrives! (and gives me EJB).


Chris


On Wed, 2004-09-15 at 10:13, Bayarsaikhan VOLODYA (YAZ-ArGe) wrote:
> i think, it is not for me.
> my problem is how to seperate these XML documents. should i create objects
for each XML document and apply mapping between them? or is there any way to
create dynamic objects using XML?
> thanks,
>
> -- --Original Message-- --
> From: Chanian, Raj [mailto:Raj.Chanian@(protected)]
> Sent: Tuesday, September 14, 2004 6:15 PM
> To: J2EEPATTERNS-INTEREST@(protected)
> Subject: Re: XML messaging
>
>
> Use CorrelationIdentifier messaging pattern
>
> Regards,
>
> Raj Chanian
> LogicaCMG
>
> -- --Original Message-- --
> From: Bayarsaikhan VOLODYA (YAZ-ArGe) [mailto:bayar@(protected)]
> Sent: 14 September 2004 15:54
> To: J2EEPATTERNS-INTEREST@(protected)
> Subject: XML messaging
>
>
> Hi all, i hope you all are doing well.
>
> There is an challenging project.
> Maybe some of you know about FlexCube. I have to talk to FlexCube using XML
> messaging.
> There are so many XML documents i send to FlexCube to make some kind of
> transaction or blah blah, and result is also in XML format.
> How do i seperate incoming XML? How do i know which kind of transaction is
> that XML.
> How do i manage so many XML documents? Should i convert all of them into
> Java Objects (will be static)? Is there any way to process all these XML in
> similar manner? In future, when there maybe new kind of transaction, i dont
> want to play with my code again. So is there any dynamic way to handle all
> that XML messages? sorry, i know there is so many questions. but i will
> appreciate any feedback, advice from you.
>
> Bayarsaikhan VOLODYA
>
> ====================================================================
> Companion Site: http://www.corej2eepatterns.com
> J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
> List Archive:
> http://archives.java.sun.com/archives/j2eepatterns-interest.html
> Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
> listserv@(protected)
>
> This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an intended
recipient then please promptly delete this e-mail and any attachment and all
copies and inform the sender. Thank you.
>
> ====================================================================
> Companion Site: http://www.corej2eepatterns.com
> J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
> List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
> Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
>
> ====================================================================
> Companion Site: http://www.corej2eepatterns.com
> J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
> List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
> Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)

====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.