none
Calling Trading Partner Web Service RRS feed

  • Question

  • We have a requirement to call Trading Partner's secure web service  every 10 mins to get latest business process details in a SOA loosely coupled way.  When we call a particular web method is will return us messages which either can be new/amended one's. 

     Once we received it, we need to split the new and amended ones into two.  Even new ones needs to be classified further.   Need to apply sorting etc.  There is some logic involved.

    Options:  

                    We can expose a web service to pull the messages.  And we need to schedule it.  Once the message in-house then we can kick some other business process to deseralize the message into a cache and play with it.  Master

    But just to know how others handled this situation and what’s the best practice. 

    Note: Caching App fabric caching any good?

    Monday, May 28, 2012 2:34 PM

Answers

  • Hi Triver,

    You can poll a receive location (mapped to a webservice).

    You can flag the messages so that once you receive all the messages you can put them in order to process them as per your business logic.

    So once the message is processed you can use send port to update message to CRM system.

    Thanks.

    //Ankur


    Ankur Seth

    Tuesday, May 29, 2012 9:32 AM
  • Hi

    So If I understand it correctly it is something like below:

    Your Service-> As per my understanding

     1- While (1), Loop ( we would need re-try pattern here)

     2- Call Partner Service, Get XML File

     3- Collect Order Information, from the Batch of Orders ( We would need de-batching here)

     4- Process single Order Information (either Insert or Update) , We can use Scatter Pattern to distribute the sinle order to processing orchestration

     5- Update CRM

     6- End Loop

    OR

    You want to break the process in two steps/services.

    Service A only does the call of your partner webservice and get the Order Batch xml File. In this case you can try to implement re-try pattern. You can write a single orchestration which will be long running and keep on polling the partner service using 15 minute delay.

    Once the service gets a batch of xml file, It submit it to messagebox from your 2nd service, Service B will start.

    Service B, will try to debatch the messages in orchestration using xpath and use scatter and gather pattern to distribute the orders to order processing orchestrations to process them ( insert/update). then the same orchestartion will update your CRM.

    There might be one issue in the above approach, A same order might arrive more than one time in xml batch , Or it may not be the case ?

    I have been reading BizTalk 2010 CookBook , there is a very detail chapter on using patterns in BizTalk solutions, Please have a look.

    Please let me know if you have any queries.


    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"

    Tuesday, May 29, 2012 12:59 PM
    Moderator

All replies

  • Can you provide some additional information to help us determine the best approach?

    1. How large will your batch of new and ammended messages be?
    2. Are the new and ammended messages contiguous or can they come in any particular order?  If they come in any order, is your trading partner willing to order them?
    3. After you've procesed the messages, what will you be doing with them?

    The answers to these questions will substantially change the recommendations of how you should proceed.


    David Downing... If this answers your question, please Mark as the Answer. If this post is helpful, please vote as helpful.

    Monday, May 28, 2012 4:04 PM
  • thanks for your reply david.

    1.  We need to poll every 15 mins.  I reckon it would be around 30KB

    2.  Will be any order that's the reason we need to cache it and play with it.  I don't think they can send us order of our wish.

    3.  Once we processed the messages, we need to update in our CRM System through webservice calls.

    Tuesday, May 29, 2012 8:32 AM
  • Hi Triver,

    You can poll a receive location (mapped to a webservice).

    You can flag the messages so that once you receive all the messages you can put them in order to process them as per your business logic.

    So once the message is processed you can use send port to update message to CRM system.

    Thanks.

    //Ankur


    Ankur Seth

    Tuesday, May 29, 2012 9:32 AM
  • Hi

    So If I understand it correctly it is something like below:

    Your Service-> As per my understanding

     1- While (1), Loop ( we would need re-try pattern here)

     2- Call Partner Service, Get XML File

     3- Collect Order Information, from the Batch of Orders ( We would need de-batching here)

     4- Process single Order Information (either Insert or Update) , We can use Scatter Pattern to distribute the sinle order to processing orchestration

     5- Update CRM

     6- End Loop

    OR

    You want to break the process in two steps/services.

    Service A only does the call of your partner webservice and get the Order Batch xml File. In this case you can try to implement re-try pattern. You can write a single orchestration which will be long running and keep on polling the partner service using 15 minute delay.

    Once the service gets a batch of xml file, It submit it to messagebox from your 2nd service, Service B will start.

    Service B, will try to debatch the messages in orchestration using xpath and use scatter and gather pattern to distribute the orders to order processing orchestrations to process them ( insert/update). then the same orchestartion will update your CRM.

    There might be one issue in the above approach, A same order might arrive more than one time in xml batch , Or it may not be the case ?

    I have been reading BizTalk 2010 CookBook , there is a very detail chapter on using patterns in BizTalk solutions, Please have a look.

    Please let me know if you have any queries.


    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"

    Tuesday, May 29, 2012 12:59 PM
    Moderator