permaculture playing cards*
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "web service context is null" Watch "web service context is null" New topic
Author

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");

tokenHeader.setObjectValue(token);

call.addHeader(tokenHeader);

MessageContext context = MessageContext.getCurrentContext();

SOAPHandler.handleResponse(context);

return token;
}
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: web service context is null