<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>All About Interop : JAXB</title><link>http://blogs.msdn.com/dotnetinterop/archive/tags/JAXB/default.aspx</link><description>Tags: JAXB</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Java/XML Binding Options?  WebSphere prefers JAXB 2.0...</title><link>http://blogs.msdn.com/dotnetinterop/archive/2008/03/24/java-xml-binding-options-websphere-prefers-jaxb-2-0.aspx</link><pubDate>Mon, 24 Mar 2008 17:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8331690</guid><dc:creator>DotNetInterop</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/dotnetinterop/comments/8331690.aspx</comments><wfw:commentRss>http://blogs.msdn.com/dotnetinterop/commentrss.aspx?PostID=8331690</wfw:commentRss><description>&lt;P&gt;I'm looking to&amp;nbsp;put together more Java and .NET interop samples.&amp;nbsp;If any of you have any particular requests, let me know.&amp;nbsp; One of the key areas for interop I'm looking at is XML serialization.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Today I was scanning the web looking for insight into the leading Java-to-XML binding frameworks.&amp;nbsp;For those of you who are .NET literate but not Java literate, "&lt;A class="" href="http://en.wikipedia.org/wiki/XML_data_binding" mce_href="http://en.wikipedia.org/wiki/XML_data_binding"&gt;XML data binding&lt;/A&gt;" is the term Java people (and maybe programmers for other platforms too) use for what we .NET-heads call "XML Serialization".&amp;nbsp; &amp;nbsp;According to my unofficial count, there are, let's see... ah...roughly..... &lt;EM&gt;a zillion &lt;/EM&gt;different options.&amp;nbsp;&amp;nbsp; XStream, &lt;A class="" href="http://xmlbeans.apache.org/" mce_href="http://xmlbeans.apache.org/"&gt;XMLBeans&lt;/A&gt;, &lt;A class="" href="http://en.wikipedia.org/wiki/JAXB" mce_href="http://en.wikipedia.org/wiki/JAXB"&gt;JAXB&lt;/A&gt;, &lt;A class="" href="http://jibx.sourceforge.net/" mce_href="http://jibx.sourceforge.net/"&gt;JiBX&lt;/A&gt;, &lt;A class="" href="http://www.castor.org/" mce_href="http://www.castor.org/"&gt;Castor&lt;/A&gt;, &lt;A class="" href="http://zeus.objectweb.org/" mce_href="http://zeus.objectweb.org/"&gt;Zeus&lt;/A&gt;, &lt;A class="" href="http://sourceforge.net/projects/jxquick" mce_href="http://sourceforge.net/projects/jxquick"&gt;Quick&lt;/A&gt;, etc.&amp;nbsp; Then there are the vendor options, like &lt;A class="" href="http://search.msn.com/results.aspx?q=electric+xml" mce_href="http://search.msn.com/results.aspx?q=electric+xml"&gt;Electric XML&lt;/A&gt; (from The Mind Electric, which was bought by Webmethods, which was bought by SoftwareAG, which ... ??&amp;nbsp;who knows what they are doing with Glue now? when I visited the &lt;A class="" href="http://www.webmethods.com/" mce_href="http://www.webmethods.com"&gt;webmethods.com&lt;/A&gt; website, it was down?).&amp;nbsp; At one point, Oracle had its own option, IBM had its own option, BEA's was what became XMLBeans (via the "Beehive" gambit), and there were many others, I'm sure.&lt;/P&gt;
&lt;P&gt;Let a thousand flowers bloom indeed. The problem with this "1000 flowers" approach is it presents a challenge to any developer who wants to just solve a problem.&amp;nbsp; Where's the critical mass?&amp;nbsp; Every developer has to go and &lt;A class="" href="http://search.msn.com/results.aspx?q=java+xml+binding" mce_href="http://search.msn.com/results.aspx?q=java+xml+binding"&gt;evaluate this decision&lt;/A&gt;, and who knows which is the right choice for any given set of circumstances?&amp;nbsp; Choice is great but too many choices can lead to higher decisions costs, and too much redundancy can stifle progress.&amp;nbsp; One set of devs learns techniques and tools for JiBX and the next set learns the same for XMLBeans and ne'er the twain shall meet.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;As I was looking, I learned that IBM's &lt;A class="" href="http://www-1.ibm.com/support/docview.wss?rs=180&amp;amp;uid=swg21264563" mce_href="http://www-1.ibm.com/support/docview.wss?rs=180&amp;amp;uid=swg21264563"&gt;WebSphere Feature Pack for Web Services&lt;/A&gt;, released in June 2007, &lt;A class="" href="http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.wsfep.multiplatform.doc/info/ae/ae/cwbs_jaxb.html" mce_href="http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.wsfep.multiplatform.doc/info/ae/ae/cwbs_jaxb.html"&gt;provides JAXB 2.0 support&lt;/A&gt; as the preferred Java-XML binding mechanism.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Seeing that JAXB is also the &lt;A class="" href="http://java.sun.com/developer/technicalArticles/WebServices/jaxb/" mce_href="http://java.sun.com/developer/technicalArticles/WebServices/jaxb/"&gt;JCP-blessed option&lt;/A&gt;, it seems like the question "Which Java-XML binding framework is the mainstream one?" has been answered. Maybe this discussion has been over for a long time and I just missed the memo?&lt;/P&gt;
&lt;P&gt;I am sure there will be numerous little frameworks that continue to explore the boundaries of XML-to-Java data binding, but JAXB seems like the mainstream winner approach for now.&amp;nbsp; It is the Honda Accord or Toyota Camry of Java-to-XML binding - a safe, reliable, well-supported, well-known choice. Other options may have nifty features or cooler styling, but parts, service and maintenance on the Accord is going to be cheap and easy in the long term.&amp;nbsp; You can't go wrong wiith that.&lt;/P&gt;
&lt;P mce_keep="true"&gt;I've produced numerous examples of how to interoperate between Java and .NET using XML, and I chose other frameworks for the Java side, including &lt;A class="" href="http://blogs.msdn.com/dotnetinterop/archive/2005/02/11/apache-xmlbeans-and-net-xml-serialization.aspx" mce_href="http://blogs.msdn.com/dotnetinterop/archive/2005/02/11/apache-xmlbeans-and-net-xml-serialization.aspx"&gt;XMLBeans&lt;/A&gt; and &lt;A class="" href="http://blogs.msdn.com/dotnetinterop/archive/2007/10/10/date-and-time-values-and-xstream-interop.aspx" mce_href="http://blogs.msdn.com/dotnetinterop/archive/2007/10/10/date-and-time-values-and-xstream-interop.aspx"&gt;most recently, XStream&lt;/A&gt;, but at this point I think JAXB is going to be my mainstream preference for an Java XML data binding framework going forward.&lt;/P&gt;
&lt;P mce_keep="true"&gt;If anyone has any guidance that disagrees with this, please advise!&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8331690" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Interop/default.aspx">Interop</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/XML/default.aspx">XML</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Websphere/default.aspx">Websphere</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/Java/default.aspx">Java</category><category domain="http://blogs.msdn.com/dotnetinterop/archive/tags/JAXB/default.aspx">JAXB</category></item></channel></rss>