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

How to inject sessionbean local reference in webservice(soap)

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i have a web service which has to expose the session bean which is in same project. for that i need to call that session bean in the web service. i was tried with

but it is not working . please help me to resolve.

regards
Guru...
 
author & internet detective
Posts: 39996
807
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What kind of class is the web service class? You can only inject EJBs in other EJBs or servlets. For a standalone class, you need to do a JNDI lookup the "old fashioned" way.
 
blv krishna
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:What kind of class is the web service class? You can only inject EJBs in other EJBs or servlets. For a standalone class, you need to do a JNDI lookup the "old fashioned" way.



hi,

the web service is stateless session bean!!!

i have another problem that is , in my application i have a generic local/remote interface the all the beans has to implement the same interfaces . i am getting the following error.



sample code



regards
Guru...
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i have another problem that is , in my application i have a generic local/remote interface the all the beans has to implement ...



That's been answered in your other thread here https://coderanch.com/t/470650/EJB-Other-Java-EE-Technologies/java/implementing-same-interface-by-more
 
If we don't do the shopping, we won't have anything for dinner. And I've invited this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic