Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
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