Meilleur auteur de réponses
I need to consume an Asynchronous WCF service in the orchestration. This is the 3rd part service and we have been told that they(3rd party) have implemented their operations Asynchronously and will send the response using ASyncCallBack.
Now, my question is, calling this WCF service from the orchestration would need any special consideration or we can call it as a normal WCF service from the orchestration.
Please note that the service may take upto 10 minutes to send the response back so I am planning to call it in long running orchestration. Is that correct? or there is any better way to implement this? Thanks in advance.
Thanks & Regards
Toutes les réponses
Please note that the service may take upto 10 minutes to send the response back so I am planning to call it in long running orchestration. Is that correct? or there is any better way to implement this?--> IMHO, You can set the "SendTimeout" property on send port, Please see this similar thread, It mya help you
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
My new TechNet Wiki "BizTalk Server: Performance Tuning & Optimization"
Thanks Naushad for your reply.
Yes, the setting at the send port to increase the time out, I have to do in any case. I am using long running orchestrations because if I wont use the long running orchestration then the orchestration itself might get timedout, also I need to write the timeout exception in BAM if I do not receive the response in defined time period.
By my 1st question was, calling the asynchronous WCF service from the orchestration would need any special consideration or we can call it as a normal WCF service from the orchestration. Do you have any idea on that?
Thanks & Regards
It can be implemented as a single orchestration maybe the long-running orch.
It can be implemented as two orchestrations, the first one for request and the second one for response.
I'm not aware of any special considerations
Leonid Ganeline [BizTalk MVP] BizTalkien: Naming Convention for BizTalk Solutions
We had similar situation and i approached it as follows.
First, i created a service that will handle the response asynchronously. In the request to the service, i passed the URL so that the service can send the response back later say after 10 min. I will do all other possible steps where the response is not required. Then, I implemented correlation to receive this message using some unique key field (both in the request and response). Probably, you can pass the InstanceID in the request and ask the Service to send it back. (Or else any data field will do).
This approach will help to reduce the overall time in case you do some more steps after receiving the response.
I would imagine an orchestration would be perfect for this. Use the WS-Addressing capabilities (i.e. WCF.ReplyToAddress property) to set the URL for the reply and put in a GUID (or piece of unique message contact) as a query string. You'll probably have to expose a service that matches the callback (which shouldn't be too hard and SoapUI can help you with if nothing else). I'd imagine this would be the reverse side of Paolo Salvatori's fine example here: http://blogs.msdn.com/b/paolos/archive/2011/01/20/how-to-use-duplex-mep-to-communicate-with-biztalk-from-a-net-application-or-a-wf-workflow-running-inside-appfabric-part-3.aspx
If this answers your question, please Mark as Answer
I was trying to implement your suggestion. So I had created a service (exposing the orchestration as service) to receive the response asynchronously from the 3rd party service.
Could you please let me know how did you pass the URL to 3rd party service when sending the request. I tried to send the URL using WCF.ReplyToAddress but I am not getting anything back any response from 3rd party. Does 3rd party need to do anything to send the response to my URL?
Your quick response will be highly appreciated as it has become urgent for me. Thanks a lot.
When you consume this service, what is the send port generated for this service?
Is it two-way port? If so, you don't have to care is it synch or asynch implementation.
Leonid Ganeline [BizTalk MVP] BizTalkien: Naming Conventions for the BizTalk Solutions