axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Daniels <g...@thoughtcraft.com>
Subject Re: [Axis2] OM issues
Date Sun, 05 Dec 2004 21:55:04 GMT
Hi Srinath!

>>* I think that a given SOAPEnvelope should have a "context" of some kind
>>associated with it, which includes at least the currently active roles.
>>  Then when you iterate over the headers, the default behavior is to
>>iterate over just the ones targeted at those roles.
>>
>>SOAPContext context = new SOAPContext();
>>context.addRole(SECURITY_ROLE);
>>envelope.setContext(context);
>>Iterator i = envelope.examineHeaders();
>>// this iterator now only covers headers targeted to
>>// NEXT and SECURITY_ROLE...
>>
>>The context gets created and associated with incoming envelopes by the
>>engine, which knows the roles via configuration of the engine and the
>>service.  If there is no context associated with a given SOAPEnvelope
>>(as when we're creating one from scratch), examineHeaders() would just
>>return everything just like examineAllHeaders().
> 
> +1 to give the ability to search the Headers via the role, what do you
> think about using
> envelope.examineHeaders(String role); instead of Context

I think it could be a useful API, but it is much less important than a 
context-based approach.  In general the Axis node is going to be playing 
one or more ("next" always, ultimate destination most of the time, then 
others on a configuration-specific basis) roles, and you don't want to 
force the pattern of searching for headers based on individual roles one 
at a time.  I don't think I would put examineHeaders(String role) into 
the API for now at all, personally.

>>* There are no APIs for getting pull events from OMElements >yet?
> 
> I think it is there .. there is something that wrap the OM element and
> act as a pull parser to generate events for the OM element and child
> element (I do not remeber the class name .. Ajith can answer this I
> belive)

Oh - I thought we had agreed in Sri Lanka that we wanted OMNode to be a 
pull event source (without the need for a wrapper), and that's what I 
was looking for.  A wrapper approach can work too.

--Glen

Mime
View raw message