667481 members! Sign up to stay informed.

Sponsored Links


Resources

Enterprise Java
Research Library

Get Java white papers, product information, case studies and webcasts

News News News Messages: 7 Messages: 7 Messages: 7 Printer friendly Printer friendly Printer friendly Post reply Post reply Post reply XML XML XML

Stateful SOAP and beans on the TSS Interop Blog

Posted by: Joseph Ottinger on June 07, 2007 DIGG
On the TSS Interop blog, Scott Balmos has given us an example of a stateful web service. He'd done it on the Interop blog with an EJB reference before, but using a recent build of JAX-WS, he's gotten it done without hacks... and shows the server code in Java, with the client using the stateful service from C#.

The previous entry used "an underlying session management system [providing] a session ID or token, which is then passed in every subsequent SOAP method call." The new example, however, uses a SOAP Session Factory:



All of this requires fairly recent builds, but Scott says it should work in Glassfish v2 and WebLogic 10.

It's almost magical how easy the code is, to use a stateful SOAP service in this manner. Any thoughts on possible uses/problems?

Threaded replies

·  Stateful SOAP and beans on the TSS Interop Blog by Joseph Ottinger on Thu Jun 07 14:07:14 EDT 2007
  ·  Re: Stateful SOAP and beans on the TSS Interop Blog by William Martinez on Thu Jun 07 18:40:55 EDT 2007
    ·  Stateful Service would be best by Scott Balmos on Thu Jun 07 23:47:52 EDT 2007
  ·  Re: Stateful SOAP and beans on the TSS Interop Blog by Gregory Van Seghbroeck on Fri Jun 08 02:42:25 EDT 2007
    ·  Re: Stateful SOAP and beans on the TSS Interop Blog by Kohsuke Kawaguchi on Fri Jun 08 15:47:37 EDT 2007
  ·  Re: Stateful SOAP and beans on the TSS Interop Blog by Guido Anzuoni on Fri Jun 08 03:17:08 EDT 2007
  ·  Re: Stateful SOAP and beans on the TSS Interop Blog by John Brand on Sat Jun 09 07:38:46 EDT 2007
    ·  Wrote something similar in 2006... by Taylor Gautier on Thu Aug 23 03:33:03 EDT 2007
  Message #234203 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Stateful SOAP and beans on the TSS Interop Blog

Posted by: William Martinez on June 07, 2007 in response to Message #234196
Stateful communication, or Stateful Service, or Stateful SOAP?

I wonder.

William Martinez Pomares

  Message #234204 Post reply Post reply Post reply Go to top Go to top Go to top

Stateful Service would be best

Posted by: Scott Balmos on June 07, 2007 in response to Message #234203
If you want to be truly specific, then the best selection is that it's a Stateful Service.

The communication is most definitely not stateful, as this is running over HTTP without session cookies or anything else HTTP-based. SOAP is not stateful, and this code runs on a per-service basis.

As I note in the blog entry, on the wire the state management uses WS-Addressing to create a reply-to SOAP header entry with the JAX-WS stateful session ID as additional metadata. Then WS-Addresssing-compliant SOAP stacks know to use that given reply-to address and attached metadata in all further SOAP messages.

--S

  Message #234211 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Stateful SOAP and beans on the TSS Interop Blog

Posted by: Gregory Van Seghbroeck on June 08, 2007 in response to Message #234196
I wander if anyone is actually waiting for this.
When would it be interesting to use a stateful Web Services? When we want several web services working together.
But isn’t there already a standard available that handles this: WS-BPEL.

Kind regards,
Gregory

  Message #234213 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Stateful SOAP and beans on the TSS Interop Blog

Posted by: Guido Anzuoni on June 08, 2007 in response to Message #234196
Looks as great as Microsoft breaking 8+3 limit in filenames.
Congratu.la~001

Guido.

  Message #234244 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Stateful SOAP and beans on the TSS Interop Blog

Posted by: Kohsuke Kawaguchi on June 08, 2007 in response to Message #234211
One way to look at this is that this brings in the same abstraction improvement C struct -> C++ class.

When emulating object-orientation in C, functions tend to take the data that it acts on as the first argument. Similar thing happens often in web services. They take IDs or other identifiers as the arguments.

When you define a class in C++, all it's doing behind the scene is to create a structure and every method simply gets implicit 'this' parameter.

This is exactly doing the same. EPR serves as that implicit 'this' parameter. So the end result is that

proxy.foo(id,param1,param2,...)

becomes

proxy.foo(param1,param2,...)

The proxy object represents the 'id' parameter.

I think this makes the programming easier.

  Message #234255 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Stateful SOAP and beans on the TSS Interop Blog

Posted by: John Brand on June 09, 2007 in response to Message #234196
Any thoughts on possible uses/problems?


I tend to favor keeping state on the client for scalability reasons.

  Message #238621 Post reply Post reply Post reply Go to top Go to top Go to top

Wrote something similar in 2006...

Posted by: Taylor Gautier on August 23, 2007 in response to Message #234255
I wrote something that does basically the same thing using OpenLaszlo as the RIA, the CXF Stack that interfaced with POJOs, and Terracotta to persist / cluster the POJOs here:

http://javathink.blogspot.com/2006/10/build-ajax-soap-app-in-15-minutes-part.html

NOTE: I work for Terracotta :)

New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com

Dependency Injection in Java EE 6 - Part 1

Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6. (November 2, Article)

SAML: It's Not just for Web services

SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options. (September 28, Article)

Programming is Also Teaching Your Team

Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team. (September 22, Article)

Can Java EE Deliver The Asynchronous Web?

Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies. (July 14, Article)

JSF Flex

JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags. (June 29, Article)

The Rules of SOA - A Road to a Successful SOA Implementation

In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project. (June 23, Tech Talk)

Ari Zilka Talks About Terracotta 3.1

Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now. (June 15, Tech Talk)

Enterprise Application Integration, and Spring

In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements. (June 15, Tech Talk)

Google Web Toolkit: An Introduction

In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls. (June 4, Tech Talk)

Just Enough Early Architecture to Guide Development

Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable. (May 28, Tech Talk)

Productive Programmer: On the Lam from the Furniture Police

This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work. (May 26, Tech Talk)

Auto-Scaling Your Existing Web Application

Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers. (May 21, Tech Talk)

Automating Hibernate Mapping and Queries For Java Web Development

Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application. (May 19, Article)

Auto-Scaling Your Existing Web Application

In this session Nati Shalom demonstrates how to take a standard Java EE web application and scale it out or down dynamically without changes to the application code. Seeing as most web applications are over-provisioned to meet infrequent peak loads, this is a dramatic change because it enables growing your application as needed, when needed, without paying for unutilized resources. (May 19, Tech Talk)

Free Book: Jakarta-Struts Live

Download the entire book of Jakarta-Struts Live and learn about Struts MVC, Tiles, the Validator, DynaActionForms, plug-ins, internationalization, and more.
(Book PDF Download)

Application Server Matrix

The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)

News | Blogs | Discussions | Tech talks | Patterns | Reviews | White Papers | Downloads | Articles | Media kit | About
Java Solutions
All Content Copyright ©2007 TheServerSide Privacy Policy
Site Map