Eric B.

Greenhorn
+ Follow
since May 31, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Eric B.

Hi,

I'm looking to access information in my SOAP header from within a non-endpoint class in my JAX-WS WebService. To be specific, I want to access a Locale parameter that the client is sending in the header. I know that I can access the header from within a Handler, or get access to the WebServiceContext in my endpoint class (ie: the one annotated with @WebService), but I need the locale in another class (specifically an aspect). And I am not convinced that the only way to do this should be to extract it in the endpoint class, and pass it as part of the parameter list to any calls.

I realize that if my aspect is wrapping my endpoint, I can access the WebServiceContext from the join point target, but I was hoping I could inject the MessageContext elsewhere.

From what I understand, the MessageContext in a webservice is somewhat analogous to a Request object in a servlet - ie: it can contain metadata for the request that is accessible for the lifetime of the request. However, I have been completely unable to figure out any way to access the MessageContext (via any process other than part of a parameter chain) in any class other than a Handler or the endpoint.

Is this even feasible? Is my concept completely wrong? Should I only be accessing the MessageContext from within the endpoint, and passing everything as parameters-only? Or is there a way to get access to the MessageContext from within a specific class?

Thanks,

Eric
12 years ago
I'm encountering the same issue Alec is encountering. Alec - did you manage to come up with a solution that worked for you?

Thanks,

Eric
17 years ago