• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Can't figure out how EJb 2.1 SLSB method is exposed as web-service

 
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,


I have an EJB2.1 Stateless Session bean with one of it's methods being called by a web-service.The thing that is bugging me is that I checked the ejb-jar.xml and didn't see any other interface declarations except 'Remote' and 'Local'.Shouldn't one have like 'Web Service' or something like the EJB3 web service annotation?

Or maybe I'm really confused and it's calling the web-service?And I don't see the right WSDL for the web-service.The web-service apparently lives in a different (web?) application.
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yep, there should be a service-endpoint tag in that ejb-jar.xml, if the ejb is to service soap requests, so maybe some other component of your app is doing that and delegating to that ejb you mention.

I took this from the 2.1 spec, for your information:

7.11.9 Session Bean’s Web Service Endpoint Interface
The following are the requirements for a stateless session bean’s web service endpoint interface. The
web service endpoint interface must follow the rules for JAX-RPC service endpoint interfaces [22].
• The web service endpoint interface must extend the java.rmi.Remote interface.
• The methods defined in the interface must follow the rules for JAX-RPC service endpoint
interfaces. This means that their argument and return values must be of valid types for
JAX-RPC, and their throws clauses must include the java.rmi.RemoteException.
The throws clause may additionally include application exceptions.
Note that JAX-RPC Holder classes may be used as method parameters. The JAX-RPC specification
requires support for Holder classes as part of the standard Java mapping of WSDL
operations in order to handle out and inout parameters. Holder classes implement the
javax.xml.rpc.holders.Holder interface. See the JAX-RPC specification [22] for
further details.
• For each method defined in the web service endpoint interface, there must be a matching
method in the session bean’s class. The matching method must have:
• The same name.
• The same number and types of arguments, and the same return type.
• All the exceptions defined in the throws clause of the matching method of the session
bean class must be defined in the throws clause of the method of the web service
endpoint interface.
• The web service endpoint interface must not include an EJBObject or EJBLocalObject as
either a parameter or return type. An array or JAX-RPC value type must not include an
EJBObject or EJBLocalObject as a contained element. The web service endpoint interface
methods must not expose local or remote interface types, local or remote home interface types,
timers or timer handles, or the managed collection classes that are used for entity beans with
container-managed persistence as arguments or results or as fields of value types.
• JAX-RPC serialization rules apply for any value types that are used by the web service endpoint
interface. If it is important that Java serialization semantics apply, the Bean Provider
should use the restricted set of JAX-RPC value types for which the semantics of Java serialization
apply under JAX-RPC serialization. See the JAX-RPC specification [22] for details.
• The web service endpoint interface must not include constant (as public final static)
declarations.
• The Bean Provider must designate the web service endpoint interface in the deployment
descriptor by means of the service-endpoint element. The service endpoint itself is only
exposed within a web service if it is referenced by a web service deployment descriptor as
defined by [25].



You may also find this interesting :
http://docs.jboss.org/jbossas/getting_started/v4/html/ws.html
 
The happiness of your life depends upon the quality of your thoughts -Marcus Aurelius ... think about this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic