users@jax-rpc.java.net

Handler Chain weirdness

From: Kevin Jones <kevinj_at_DEVELOP.COM>
Date: Thu, 02 Oct 2003 14:10:17 +0100

I'm trying to configure two handler chains for the same endpoint for
different actors and I'm seeing weird behaviour.

I have this:

<handlerChains>
    <chain runAt="server" roles="http://kevinj.develop.com">

        <handler className="com.develop.SimpleHandler"
            headers="ns1:SomeActorHeader"
            xmlns:ns1="http://echoservice.develop.com/types">
        </handler>

    </chain>

    <chain runAt="server" roles="urn:someuri">
        <handler className="com.develop.SimpleHandler2"
            headers="ns1:SomeHeader"
            xmlns:ns1="http://echoservice.develop.com/types">
            <property name="name" value="server2"/>
        </handler>
    </chain>
</handlerChains>

So, I have two handler classes and two chains. If I send a SOAP message
that looks like this

<env:Envelope xmlns:ns0="http://echoservice.develop.com/types">
    <env:Header>
        <ns0:SomeActorHeader env:actor="http://kevinj.develop.com"
env:mustUnderstand="1"/>

then *only* the *second* handler gets called (SimpleHandler2), even
though it is configured for urn:someuri and even though it doesn't
return the QName of the SomeActorHeader. In fact I don't see
SimpleHandler1 called at all so the runtime can't even know that
SomeActorHeader (which is a mustUnderstand header) will be processed
somewhere.

Should multiple handler chains work? (this is in the 1.2 JWSDP BTW),

Kevin Jones
Developmentor
www.develop.com