简体   繁体   中英

How to secure Cxf jax-ws webservice?

I am new in web services. I have created web services using spring with CXF jax-ws implementation. Suppose I have " HelloWebService " in that I have webmethod " sayHello() " which will return string.

when I hit url:

localhost:8080/ProjName/service/HelloWebService?wsdl

It shows me wsdl on browser.

Now, I want to ask username and password when user hit this url on browser.

How can I do this?

I partially understand you but I think you would like to make a rest authentication. I had to do similar some months ago, and I came across this answer. stackoverflow answer

You can use InterceptorProviders for passing the credentials or the parameters you want to pass

REFER

to make your URL password protected in Spring

you can use authentication-manager tag in spring.xml (your spring config file)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM