my dog learned polymorphism
The moose likes Web Services and the fly likes how to create MDB as webservice in ejb 2.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "how to create MDB as webservice in ejb 2.1" Watch "how to create MDB as webservice in ejb 2.1" New topic

how to create MDB as webservice in ejb 2.1

manish gupta
Ranch Hand

Joined: Nov 06, 2005
Posts: 36
Hi ,
As per the ejb2.1 we can create the MDB without JMS client
In my requirement I want to create MDB as a webservice so that MDB can consume the SOAPMessage.
We have interface javax.xml.messaging.ReqRespListener that is having the onMessage(SOAPMessage m) return also SOAPMessage.

I have a JAXM client form which I can send SOAPmessage but how to configure the MDB for this scenario?
I am using the weblogic appserver 9.1 ,how to create the weblogic-ejb-jar,ejb-jar .xml for this requirement because I am not using the JMS .
I need some examples.

I would be appreciate you if u resolve my problem.

Peer Reynders

Joined: Aug 19, 2005
Posts: 2933
You may want to post this question in one of the BEA forums.

  • EJB 2.1 is part of J2EE - JAXM is not. Many J2EE vendors see JAXM as having an unnecessary overlap with JMS and JAX-RPC.
  • JAXM-MDBs are part of JAXM. Under regular J2EE only stateless session beans can be exposed as a Web service.
  • Regardless if you use a servlet-based endpoint or an EJB-based endpoint you won't have a response to send back to the Web service client after you post the XML/SOAP message to a JMS Queue or Topic. Web services of this kind usually use the One-Way Message Exchange Pattern, i.e. no SOAP response is returned to the client. The MDB will have to find an alternate route to return the response to the original client.

  • See also
    6.3.2 Enterprise Beans and JMS Approach Communication Technologies
    8.4.3 Refactoring Synchronous to Asynchronous Interactions

    Asynchronous operations and Web services, Part 1: A primer on asynchronous transactions
    Asynchronous operations and Web services, Part 2
    [ April 25, 2006: Message edited by: Peer Reynders ]
    I agree. Here's the link:
    subject: how to create MDB as webservice in ejb 2.1
    It's not a secret anymore!