Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Publishing webservice with callback (or other way to do an asynchronous service)
- This topic has 4 replies, 1 voice, and was last updated 9 years, 10 months ago by
community-content.
-
AuthorPosts
-
-
December 3, 2009 at 2:20 AM #23841
Hi biztalk gurus.
I want to expose a schema or orchestration as a webservice that takes some data and inserts it into a database. It could potentially be a very large number of inserts and I don’t want it to time out for the client. Is there a way to make the exposed webservice asynchronous and call a callback function when all inserts are done? Or should I do some other way?
(I’m using BT 2006.)
Thanks in advance.
Johan
-
December 3, 2009 at 2:22 AM #23842
Sorry I posted this in the wrong subforum. It should be in BT 2006, not R2 as I have posted.
BR
Johan
-
December 3, 2009 at 10:40 AM #23844
Hi Johan,
To my knowledge, exposing a schema or orchestration in BizTalk 2006 as an asynchronous web service is not possible. However, in your client application, you can call that web service asynchronously. Check out the following article for such an implementation:
http://ondotnet.com/pub/a/dotnet/2005/08/01/async_webservices.html
I hope this helps!
Daniel.
-
December 7, 2009 at 1:56 AM #23849
Thanks Daniel,
Yes, it seems that the client would have to do async over sync. I wonder though if I would get a timeout if the call takes more than the 90 seconds or so that is the default timeout value. Probably. And that would not be expected to happen in a real async call. Another alternative would be to implement polling or something.
I have seen that even in BT 2009 async callbacks are very well hidden and you have to overwrite stuff that the wizard outputs. There’s certainly room for improvement in this area.
-
December 7, 2009 at 3:27 PM #23854
Daniel’s reference above refers to performing aynschronous IO within a process. Its aim is to prevent the calling application from blocking on the web service call allowing it to perform other work. This has no effect on the on the web service calls across the network – the web service is still synchronous i.e. the response contains the result of processing the message. You still have the same limitations with regards to timeouts, etc.
What you need is two web services, one hosted on Biztalk and the other hosted on the calling application. The client calls the Biztalk web service which responds straight away and then begins processing the message. When this message processing has completed Biztalk calls the client web service with the results of this processing. The length of time Biztalk takes to complete processing is limitless.
This pattern can be acheived using Biztalk 2006. You simply publish a web service from the calling application and consume this from Biztalk. In an orchestration you receive the initial message from the Biztalk web service and respond immediately. After your processing is complete call the calling applications web service with the results. You will need to hard code the return address in a send port. (With the WCF adapter you would be able to use the WS-Addressing header and add a Reply-To address on the Biztalk web service call to make the process slightly more dynamic).
You will need to ensure the calling application is capable of using this pattern.
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.