java - No assertion builder for type {http://schemas.xmlsoap.org/ws/2005/07/securitypolicy} -


i using ibm liberty 16.0.0.4

i trying call webservice through generated client classed using wsimport, when try call endpoint service got next warnings , error.

[warning ] no assertion builder type {http://schemas.xmlsoap.org/ws/2005/07/securitypolicy}transportbinding registered. [warning ] no assertion builder type {http://schemas.xmlsoap.org/ws/2005/07/securitypolicy}transporttoken registered. [warning ] no assertion builder type {http://schemas.xmlsoap.org/ws/2005/07/securitypolicy}httpstoken registered. [warning ] no assertion builder type {http://schemas.xmlsoap.org/ws/2005/07/securitypolicy}algorithmsuite registered. [warning ] no assertion builder type {http://schemas.xmlsoap.org/ws/2005/07/securitypolicy}basic256 registered. [warning ] no assertion builder type {http://schemas.xmlsoap.org/ws/2005/07/securitypolicy}layout registered. [warning ] no assertion builder type {http://schemas.xmlsoap.org/ws/2005/07/securitypolicy}lax registered. [warning ] no assertion builder type {http://schemas.xmlsoap.org/ws/2005/07/securitypolicy}includetimestamp registered. [warning ] no assertion builder type {http://schemas.xmlsoap.org/ws/2005/07/securitypolicy}signedsupportingtokens registered. [warning ] no assertion builder type {http://schemas.xmlsoap.org/ws/2005/07/securitypolicy}usernametoken registered. [error   ] none of policy alternatives can satisfied. none of policy alternatives can satisfied. 

do know if need add jars or real problem? or missing?

note: added security usernametoken have username , password in custom soaphandler

thanks :)

i found solution on enabling wssecurity on liberty server , needs enabled explicitly.

so used wssecurity-1.1 inside <featuremanager>

<feature>wssecurity-1.1</feature> 

also sending credentials of username , password need use next code usernametoken

map ctx = ((bindingprovider) port).getrequestcontext(); ctx.put("ws-security.username", "username"); ctx.put("ws-security.password", "password"); 

and not adding usernametoken header using security soap element that

security.addchildelement("usernametoken", "wsse");

references

1- https://www.ibm.com/support/knowledgecenter/was_beta/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/cwlp_wssec_msglvl.html

2- https://www.ibm.com/support/knowledgecenter/sseqtp_8.5.5/com.ibm.websphere.wlp.doc/ae/cwlp_wssec_cxf_diff.html


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -