Stateful Web Services - They really work!

by Scott Balmos

About a month ago, I wrote a blog entry here discussing stateful web services, and how EJB3 more or less removed the commonly used J2EE hack, in using the serialized EJB2.1 Stateful Session Bean Handle as a session token of sorts. I mentioned how JAX-WS added support for a WS-Addressing-based stateful SOAP endpoint - the first truly “automated” and SOAP-compliant manner of providing sessions in SOAP. Now… we have sample code! It really is dead-simple, a testament to the WSIT group (Project Tango), working between Sun and Microsoft to make JAX-WS and the Windows Communication Framework in .Net 3.0 play nicely.

First, the client code. This is run under JAX-WS 2.1.2 running in Glassfish v2 Beta 2. As part of the deployment, we won’t run wsgen to build the WSDL file or server artifacts, leaving that to deployment time auto-generation (all hail JEE 5). So, you can also run this example in WebLogic 10, if you updated the JAX-WS components in it to at least 2.1 (WL10 comes with JAX-WS 2.0 if I remember correctly). The JBoss crowd probably will work also under a JBoss 5 beta, as long as you use the JAX-WS libs. JBossWS will not work (at least not as pretty). Read more »

SOAP vs POX Debate, Part One

This time in San Francisco for the JavaOne 2007 conference, Adrian Trenneman deliberately tracked Ted Neward down at one of the innumerable “after-parties”–this one hosted by some company whose name sounded something like “oogle”–and started up another conversation, this time on the growing debate between “SOAP” and “Plain Old XML”, or “POX”. Once again, TheServerSide was able to capture the discussion, despite the best efforts of several large men in black suits and sunglasses who kept interrupting the early parts of the conversation with brusque challenges of “Continue or Cancel?”. Rumor has it these “G-Men” are part of a new multinational intelligence organization, but that’s another story for another day.

(Editor’s note: Again, as with the prior conversation, both men had consumed many of the available beverages of questionably moral character, and were still a touch irritated at the “G-Men” trying to display advertising in the background of their conversation. Readers unaccustomed to raucous debate are, again, forwarned.) Read more »