Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!
  • 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 ...
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Trying to access web service protected with JAAS role-based security

Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a web service implemented as a stateless EJB3.0, using Eclipse IDE, Java 1.6.0 and deploying to JBoss AS 5.1.0.GA.
I have been successful in configuring JBoss for JAAS security for the rest of the J2EE application, including adding a @RolesAllowed(...) annotation to my EJB methods, and this does indeed work.

I've added such an annotation now to my web service method, and am unable to invoke the method using the SoapUI test client, even though I've provided my user name and password in the properties of the request (this is the data item created in SoapUI, which it uses to generate the actual soap message request).

Note that if I remove the @RolesAllowed(...) annotation from the web service method, I'm able to call it just fine using SoapUI. When I add the @RolesAllowed(...) annotation back in and attempt to call it from SoapUI, I get the following error in the JBoss AS log file:

Is there more I need to do to get this to work?

pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic