• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Role Authorization using apache cxf.

 
Ranch Hand
Posts: 32
MySQL Database Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm new to Apache CXF and WebServices. I need to authorize the user based on their role to decide whether he can access the web service method or not.

On the net we have only how to write use the SimpleAuthorizingInterceptor but we don't have any source for the client to test this authorization concept.

I have written some web service like this:


in the spring beans.xml file i have mentioned the information like this:


And I generated the wsdl using eclipse Java2WSDL option.
When I'm tyring to access this service from the client I'm getting UNAUTHORIZED..

Here is my client code:



Here are my doubts:
1. Is my client is the correct one to access the webservice?
2. How do I pass the role information to the webservice while calling a web method?

Don't consider typos or compilation issues. This code is working fine if i remove the authorization bean in the beans.xml file.

How do I achieve the authorization provided by the apache cxf.

Please help me to solve this issue...
 
The overall mission is to change the world. When you've done that, then you can read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic