dev@jax-ws.java.net

Re: Question about JAX-WS custom WebServiceFeature implementation

From: Dmitry Katsubo <dma_k_at_mail.ru>
Date: Sat, 03 Dec 2011 01:35:57 +0100

Hi Franky,

For accessing the message body you need something which is called
"message handlers" or "handler chains". See:

http://jax-ws.java.net/articles/handlers_introduction.html
http://stackoverflow.com/questions/8192712

On 30.11.2011 18:06, Franky D wrote:
> Hi,
>
> I just looked at one of your interesting posts
> (http://weblogs.java.net/blog/ramapulavarthi/archive/2007/01/extending_jaxws.html),
> and wanted to know how to implement a custom behavior for a custom
> WebServiceFeature. This post talks about creating a custom web service
> feature for JAX-WS, but apart from the enabled/required flags and the
> constructor, I don't understand how my custom feature could have access
> to the soap message and modify it. Which method to implement in my
> custom WebServiceFeature, and how can I tell JAX-WS to execute that
> method, and how to access the soap message/or the soap context from that
> method? At least, I know how to set this custom feature while doing the
> getPort() operation...
>
> Why would I need that? I would like to create a custom feature that
> does encryption/signature of soap message using wss4j, and which would
> executes AFTER the SchemaValidationFeature. See the details of my
> problem here:
> http://www.java.net/forum/topic/glassfish/metro-and-jaxb/how-do-encryption-and-validation-outgoing-soap-message-client
>
>
> Thanks, any help would be greatly appreciated!
> Francois


-- 
With best regards,
Dmitry