|
Home > Archive > BizTalk Server Orchestration > May 2005 > Consuming a Web Service Asynchronously
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Consuming a Web Service Asynchronously
|
|
| Paul J. Lay 2005-05-16, 5:50 pm |
| I can see where a BizTalk orchestration can expose a Web Service interface
which can be consumed asynchronously. Is it possible to consume a Web
Service asynchronously from within a Biztalk orchestration? Please advise.
Thanks for your help.
Best Regards,
Paul J. Lay
| |
| Jon Flanders[MVP] 2005-05-16, 5:50 pm |
| What kind of webservice would support the async call?
--
Jon Flanders
http://www.masteringbiztalk.com/blogs/jon/
"Paul J. Lay" <pjlay@msn.com> wrote in message
news:efs5tPlWFHA.584@TK2MSFTNGP15.phx.gbl...
>I can see where a BizTalk orchestration can expose a Web Service interface
> which can be consumed asynchronously. Is it possible to consume a Web
> Service asynchronously from within a Biztalk orchestration? Please
> advise.
> Thanks for your help.
>
> Best Regards,
>
> Paul J. Lay
>
>
| |
| Paul J. Lay 2005-05-16, 5:50 pm |
| Any web service that cannot respond quickly. The .NET AsyncCallback and
IAsyncResult classes can be used in a web service client for asynchronous
web service client requests and status. This works really well in a web
service client outside of a Biztalk orchestration but I don't know how this
could fit inside of a BizTalk orchestration. This is essentially my
question. I would appreciate any insight you might have on this.
Best Regards,
Paul J. Lay
"Jon Flanders[MVP]" <jon.flanders@gmail.com> wrote in message
news:OKJIV3lWFHA.2976@TK2MSFTNGP10.phx.gbl...
> What kind of webservice would support the async call?
>
> --
> Jon Flanders
> http://www.masteringbiztalk.com/blogs/jon/
>
> "Paul J. Lay" <pjlay@msn.com> wrote in message
> news:efs5tPlWFHA.584@TK2MSFTNGP15.phx.gbl...
interface[vbcol=seagreen]
>
>
| |
| Yossi Dahan 2005-05-17, 7:47 am |
| Paul hi,
I am not familiar with the async approach for web services you've mentioned,
but one option that comes into my mind is to consume the web service from
the orchestration as a one way call.
Then publish the schema of the async result you're expecting as a web
service from BizTalk to which the client will eventually call
asynchronously.
You can then use correlation to bring that message back into your
orchestration.
I hope this makes sense
Yossi Dahan
"Paul J. Lay" <pjlay@msn.com> wrote in message
news:%23ipSOAmWFHA.1148@tk2msftngp13.phx.gbl...
> Any web service that cannot respond quickly. The .NET AsyncCallback and
> IAsyncResult classes can be used in a web service client for asynchronous
> web service client requests and status. This works really well in a web
> service client outside of a Biztalk orchestration but I don't know how
> this
> could fit inside of a BizTalk orchestration. This is essentially my
> question. I would appreciate any insight you might have on this.
>
> Best Regards,
>
> Paul J. Lay
>
> "Jon Flanders[MVP]" <jon.flanders@gmail.com> wrote in message
> news:OKJIV3lWFHA.2976@TK2MSFTNGP10.phx.gbl...
> interface
>
>
| |
| Paul J. Lay 2005-05-17, 7:47 am |
| Thanks for your prompt response. Most .NET books have examples of Web
Service clients with synchronous and asynchronous client requests using the
classes I noted earlier. I just don't how support for these classes would
fit within an orchestration other than the approach you have suggested. It
appears that it would be much more difficult to do this within an
orchestration than it is from just a simple web service client. Thanks
again.
"Yossi Dahan" <yossidahan@hotmail.com> wrote in message
news:ezH0lkrWFHA.132@TK2MSFTNGP14.phx.gbl...
> Paul hi,
>
> I am not familiar with the async approach for web services you've
mentioned,
> but one option that comes into my mind is to consume the web service from
> the orchestration as a one way call.
> Then publish the schema of the async result you're expecting as a web
> service from BizTalk to which the client will eventually call
> asynchronously.
>
> You can then use correlation to bring that message back into your
> orchestration.
>
> I hope this makes sense
>
> Yossi Dahan
>
> "Paul J. Lay" <pjlay@msn.com> wrote in message
> news:%23ipSOAmWFHA.1148@tk2msftngp13.phx.gbl...
asynchronous[vbcol=seagreen]
Web[vbcol=seagreen]
>
>
| |
| WenJun Zhang[msft] 2005-05-17, 7:47 am |
| Hi Paul,
From my point of view, you needn't worry about the long-executing
because BizTalk is just designed for this kind of asynchronous
business processing scenarios. Just use a SOAP "solicit-response" to
send the request and wait for the response. Then the workflow will
become pending on the receive, which is still acceptable even if it's
a several days or weeks long process. So you can just think this is
an "asynchronously web service call" from client-side. However due to
the built-in performance tuning feature of BizTalk engine, the long
suspended orchestration instance may be moved out from memory and get
into "dehydrated" state. For this kind of cases, you need a prior
configured correlation set to let the message subscriber engine know
when a response message is finally received which dehydrated instance
has to be actived to process it.
For your reference, the following articles should highlight some
valuable points of this topic, especially the sections like:
"Compensation enables long-running transactions (LRTs) to be
managed..."
Build Better Business Processes with Web Services in BizTalk Server
2004
http://msdn.microsoft.com/msdnmag/i...WS/default.aspx
BizTalk Server 2004 Convoy Deep Dive
http://msdn.microsoft.com/library/d...ary/en-us/BTS_2
004WP/html/956fd4cb-aacc-43ee-99b6-f6137a5a2914.asp
Please update here if you have any further questions. Thanks.
Best regards,
WenJun Zhang
Microsoft Online Partner Support
This posting is provided "AS IS" with no warranties, and confers no
rights.
| |
| Jon Flanders[MVP] 2005-05-17, 5:50 pm |
| WenJun hits it the nail here - the orchestration will implicitally wait for
the message to come back to teh webservice.
If you want to do processing inbetween the send and the receive - put other
shapes inbetween.
--
Jon Flanders
http://www.masteringbiztalk.com/blogs/jon/
""WenJun Zhang[msft]"" <v-wzhang@online.microsoft.com> wrote in message
news:W0YsDktWFHA.388@TK2MSFTNGXA01.phx.gbl...
> Hi Paul,
>
> From my point of view, you needn't worry about the long-executing
> because BizTalk is just designed for this kind of asynchronous
> business processing scenarios. Just use a SOAP "solicit-response" to
> send the request and wait for the response. Then the workflow will
> become pending on the receive, which is still acceptable even if it's
> a several days or weeks long process. So you can just think this is
> an "asynchronously web service call" from client-side. However due to
> the built-in performance tuning feature of BizTalk engine, the long
> suspended orchestration instance may be moved out from memory and get
> into "dehydrated" state. For this kind of cases, you need a prior
> configured correlation set to let the message subscriber engine know
> when a response message is finally received which dehydrated instance
> has to be actived to process it.
>
> For your reference, the following articles should highlight some
> valuable points of this topic, especially the sections like:
> "Compensation enables long-running transactions (LRTs) to be
> managed..."
>
> Build Better Business Processes with Web Services in BizTalk Server
> 2004
> http://msdn.microsoft.com/msdnmag/i...WS/default.aspx
>
> BizTalk Server 2004 Convoy Deep Dive
> http://msdn.microsoft.com/library/d...ary/en-us/BTS_2
> 004WP/html/956fd4cb-aacc-43ee-99b6-f6137a5a2914.asp
>
> Please update here if you have any further questions. Thanks.
>
> Best regards,
>
> WenJun Zhang
> Microsoft Online Partner Support
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
| |
| WenJun Zhang[msft] 2005-05-18, 7:51 am |
| Hi Paul,
Again, long processing web service is acceptable in BizTalk. However
if you prefer manually implement the asynchronous call with .net
AsyncCallback in your own code, you can then use BizTalk messaging
APIs to submit the returned XML document to BizTalk (i.e build a
custom receive adapter). Please refer to the SubmitDirect SDK sample.
It's also not different for you.
SubmitDirect (BizTalk Server Sample)
http://msdn.microsoft.com/library/d...ary/en-us/sdk/h
tm/ebiz_sdk_samples_bgip.asp
Let me know if you have any further questions. Thanks.
Best regards,
WenJun Zhang
Microsoft Online Partner Support
This posting is provided "AS IS" with no warranties, and confers no
rights.
|
|
|
|
|