Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8397671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:51:11+00:00 2026-06-09T20:51:11+00:00

I have a WCF client, that asks for order confirmation and WCF service with

  • 0

I have a WCF client, that asks for order confirmation and WCF service with two methods:

1) UpdateOrder – updates order data in database (UpdateOrder call comes from external service)
2) GetConfirmationResult – which holds return of result till order status will change from pending to something else.

Question is, how to make notification from UpdateOrder to GetConfirmationResult, that order status has changed, in WCF?

Update: would be best, if I could leave InstanceContextMode as Per-Call.

Update 2: Let’s say possible order statuses are Pending, Confirmed, Rejected. ConfirmOrder may change order status to Confirmed or Rejected, GetConfirmationResult should not return result until it is changed by Confirm order.

Update 3: I’ve changed image with sequence to display whole stack.

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T20:51:13+00:00Added an answer on June 9, 2026 at 8:51 pm

    At the moment I’ve solved it using EventWaitHandle – not sure if it is the best way, but it looks quite clean, nicely supports timeout and is quite testable.

    public class TestClass 
    {
        public static event OrderUpdateHandler UpdatedOrder;
    
        public void UpdateData(Order order) 
        {
            // ...
    
            OnOrderUpdated(args);
        }
    
        public Order GetConfirmedOrder(int id, TimeSpan waitToConfirm) 
        {
            var order = GetOrderFromDatabase();
    
            if (order.Status == OrderStatus.Pending) 
            {
                 var eventHandle = new EventWaitHandle(false, EventResetMode.AutoReset);
    
                 UpdatedOrderHandler waiter = (s, e) =>
                 {
                    if (e.Order.Id == id)
                    {
                        order = e.Order;
                        eventHandle.Set();
                    }
                };
    
                UpdatedOrder += waiter;
    
                if (!eventHandle.WaitOne(waitToConfirm))
                {                
                    return order;
                }
    
                OrderUpdated -= waiter;
            }
    
            return order;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF client/service app that relies on secure communication between two machines
I have a WPF client that is using WCF to call into a service
I have a WCF service that provides access to some data. Our client has
I have a complex RIA client that communicates with a WCF SOAP web service,
I have a WCF Service that I want my client to be able to
I have a Linux/c client app that connects to a WCF web service over
I have a WCF service that receive query from a silverlight client and send
I have a series of WCF services that invoke methods on the client again
I have a WCF service that provides a couple of methods. A Windows Forms
I have a WCF web service that exposes several business methods. I also have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.