cancel
Showing results for 
Search instead for 
Did you mean: 

How to develop Asynchronous Document Based WebServices?

Former Member
0 Kudos

Hi gurus,

The scenario is, We are developing an architecture where Asynchronous Document Based WebServices are desired.

As per my knowledge, This architecture includes some

work at JMS side.

Meaning,

Client -


> Calling [WebService] -


> Deletgate --

-


>JMQ (Java Message Queue)

Would appreciate ur thoughts here...

Regards,

Arvind Kugasia [akugusia@hcl.in]

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Arvind,

what in more details is your scenario - in case a call is made to your web service, you will send a JMS message and the webservice will exit.

There will be a MDB that is listening to the JMS queue and performing the operation inside the onMessage() - is this so ?

If yes, then I think that is a classic example for the the usage of JMS and the asynchronous invocations.

HTH

Peter

Former Member
0 Kudos

Hi Peter,

Tnks for ur knowledge sharing.

The little googling i did, made me reach to a stage from where i could think, currently asynchronous JMS based approached are supported by (Apache-Axix, IBM-MQSeries)

Would appreciate if u can share the link or an article where such approach is exposed and used.

Thanks & Regards,

Arvind Kugasia [akugusia@hcl.in]

Former Member
0 Kudos

Hi Arvind,

this "pattern" - sending JMS message and performing some long asynchronous tasks in MDB is a standard J2EE way.

That should be supported by any j2ee server that at least covers J2EE 1.3 (where MDB-s are introduced). That includes the SAP Web AS as well and its JSM and EJB implementation as well.

The message can be sent from a servlet, web service, etc.

In fact the classic petstore application released from sun as a model for developing J2EE applications uses MDB-s for that purposes :

http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/sample-app/sample-app...

Once you buy the parrot from the petstore, you will see the response page while the MDB will perform asynchonously the sending of the mail, charging of the account, etc.

It doesn't matter if the front end is a web service or a HTTP UI.

In addition you can google for any J2EE tutorial and MDB explanation.

However please note that I am speaking how your application will gather the parameters from the web service call, put them in a JMS message and send the message via several lines of java code.

Perhaps some other frameworks (Apache-Axis, etc.) are doing this automatically for you or are generating the code that sends the message via some wizard.

That up to my knowledge is not supported for SAP WebAS, but that is only a 10 lines of code inside the web service body, that can be easily created.

HTH

Peter

Answers (0)