WS-Security Header with JAX-WS RI

Hi, I hope I am in the correct forum and the question is not answered elswhere easily findable, because I googled a lot already. But it could also be that the heat of these days influenced my googling abilities.

I have a business server running in Apache 5.5 as WebApplication. Amongst other things it uses Spring 2.5.6. Now I need to access a SOAP Service with the JAX-WS RI 2.1.7. For this I used the wsimport Ant task to generate the Entities and stuff from the WSDL. Then I used the JaxWsPortProxyFactoryBean of Spring for getting a Proxy to invoke the Service. I have also added username and password to the proxy, but this just adds basic HTTP Authorization headers, not the WS-Security SOAP headers.

My problem now is, that I need to add WS-Security SOAP Headers for UsernameToken security. Unfortunately I did not really found much helpful information as to what library to use in this situation and how to do this most easily.

I hope someone here can help me with this.

Unfortunately, I have only little experience with SOAP and the frameworks you mentioned.
I am sorry to have no answer to you.

Best Regards
Thomas Peetz

I have a business server running in Apache 5.5 as
WebApplication. Amongst other things it uses Spring 2.5.6. Now
I need to access a SOAP Service with the JAX-WS RI 2.1.7. For
this I used the wsimport Ant task to generate the Entities and
stuff from the WSDL. Then I used the JaxWsPortProxyFactoryBean
of Spring for getting a Proxy to invoke the Service. I have
also added username and password to the proxy, but this just
adds basic HTTP Authorization headers, not the WS-Security
SOAP headers.

My problem now is, that I need to add WS-Security SOAP Headers
for UsernameToken security. Unfortunately I did not really
found much helpful information as to what library to use in
this situation and how to do this most easily.

I hope someone here can help me with this.

Thanks, but I got it managed in the meantime. I use the full Metro stack now that includes the jaxws-ri and more important I use the correct WSDL where the security policy is set up correctly. Then the framework does all the magic automatically and it works fine. :smile: