• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Service locator as the service?

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have 2 services (session beans) which will be exposed as webservice for a webmethods client.
How do I go about exposing these 2 beans as a service. Can I expose the servicelocator itself as a webservice? I know the 2 session beans can be individually exposed as services, but how about servicelocator?
Any example would be great.
Thanks,
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well with webservices it depends on the message, are they the same? The sender to the web service might not have your Service Locator, or even be written in Java. You expose your webservice with a URL and SOAP and XML Schema definitions. The web service should just wrap around your EJB.

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

Originally posted by Pavan Tummala:
Can I expose the servicelocator itself as a webservice?


Hi Pavan,

the service locator is the client-side common code to [mostly remotely] locate/lookup an EJB via JNDI, a webservice or whatever service.

The service locator can not and needs not lookup itself remotely - it knows itself already - locally!
Therefore there is no use to expose the service locator as a webservice.

You may locate
- a webservice URI via a JNDI provider or
- a JNDI provider URI via a webservice,
but these seem to be usefull only if you whish to provide both kinds of protocolls via one first contact point.

Probabely you just need to concentrate on writing one client-side servicelocator only, in your case the one for the webservice.

The use of a ServiceLocator is
- to encapsulate this uggly locater-implementation in one common client-side object and
- to allow for optimizations like caching handles.

Good luck,
Thomas Taeger
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic