File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes web service context is null Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "web service context is null" Watch "web service context is null" New topic

web service context is null

dale con
Ranch Hand

Joined: Apr 15, 2005
Posts: 93
Dear All

I'm writing a web service that has methods that i expose and methods i don't. the methods i expose call unexposed methods.

One method calls a addsoapheader method, but the messagecontext is null. Can anyone see what is wrong

Many thanks

public static String addSOAPHeader(String token) throws Exception
Service service = new Service();

Call call = (Call)service.createCall();

SOAPHeaderElement tokenHeader = new SOAPHeaderElement("","TokenHeader");



MessageContext context = MessageContext.getCurrentContext();


return token;
I agree. Here's the link:
subject: web service context is null
It's not a secret anymore!