Spring WS Username Password Authentication Wss4j

You may also like...

Subscribe
Notify of
guest
9 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Alexey
Alexey
August 1, 2016 11:23

How I can work with https?

Memorynotfound.com
Memorynotfound.com
August 8, 2016 13:11
Reply to  Alexey

You need to configure your application server (Tomcat or JBoss, or … ) to support secured socket layer (SSL/HTTPS) transportation.

iSyed
iSyed
September 28, 2016 11:26

Hello,

When i access the above sample service from SoapUI the request that is generated with out security header.

?

What changes are required to make the security header available as sample for user?

Thanks,

Memorynotfound.com
Memorynotfound.com
September 29, 2016 14:38
Reply to  iSyed

Unfortunately, spring-ws does not support WS-Policy (yet). So the information needed, cannot be specified in the WSDL by default. You could however, enhance the WSDL with your own WS-Policy implementation by extending the DefaultWsdl11Definition.

You can manually add a ws-security-header using SoapUI. Please read the following documentation: https://www.soapui.org/soapui-projects/ws-security.html

Lime
Lime
September 29, 2016 10:09

Hello guys,

thank you for the great article! :) I have one question though: Why do you need that “wss4j” dependency in pom.xml? It should be a compile time dependency of “spring-ws-security”, right? Also, it would be great to write a follow-up article with credentials provided using the UserDetailService… ;-)

With kind regards,

Petr Dvorak, Lime

Homer
Homer
May 4, 2017 09:24

Hi,
Thanks for your articles.

GetBeerRequest and GetBeerResponse files are missing.

Could you add them please?

Thanks

Abhisekh
Abhisekh
September 19, 2017 22:34

How did you generate your sample request from Java code. I need to create client something similar to mention in the example. I can generate my request however i am not sure how can i see the request with header details.

Manuel Silva
Manuel Silva
October 26, 2017 00:59

love it

Tasos
Tasos
December 27, 2017 11:53

It looks like the example request won’t get generated with the given security interceptor.
I had added these to get the nonce and created:
wss4jSecurityInterceptor.setSecurementUsernameTokenCreated(true);
wss4jSecurityInterceptor.setSecurementUsernameTokenNonce(true);

9
0
Would love your thoughts, please comment.x
()
x