File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes How to inject sessionbean local reference in webservice(soap) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How to inject sessionbean local reference in webservice(soap)" Watch "How to inject sessionbean local reference in webservice(soap)" New topic
Author

How to inject sessionbean local reference in webservice(soap)

blv krishna
Greenhorn

Joined: Sep 27, 2009
Posts: 18
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...
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30512
    
150

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
blv krishna
Greenhorn

Joined: Sep 27, 2009
Posts: 18
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...
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10101
    
164

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 http://www.coderanch.com/t/470650/EJB-Other-Java-EE-Technologies/java/implementing-same-interface-by-more


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to inject sessionbean local reference in webservice(soap)