title: Web services callback parameters
body: <p>My code:</p>
  
  <pre><code>[ServiceContract]
  public interface IServicesCallBack
  {
      [OperationContract(IsOneWay=true)]
      void mServiceTermine();
  }
  
  
  [ServiceContract(CallbackContract=typeof(IServicesCallBack))]
  public interface IServices
  {
      [OperationContract(IsOneWay=true)]
      void mService(string s);
  }
  </code></pre>
  
  <p>I need to get the parameter <strong>(string s)</strong> in the callback (same as main function).</p>
  
  <p><strong>J2EE platform use mService(string s) to send information to middleware.
  C# client implement IServicesCallBack in the middleware to get the callback but i need the s param in the callback.</strong></p>
  
  <p>Anyone know how to get them in the callback function?</p>
  
  <p>Solution:
  <strong><em>´OperationContext.GetCallbackChannel()´ to get the callback channel. Then you would call ´callbackChannel.mServiceTermine(s);</em></strong></p>