Exemplo n.º 1
0
 public void callService()
 {
     try
     {
         InstanceContext context = new InstanceContext(this);
         proxy = new ServiceClient(context);
         proxy.NormalFunction();
     }
     catch (EndpointNotFoundException ex)
     {
         Program.logger.Error(ex.Message.ToString());
         Console.WriteLine("Error:" + ex.Message.ToString());
     }
     catch (FaultException ex)
     {
         Console.WriteLine("Error:" + ex.Message.ToString());
         Program.logger.Error(ex.Message.ToString());
     }
     catch (Exception ex)
     {
         Console.WriteLine("Error:" + ex.Message.ToString());
         Program.logger.Error(ex.Message.ToString());
     }
 }