Author |
Message
|
bazzaa |
Posted: Wed Oct 21, 2009 4:54 am Post subject: Web Service: WS coordination |
|
|
Novice
Joined: 29 Sep 2009 Posts: 18
|
Hi all,
The flow I'm using is something like: SOAPInput--SOAPRequest--Compute--SOAPRequest--Compute--SOAPReply.
I need to coordinate 2 included SOAP request within transaction. Services I'm reffering to are developed under WCF. Is there some mechanisms that allow to do so?
Tnanks! |
|
Back to top |
|
 |
Gaya3 |
Posted: Wed Oct 21, 2009 4:59 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
what is WCF
and what do you mean by cordinating 2 SOAP Requests _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
bazzaa |
Posted: Wed Oct 21, 2009 5:12 am Post subject: |
|
|
Novice
Joined: 29 Sep 2009 Posts: 18
|
Say, two SOAP requests are included into single transactional context.
If one of SOAPRequests operation throws exception I need to rollback both. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Oct 21, 2009 5:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
bazzaa wrote: |
Say, two SOAP requests are included into single transactional context.
If one of SOAPRequests operation throws exception I need to rollback both. |
You'll need to code the flow to handle this. Fiddly, but not that bad. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bazzaa |
Posted: Wed Oct 21, 2009 5:36 am Post subject: |
|
|
Novice
Joined: 29 Sep 2009 Posts: 18
|
Ok, but how could it be coded if web services write to DB and don't introduce deleteFromDB inteface? Operations just supposed to be used in transactional scope from another WS/Client... |
|
Back to top |
|
 |
Vitor |
Posted: Wed Oct 21, 2009 5:44 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
bazzaa wrote: |
Ok, but how could it be coded if web services write to DB and don't introduce deleteFromDB inteface? Operations just supposed to be used in transactional scope from another WS/Client... |
The better question is how the services are rolled back externally to WMB, and how that can be coded into WMB. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Oct 21, 2009 10:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Last but not least you may have to go the compensating transaction route.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Oct 21, 2009 10:53 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Right, so regardless of whether or not Windows Communications Framework has been used to develop the SOAP services, or whether any thing else (including Broker) has been used to develop the SOAP services, here's the thing.
SOAP calls are a) synchronous, b) non-transactional.
A) means that your flow will make SOAPRequest1, and it will not finish this until the SOAP call is successfull.
So you will never have to do anything to roll back the SOAPRequest2 if SOAPRequest1 fails, because SOAPRequest2 will not have been called.
B) means that if the service doesn't define a transactional context, then you have to do a compensating transaction. |
|
Back to top |
|
 |
bazzaa |
Posted: Fri Oct 23, 2009 1:16 am Post subject: |
|
|
Novice
Joined: 29 Sep 2009 Posts: 18
|
Understand, but compensation transactions are not the way here since I have no access to service sources. (Well, actually I have but readonly). So in flow I need to initiate transaction, call 2 services and then commit if it is executed successfully or rollback otherwise. Transactions are managed by MS DTC and service operations are designed properly. |
|
Back to top |
|
 |
zpat |
Posted: Fri Oct 23, 2009 1:25 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
If these are internal applications, recode them to use a transactional protocol like WMQ. Simpler, better, easier to manage.
I think there are extensions to Web services to provide reliability and transactionality but most products do not implement these. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Oct 23, 2009 1:26 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
bazzaa wrote: |
Understand, but compensation transactions are not the way here since I have no access to service sources. (Well, actually I have but readonly). So in flow I need to initiate transaction, call 2 services and then commit if it is executed successfully or rollback otherwise. Transactions are managed by MS DTC and service operations are designed properly. |
From your reply, you do not show an understanding of what a compensating transaction is...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
bazzaa |
Posted: Fri Oct 23, 2009 2:03 am Post subject: |
|
|
Novice
Joined: 29 Sep 2009 Posts: 18
|
fjb_saper wrote: |
From your reply, you do not show an understanding of what a compensating transaction is...  |
As I understood, compensating assumes some undo operation is implemented and in my case such operation(s) are implemented on services layer, not in message flow since I haven't access to service resources.
If I'm wrong with understanding compensating transaction then you'd better fix me in the way different from just pointing to my misunderstanding
Thanks. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Oct 23, 2009 6:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Typically a compensating transaction is implemented on the orchestration layer, not on the services layer. The services layer just needs to allow such a transaction to take place. It can be as simple as replacing an update with another update...
What you need to be able to do is either secure the previous state in order to restore it, or be able to send a compensating update (i.e. a credit in the same amount as the previous debit, etc ...)
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|