XFire

Home
Bug/Issue Reporting
Download
FAQ
Get Involved
License
News
Performance
Stack Comparison
Support
Who uses XFire\?
XFire Team

Documentation

Javadocs
Reports
User's Guide
Release Notes

Quicklinks

Aegis Binding
Client
JAXB 2.0
JSR 181 Annotations
Spring

Developers

Developer Space
CVS
Building
Architecture
Interesting Projects
Roadmap
Release Process
JAX\-WS

The MessageContext

The MessageContext class stays with an XFire invocation from start to finish. It is useful for:

  • Accessing Messages, their xml streams and their headers
  • Storing/retrieving properties which need to be shared across different handlers
  • The service being invoked
  • The XFire instance being invoked

Accessing the MessageContext from your Operation

In some cases you want to be able to access XFire's MessageContext. The Invokers that come with XFire allow you to add a MessageContext variable to your operation like so:

public String echo(String echo, MessageContext context)
{
    // do something with the context...

    return echo;
}

XFire will just inject the MessageContext for you. With no ThreadLocal magic at all!