To control handler ordering you should use
getAfter().add(<HANDLER_NAME>); or after(<HANDLER_NAME>) in your handler
constructor. Take a look at WSS4j handler to see how it works  ( WSS4J is
executed after DOMInHandler  and before ReadHeadersHandler)
<code>
public WSS4JInHandler()
   {
       super();

       setPhase(Phase.PARSE);
       getBefore().add(ReadHeadersHandler.class.getName());
       getAfter().add(DOMInHandler.class.getName());
   }
</code>

On 12/27/06, Eric Miles <[EMAIL PROTECTED]> wrote:

 A follow up to this....

I have altered the positions of the userRoleHandler and the
authenticationHandler and now I have the behavior I desire with the
following definition:

<bean id="userService"
class="org.codehaus.xfire.spring.ServiceBean">
<property name="serviceBean" ref="userServiceImpl" />
<property name="serviceFactory" ref="xfire.jaxbServiceFactory" />
<property name="style" value="document" />
<property name="inHandlers">
<list>
<ref bean="domInHandler" />
<ref bean="wss4jHandler" />
<ref bean="userRoleHandler" />
<ref bean="authenticationHandler" />
</list>
</property>
</bean>

DomInHanlder 1st, wss4jHandler 2nd, authenticationHandler 3rd, and
userRoleHandler is now 4th.  Any ideas on why the listed 3rd handler is
being called 4th and the listed 4th handler is being called 3rd?  I'd rather
not leave it this way but I can not see what the issue is in the code.

Thanks again,
Eric

On Wed, 2006-12-27 at 14:55 -0500, Eric Miles wrote:

I am having issues with the order in which my custom IN handlers are being
invoked.  Here is my configuration:

<bean id="userService"
class="org.codehaus.xfire.spring.ServiceBean">
<property name="serviceBean" ref="userServiceImpl" />
<property name="serviceFactory" ref="xfire.jaxbServiceFactory" />
<property name="style" value="document" />
<property name="inHandlers">
<list>
<ref bean="domInHandler" />
<ref bean="wss4jHandler" />
<ref bean="authenticationHandler" />
<ref bean="userRoleHandler" />
</list>
</property>
</bean>


The problem is, userRoleHandler is ALWAYS called before
authenticationHandler (not desired behavior).  domInHanlder is always called
first, wss4jHandler is 2nd, but then it's userRoleHandler then
authenticationHandler.  I looked through the code of the XFire ServiceBean
and the AbstractHandlerSupport classes, but do not see how the ordering
could get screwed up (unless it's in the service bean when it invokes
addAll() on the handler list).

Any suggestions on what to look at or how to approach this?  These
handlers MUST fire off in the order given.

Thanks,

--
Eric Miles
Kronos Federal
Software Engineer
540-961-8020
[EMAIL PROTECTED]




--
-----
When one of our products stops working, we'll blame another vendor within 24
hours.

Reply via email to