Create WebService server using Metro with UsernameToken security
I'm here because I have some trouble deploying a WebService (server) and I need your help, I can't find anything on google.
I'm using NetBeans 7.0.1, GlassFish 3.1.1 (with JaxWs 2.2 and Metro 2.1.1-b09) and developping WebService in "java-first" style.
I have succesfully deployed my WebService without security but when I try to add some security using NetBeans GUI, that doesn't work for me
Here my (very simple) WebService : http://pastebin.com/cQw6kip1 (just a simple "hello world").
And I try to add UsernameToken Security by modifying (via Netbeans) the properties of my WebService :
"Secure Service" -> "Message Authentication over SSL" ("Username", "1.1", "Basic 128bit", "Lax")
Then I deployed my WebService on GlassFish witch recognised JSR109 annotations and create the WebService, here the WSDL generated : http://pastebin.com/bnxkr9KK
But when I try to consume the WebService, there is no security and I can't see any headers security in SOAP messages.
There is a WSIT generated also, but my guess is that "policies" aren't added to the WSDL when it's generated.
Do you have any idea ? Maybe I'm doing something wrong ?
Thanks all, in advance.
PS: I also try to use sun-jaxws.xml and WS context Servlet, but it was the same result...