summaryrefslogtreecommitdiff
path: root/TAO/tests/Bug_2349_Regression/client.cpp
blob: 5d1487de278424ba033c2ad37c403a9b0dcbcffd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// $Id$

#include "fooC.h"
#include "ace/Log_Msg.h"

const char* ior = "file://server.ior";

int
ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
  try
    {
      CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);

      CORBA::Object_var tmp = orb->string_to_object(ior);

      foo_var server = foo::_narrow(tmp.in ());

      if (CORBA::is_nil (server.in ()))
        {
          ACE_ERROR_RETURN ((LM_DEBUG,
                             "Nil foo reference <%s>\n",
                             ior),
                            1);
        }

      server->destroy ();

      server->shutdown ();

      orb->destroy ();
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception ("CORBA::Exception");
    }

  return 0;
}