Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

some C++ CORBA HELP!


  • Please log in to reply

#1
sidrocks

sidrocks

    New Member

  • Member
  • Pip
  • 5 posts
hi,
im new to CORBA, so this may seem a very stupid question but its getting on my nerves..

suppose,
1] i want to write a client application in c++ for a server application
2] im using ACE TAO
3] i know the ip address and also know the port no. of the naming service and also the registered name of the object in the naming service (the name which would be put in place of "SomeName" below)

so my question is how and where does my client application specify this IP address and naming service port???
ive done something similar to the following code.


i understand that we have to follow the following steps:


// First initialize the ORB, that will remove some arguments...
CORBA::ORB_var orb =
CORBA::ORB_init (argc, argv);

CORBA::Object_var naming_context_object =
orb->resolve_initial_references ("NameService");
CosNaming::NamingContext_var naming_context =
CosNaming::NamingContext::_narrow (naming_context_object.in ());

CosNaming::Name name (1);
name.length (1);
name[0].id = CORBA::string_dup ("SomeName");

CORBA::Object_var factory_object =
naming_context->resolve (name);

// Now downcast the object reference to the appropriate type
ModuleName::InterfaceName_var factory =
ModuleName::InterfaceName::_narrow (factory_object.in ());


PLEASE HELP!!
really very urgent

thank u so much
:whistling:

Edited by sidrocks, 06 July 2006 - 11:03 AM.

  • 0

Advertisements







Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP