File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Problem with service-ref & jndi Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Problem with service-ref & jndi" Watch "Problem with service-ref & jndi" New topic
Author

Problem with service-ref & jndi

Henry Zheng
Ranch Hand

Joined: Jan 24, 2004
Posts: 60
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!


Henry Zheng<br /> <br />I went numb when I learned to see.
Russell Teabeault
Greenhorn

Joined: May 18, 2004
Posts: 3
Henry,

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

- russ
Edy Yu
Ranch Hand

Joined: Nov 21, 2000
Posts: 264
Is this stuff supported by AXIS?


<i><br />Sun Certified Programmer for Java 2 Platform (SCJP)<br />Sun Certified Developer for Java 2 Platform (SCJD)<br />Sun Certified Web Component Developer for Java2 Platform, Enterprise Edition (SCWCD)<br />Sun Certified Business Component Developer for Java2 Platform, Enterprise Edition (SCBCD)<br />Sun Certified Enterprise Architect for J2EE (SCEA)<br />IBM Certified Enterprise Developer, WebSphere Studio V5.0<br /></i>
Henry Zheng
Ranch Hand

Joined: Jan 24, 2004
Posts: 60
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
Richard Monson-Haefel
author
Ranch Hand

Joined: Oct 31, 2003
Posts: 92
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)


-- <br />Richard Monson-Haefel<br /><a href="http://www.Monson-Haefel.com" target="_blank" rel="nofollow">http://www.Monson-Haefel.com</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with service-ref & jndi
 
Similar Threads
Unable to access WS in J2EE way
ServiceFactory.newInstance
Service Jndi Lookup Error
configuring handlers programmatically
service-ref Tag in web.xml