Win a copy of Spark in Action this week in the Open Source Projects 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Extracting username from soapheader

Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I'm trying to pull the username from a soap header.
I currently use a AbstractPreAuthenticatedProcessingFilter to obtain the remote user from the HttpServletRequest object,
so that it can be passed to Single Sign On to authenticate the user.

I have a client that transmits the user details (i.e. username) in the soap header.
I have looked at using spring EndpointInterceptor and then calling the following to get at the header details (i.e. username)

But I have read that spring Interceptor is part of mvc and acts as a DispacherServlet hence Filters are
called before Interceptors.

I need to be able to put the username within HttpServletRequest remoteUser, probably using a customised Filter
that is called before AbstractPreAuthenticatedProcessingFilter, but I'm not sure how to do it.


Mat Anthony
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
the following code attempts to read the soap header using a Filter. It needs WebServiceContext, but not sure how to get hold of this resource.

Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic