Thanks Sam!
So OK, having now gone "all the way" with this, so to speak, I propose we
consider making the (single) MessageContext constructor look like this:
public MessageContext(AxisEngine engine)
{
axisEngine = engine;
}
This enforces the "must have the engine set" rule. This seems like the
right thing in terms of design (i.e. whenever you're going to actually use a
MessageContext you end up passing it to an AxisEngine, so this just
formalizes that).
While we're in there, I also propose cleaning up a couple of other things.
1) use the AxisEngine as a MessageContext factory:
class AxisEngine ... {
public MessageContext createMessageContext()
{ return new MessageContext(this); }
}
This would become the main way (perhaps the only way) to get a
MessageContext from "outside" Axis.
2) take out the "pluggable" forms for Message, and just have constructors
which take String, SOAPEnvelope, and InputStream objects, since those are
the ones we actually use. Remove the getAs() function and make the
individual getAs*() functions public.
Thoughts?
--Glen