[jboss-dev-forums] [JBoss Web Services Development] - Re: Can I modify the HandlerChain at deploy time?
Alessio Soldano
do-not-reply at jboss.com
Tue Dec 13 09:38:05 EST 2011
Alessio Soldano [http://community.jboss.org/people/asoldano] created the discussion
"Re: Can I modify the HandlerChain at deploy time?"
To view the discussion, visit: http://community.jboss.org/message/641283#641283
--------------------------------------------------------------
> 3) Sounds most promising. I have the following questions:
>
> A. Will this require any changes to jbossws?
>
Besides the bug I need to fix, no.
> B. Will the code I plug in have access to the service implementation class? I will need to pull off the annotations to decide what to do with the handler chain. I don't need access to the actual instance.
>
Well, you can get access to the annotations attached to a given class by looking into the AS7 jandex annotation index. You just need to have your code run in the proper phase / sequence order, iow you'll need to have the annotation index already created and the webservices install processors not run yet (so that the ws deployers already see the metadata that have been modified by you).
> C. Would I need to do anything special, in the situation where the developer has included a webservices.xml for an unrelated purpose?
>
You'll need to add your handlers to the other the user might have already specified and the other information in the metadata for that descriptor. We can have another discussion about the details of the org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData if you want/need. In the mean time, you can have a look at that in the jbossws-spi project. The handlers stuff lives in WebserviceDescriptionMetaData -> PortComponentMetaData -> UnifiedHandlerChainsMetaData . To get an idea, the code here (processWSDDContribution method) is what will be processing those metadata: http://anonsvn.jboss.org/repos/jbossws/stack/cxf/tags/jbossws-cxf-4.0.0.CR1/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java http://anonsvn.jboss.org/repos/jbossws/stack/cxf/tags/jbossws-cxf-4.0.0.CR1/modules/server/src/main/java/org/jboss/wsf/stack/cxf/metadata/MetadataBuilder.java
Hope this helps :-)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641283#641283]
Start a new discussion in JBoss Web Services Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2047]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20111213/4c2b7ebd/attachment.html
More information about the jboss-dev-forums
mailing list