Saturday, June 30, 2007

New Project == New things to learn

So, I just finished the design for a service (I'll try to keep the names out of this to protect the guilty).  Basically this service plays the middle man between an EJB layer (A) and another EJB layer (B).  We do love our EJB's where I work...

Anyway, EJB Layer B receives XML requests and does magic on them and sends back an answer (or a failure) as XML.  We have the magic DTD and a Schema to help us figure out how to create the right question and how to parse the answer correctly.

As you no doubt know right XML is trivial.  I got a little creative this time and used a decorator pattern to generate the XML, so that was kind of fun... 

Parsing out the XML has been incredibly simple I'm using the Digester library from the jakarta-commons project by apache and the parsing and object instantiation has been a breeze. 

The only problem is that I don't want to have to hand write all of the objects that get populated via the digester.  I initially tried to go the IDE route, I was researching some plugins and found this article it looked pretty promising except I don't have a version of eclipse 3.1 lying around and I can't bring myself to download it.

I have found 3 solutions so far:

  • IBM's XSD-Beans given a DTD or XSD it will auto generate POJO's for you.  But then you are tied to IBM's runtime.   We do run on IBM's WebSphere app server so that's not horrible, but it is kind of yucky.
  • XML Spy from Altova.  This was the easiest by far.  The Enterprise Edition costs $990.00 though, and once the process is done you get your java beans tied to Altova's runtime.   Not so good.
  • Lastly I have tried PlainXML from softAMIS which is a library written on top of JAXB (B for binding).  It eventually worked I did have to do a bit of troubleshooting, no doubt due to my nasty DTD but I did eventually get my java files built.  But they were tied to the PlainXML runtime...

I guess my next steps are to look at JAXB without any wrappers and actually try to figure out what the heck is going on...  All I really want is a set of very simple POJO's that I can initialize out of the digester process, not tied to a specific XML library just simple getters and setters...

<sigh>

Wish me luck.

-Aaron

Saturday, June 23, 2007

First try.

This is the swingset in my backyard.

Begin Again

All I can think of is bad 80's songs to reference... "here I go again....", "round and round".    Like I said all bad references. 

I have been playing with blogging tools on and off now for quite awhile.  I have one blog that is not setup anymore using Roller another using wordpress at FlyingSpheres.org.  Although wordpress is a decent tool - the whole self-management of a blogging web site is enjoyable in some aspects; in other ways it is a huge pain.  Since Google has consumed blogspot I thought I would give it a try again, I had actually forgotten I had this account.

This is being written using the Windows Live Writer that Microsoft has in beta right now.  The previous process I used was to write the posts using Microsoft Word for spell check, pasting it into Edit Plus to get rid of the special characters and then copying and pasting once again.  Very laborious... Hopefully this will be better. 

If it is less painful hopefully there will be regular postings...  We shall see.

-Aaron