This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
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
Author

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.

Thanks
Manish
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
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
    8.2.1.1 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: http://aspose.com/file-tools
     
    subject: how to create MDB as webservice in ejb 2.1