none
calling asynchronous wcf service from orchestration

    Question

  • Hello All,

    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

    Ajay Gangwar

    jeudi 17 mai 2012 21:45

Réponses

Toutes les réponses

  • Any suggestions please!!!
    vendredi 18 mai 2012 07:22
  • 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

    HTH,
    Naushad Alam

    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
    alamnaushad.wordpress.com
    My new TechNet Wiki "BizTalk Server: Performance Tuning & Optimization"

    vendredi 18 mai 2012 08:54
    Modérateur
  • 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

    Ajay Gangwar

    vendredi 18 mai 2012 09:51
  • 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.

    Etc.

    I'm not aware of any special considerations


    Leonid Ganeline [BizTalk MVP] BizTalkien: Naming Convention for BizTalk Solutions

    dimanche 20 mai 2012 17:11
    Modérateur
  • 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.

    Thanks


    SKGuru

    lundi 21 mai 2012 14:47
  • 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

    -Dan


    If this answers your question, please Mark as Answer

    lundi 21 mai 2012 18:23
  • Hello Guru,

    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.

    Ajay

    samedi 16 juin 2012 09:02
  • 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. 

    I


    Leonid Ganeline [BizTalk MVP] BizTalkien: Naming Conventions for the BizTalk Solutions

    dimanche 17 juin 2012 19:52
    Modérateur
  • http://social.msdn.microsoft.com/Forums/en-US/biztalkr2adapters/thread/8afe1208-c329-4b53-9263-1c0d2a0eef4b

    Please refer above URL for the solution.

    • Marqué comme réponse Ajay Gangwar lundi 18 juin 2012 20:18
    lundi 18 juin 2012 20:18