• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

I can create only one web service in EJB module. Why?

Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Sirs,

I am working with Netbeans 6.7.1 and glassfish v. 2.1

- I made an Enterprise Application
- Under Enterprise Application made a EJB Module
- In EJB Module I create a Persistence Unit then create TWO Entity Class from Database Class_A and Class_B
- then I made TWO Session Bean for Entity Classes
- and at last I made TWO Web Services, build and deploy all

but, if I ask:


and then


Only the first one respond correctly, but, if I delete the Class_A then the the second call
work fine!

If I make again Class_A chain then Class_A work fine and the old Class_B stop to respond!

Seems as if it is impossible to have two web service in the same project, but, I am sure, this
assertion is wrong.

Obviously, if I make two distinct EJB module (in the same Enterprise application), one for Class_A (and related Web Service) and another for Class_B (and related Web Service) all work fine, but it is, for me, incomprehensible.

The question is: what I have to do to have two (or more) webservice in the same EJB module?

Thank you, wery much for your answer.

Ranch Hand
Posts: 2198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just tried the following:
- Create one EJB Module (project).
- In the EJB project, created two stateless session beans with @WebService annotations.
- Created on EAR project.
- Added the EJB project to the EAR project.
- Deployed the EAR project to GlassFish 2.1.1.
- Tested both the web services by retrieving WSDL and using the internal WS test tool in GlassFish.

I used NetBeans 6.2m2 to develop the above and had no problems using the web services.
Have you tried to develop something like the above, with only two stateless session EJBs acting as web services in an EAR and nothing additional?
Best wishes!
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic