Hi all,

i would add some handlers to my service.

i add 
@HandlerChain(file="handlers.xml")

and i put in the same path of service class the handlers.xml file:
<?xml version="1.0" encoding="UTF-8"?>

<jws:handler-chains xmlns:jws="http://java.sun.com/xml/ns/javaee";>
        <jws:handler-chain name="handlerChain">
                <jws:handler>
                        <jws:handler-class>
                                org.test.HandlerTest
                        </jws:handler-class>
                </jws:handler>
        </jws:handler-chain>
</jws:handler-chains>

where HandlerTest is a class that implements Handler<SOAPMessageContext>.


When i deploy it gives me this error:


org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'PD': Invocation of init method failed; nested exception is
javax.xml.ws.WebServiceException: Chain not specified
Caused by: 
javax.xml.ws.WebServiceException: Chain not specified
        at
org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder.buildHandlerChainFromClass(AnnotationHandlerChainBuilder.java:109)
        at
org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder.buildHandlerChainFromClass(AnnotationHandlerChainBuilder.java:124)
        at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.buildHandlerChain(JaxWsServerFactoryBean.java:176)
.....
....
        at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
        at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
Caused by: javax.xml.ws.WebServiceException: Failed to instantiate handler
        at
org.apache.cxf.jaxws.handler.HandlerChainBuilder.buildHandlerChain(HandlerChainBuilder.java:123)
        at
org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder.buildHandlerChainFromClass(AnnotationHandlerChainBuilder.java:105)
        ... 111 more
Caused by: java.lang.NullPointerException
        at
org.apache.cxf.jaxws.handler.HandlerChainBuilder.buildHandlerChain(HandlerChainBuilder.java:111)
        ... 112 more



Where did i make errors?

There is a way to put the handler config file in another path? (for example
in WEB-INF dir)


Thx for any help,
Lorenzo

-- 
View this message in context: 
http://www.nabble.com/%40HandlerChain-problems..-tf4646259.html#a13272238
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to