07.11.05
Posted in Architecture, Articles, J2EE at 8:50 am by kkj
So you thought that the debate on exceptions was over, that the dust had settled, and that someone, somewhere had drawn a conclusion. Therefore, you thought, you didn’t need to worry about it and could just lean back, go with the flow. Not so, my friend.
JavaWorld features an article on developing and exception handling framework for J2EE, which I co-authored with my friend and colleague Jens Byager. The introduction was posted here a few months back, and we finally managed to find the time to finish it.
The torch has been lit and it burns brigther than ever … To check or not to check: that is the question … check it out.
Permalink
07.06.05
Posted in J2EE, SOA at 12:51 am by kkj
By popular demand (yeah, sure) I have decided to post the source code showing how to do web services the right way, i.e. document-style with XMLBeans. The code comprises a complete J2EE application with an EJB and a WAR, bundled in an EAR file. In order to build it, you need Maven, and in order to run it, you need an application server. I tried it out on JBoss 4.0.1, but there are no application-server specific facilities in use, so it should run on most servers with a little tweaking.
Building the application
- Unzip
docstylews.zip
- cd into the
docstylews (henceforth $root) folder
- issue
maven and build the whole thing.
Deploying the application
- Copy
$root/ear/target/ear-1.0.jar to $jboss/servers/default/deploy
- Go to
http://localhost:8080/axis/, choose List and ensure that MyService is there.
Test it with Altova XML Spy
- Go to
SOAP -> Create new SOAP Request
- Select the
MyService.wsdl file from $root/schema/src/etc
- Modify the content of the tag
<m:echo>String</m:echo> to something slightly more meaningful, e.g. Hello World
- Go to
SOAP -> Send request to server
- Verify the value of the
<ns:echo> tag.
Have fun!
Permalink