Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Murach's Java Servlets and JSP
this week in the
Service Jndi Lookup Error
Joined: Aug 13, 2004
May 21, 2008 12:26:00
We were trying to write a client for a webservice.
While getting hold of Service Class, we tried Looking up
InitialContext jndiContext = new InitialContext(); log.debug("WSLearn: Enter the WebserviceClient"); EmployeeWebService employeeService = (EmployeeWebService) jndiContext.lookup("java:comp/env/service/EmployeeWebServiceMam");
web.xml <service-ref xmlns:impl="http://testws.example.com" > <service-ref-name>service/EmployeeWebServiceMam</service-ref-name> <service-interface>com.example.testws.EmployeeWebService</service-interface> <wsdl-file>WEB-INF/wsdl/EmployeeService.wsdl</wsdl-file> <service-qname>impl:EmployeeService</service-qname> </service-ref>
I got "
Name service is not bound in this Context
I am trying in
with axis 1.2
I would like to know, wheter this feature is not supported by tomcat container, web.xml entry.
factory = ServiceFactory.newInstance();
EmployeeWebService service = (EmployeeWebService) factory.loadService(com.example.testws.EmployeeWebService.class);
I followed this code and got handle of service class and got the portType to invoke method in webservice.
Can anyone give me explanation, what are the ways of getting handle of service class?
SCJP 1.4 SCWCD 1.4 SCDJWS 1.4
I agree. Here's the link:
subject: Service Jndi Lookup Error
Problem with service-ref & jndi
service-ref and mapping file
service-ref Tag in web.xml
Unable to access WS in J2EE way
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014