Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General 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 ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Problem with service-ref & jndi

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

I was trying to wrote a servlet as the client of my web service, but got some problem with the jndi.

I declared the service-ref in web.xml as following:


But I constantly got the following error when trying to get my service interface in the servlet via jndi


javax.servlet.ServletException: Name service is not bound in this Context
com.oasis.scjdws.HelloServlet.doGet(HelloServlet.java:26)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)



Anyone could help on this?

Thanks!
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Henry,

Could you post the code that you are using to do the lookup?

- russ
 
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this stuff supported by AXIS?
 
Henry Zheng
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Russell

I simply used the following code to do the lookup:


Did I miss anything here?

btw, I'm using Tomcat 5.0.19 and Axis 1.1
 
author
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure that the service-ref element is supported by Axis? Its really a J2EE 1.4 thing, so i don't think that Axis would support it - it would only be used by J2EE 1.4 compliant appllication servers. I think that is the problem - you would probably have better luch with the J2EE 1.4 SDK (if you can get it working ... I have a terrible time with myself)
 
We should throw him a surprise party. It will cheer him up. We can use this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic