Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Author Message
korayuygun
Post subject: Jax-ws tutorial done, but ...  PostPosted: Jun 12, 2009 - 09:38 AM



Joined: Oct 09, 2006
Posts: 5

Hello,
the functionnalities offered by MyEclipse to create web services are really fast to implement. My problem is that after I have installed webservices on my Weblogic server I wanted to followe this tutorial http://weblogs.java.net/blog/ramapulavarthi/archive/2006/06/maintaining_ses.html to implement user session management but I dont know how to do.

Code:
  @Resource
  private WebServiceContext wsContext;
  public String doLogin(String login, String password) {
   LOGGER.debug("doLogin() - start");
      
   String result = "sdfgh";
   int state;

   try {
      MessageContext mc = wsContext.getMessageContext();
      HttpSession session = ((javax.servlet.http.HttpServletRequest)mc.get(MessageContext.SERVLET_REQUEST)).getSession();

   } catch (Exception e) {
      LOGGER.error(e.getMessage(), e);
      result = e.getMessage();
   }
    
   LOGGER.debug("doLogin() - end");
   return result;
  }


but wsContext is null.
Please help.

Thanks in advance,
Koray.
 
 View user's profile Send private message  
Reply with quote Back to top
korayuygun
Post subject: RE: Jax-ws tutorial done, but ...  PostPosted: Jun 15, 2009 - 08:49 AM



Joined: Oct 09, 2006
Posts: 5

Ok, I have found a workaround. I Copy the content of my main class and create the webservice as told in the tutorial except the fact that I select the delegate being the same as the original class. I create the webservice, then as the functionnality changes the content of the class, I paste again what I have copied earlier. It works!
 
 View user's profile Send private message  
Reply with quote Back to top
support-nipun
Post subject: RE: Jax-ws tutorial done, but ...  PostPosted: Jun 26, 2009 - 03:52 PM
Registered Member
Registered Member


Joined: Apr 18, 2007
Posts: 8013

Thanks for posting the workaround.

_________________
Nipun
MyEclipse Support
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits