• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

securing web service developed as an EJB

 
anas alsarairah
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All

i am tryieng to secure a web service that is developed as an EJB 3.1 , here is the code for the service



also here is the deployment descripter i am using



and here is my sun-web.xml




i have also created a user of group ecs in the application server and by the way i am using glassfish application server v3.1 , now whwen try to test this service using Soap UI and providing the user that i have created for group ecs i get the following error

[b]java.lang.Exception: Client not authorized for invocation of public com.ans.TestResponse com.ans.Anas.sayAnas(com.ans.TestRequest)[/b]
 
ramesh kancherla
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi anas,

recently i got same problem. & i solved my problem as

username and password are configure in Glashfish server for that role ecs.

I have given that username and password in Soup ui request properties.

I got solve my problem.

I think it is help full for you.

Regards
Ramesh
soupui_requestproperties.JPG
soup ui screen shot
[Thumbnail for soupui_requestproperties.JPG]
 
anas alsarairah
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
thanks for your reply .. i am already putting the user name and password in soap UI but the same ... so can you please post your code example here if possible

thank you
 
ramesh kancherla
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://jee-bpel-soa.blogspot.com/2009/03/securing-web-services-with-http-basic.html

i followed this article


Regards
Ramesh
 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseCodeTags when posting code. It will highlight your code and make it much easier to read. It probably will also increase the number of people helping you. I've added them for you since you are new so that you can see the difference.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic