You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2009/10/02 15:18:23 UTC

[jira] Closed: (CXF-2456) Custom interceptor in UNMARSHAL phase does not fire as expected in CXF 2.2.4-SNAPSHOT

     [ https://issues.apache.org/jira/browse/CXF-2456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp closed CXF-2456.
----------------------------

       Resolution: Invalid
    Fix Version/s: Invalid

> Custom interceptor in UNMARSHAL phase does not fire as expected in CXF 2.2.4-SNAPSHOT
> -------------------------------------------------------------------------------------
>
>                 Key: CXF-2456
>                 URL: https://issues.apache.org/jira/browse/CXF-2456
>             Project: CXF
>          Issue Type: Bug
>          Components: Bus
>    Affects Versions: 2.2.4
>            Reporter: Arik Gorelik
>             Fix For: Invalid
>
>
> I am using CXF 2.2.4-SNAPSHOT and running into a strange issue.
> I have a custom interceptor that does not do anything other than throw a fault if it has one as a content of the incoming message. I am trying to execute it BEFORE DocLiteralInInterceptor but AFTER URIMappingInterceptor in UNMARSHAL phase.
> This is how I am adding it for for some reason it does not fire (it is being skipped):
> public class TestFaultThrowingInterceptor extends AbstractPhaseInterceptor<Message> {
>        public TestFaultThrowingInterceptor() {
>                super(Phase.UNMARSHAL);
>               addAfter(URIMappingInterceptor.class.getName());
>                addBefore(
> DocLiteralInInterceptor.class.getName());
>        }
>       public void handleMessage(Message message) throws Fault {
>                // Obtain the fault from the previous phases
>                Fault fault = (Fault) message.getContent(Exception.class);
>                if (fault != null) {
>                        throw fault;
>                }
>        }
> }
> <jaxws:endpoint
>            id="testService"
>            implementor="testServiceImpl"
>            wsdlLocation="wsdl/v29/testService.wsdl"
>            address="/v29/testService">
>            <jaxws:properties>
>                <entry key="schema-validation-enabled" value="false" />
>            </jaxws:properties>
>            <jaxws:inInterceptors>
>                <ref bean="testInterceptor" />
>                <ref bean="testFaultThrowingInterceptor" />
>            </jaxws:inInterceptors>
>    </jaxws:endpoint>
> However, I've been debugging the code including the Interceptor Chain, but not sure why my custom interceptor does not fire. After the URIMappingInterceptor the execution in the chain goes straight to the DocLiteralInInterceptor. Any ideas how I can invoke my interceptor?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.