Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Web Services and the fly likes Apache CXF Web Service - Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Apache CXF Web Service - "Unauthorized Access"" Watch "Apache CXF Web Service - "Unauthorized Access"" New topic
Author

Apache CXF Web Service - "Unauthorized Access"

drave lai
Greenhorn

Joined: Nov 18, 2012
Posts: 1
Hi All,

I would to ask is there any way for our CXF web service for example: http://www.abc.com/search.wsdl when there is any unauthorized person access on the url, then redirect him/her to a page with message "Unauthorized Access"? if any, could anyone help me for any example that I can refer to?

Appreciate for any body helps.
Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1189
    
    1

Welcome to Java ranch !!

One way is to implement WS Security feature for web service using APache CXF Framework
http://cxf.apache.org/docs/secure-jax-rs-services.html
http://www.jroller.com/gmazza/entry/cxf_usernametoken_profile

Second way is to restrict access through web container (if web service is deployed in Web container) by using web.xml
Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1189
    
    1

Is you service is SOAP based or REST based?
Your solution approach may or may not vary based on web service type
 
 
subject: Apache CXF Web Service - "Unauthorized Access"