Solved

Delphi 4 and CORBA..

Posted on 1999-01-27
5
278 Views
Last Modified: 2010-08-05
We have a CORBA server object written in PERL. The IDL has been generated using IDL2PAS.  That is a whole other story.  I can't even connect to the CORBA server.  I am using the TCorbaConnect object.  I put the hostname and repositoryid and switch connected to TRUE and it says "NO_IMPLEMENT"  What am I missing?  The guys who wrote it conenct to it with no trouble from PERL.  They pass all kinds of other variables such as ORBServices=CosNaming and SVCnameroot=CorbaJava.  What am I doing wrong?  The object exists.  Why can't I connect to it.  I am not trying to do anything else.

I need a full explanation as well as source code.

Thank you..
0
Comment
Question by:lorenkoss
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 13

Accepted Solution

by:
Epsylon earned 200 total points
ID: 1363619
Are the ObjectName and RepositoryID Correct?
Can you connect to the Corba server? Try to ping the ip address.
Run Visibroker's Smart Agent and Smart Finder to look for Corba Objects on the network. If the wanted object is listed, check the NAME and IDL. You should now be able to connect to it.
0
 

Author Comment

by:lorenkoss
ID: 1363620
Epsylon,
Thanks, I didn't know about those apps.. I don't know what smart agent does, but smart finder did find the corba server and listed the objects. I now typed it in the TCorbaConnection object and it now says "BAD_OPERATION" instead of "NO_IMPLEMENT" which is what it was saying yesterday.

What am I doing wrong?
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 1363621
If you are writing a client for a CORBA server that was not written using Delphi, you must write your own descendant of TCorbaStub to provide marshaling support for your client. You must then register this stub class with the global CORBAStubManager. Finally, to instantiate the stub class and get the server interface, you can call the global BindStub procedure to obtain an interface which you then pass to the CORBA stub manager’s CreateStub method.
0
 

Author Comment

by:lorenkoss
ID: 1363622
Thanks, I still am having trouble.  I have 3 files created using the IDL2PAS program by Kevin Smith.  The CORBA objects are TickerServer and Ticker.  IDL2PAS created a ITickerServerStub object, ITickerStub, TTickerServer, and TTicker objects..  I tried TTickerServer.Create, but that requires some variables.  I also read about CreateStub, but am still confused.  For all your help, I'm adding 10 more points (sorry, its all I have)..
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 1363623
You can use Dii. You don't have to use stubs this way.
First the server interface must be registered with an Interface Repository. You have already done this.
In the client app, obtain the server interface and assign it to a TAny vaiable:

var
  IntToCall: TAny;
begin
  IntToCall := CorbaBind('IDL:MyServer/MyServerObject:1.0');
  ...

Then you can call the interface's methods. This example is copied from the Delphi help files:

var

  HR, Emp, Payroll, Salary: TAny;
begin
  HR := CorbaBind('IDL:CompanyInfo/HR:1.0');
  Emp := HR.LookupEmployee(Edit1.Text);
  Payroll := CorbaBind('IDL:CompanyInfo/Payroll:1.0');
  Salary := Payroll.GetEmployeeSalary(Emp);
  Payroll.SetEmployeeSalary(Emp, Salary + (Salary * StrToInt(Edit2.Text) / 100));
end;



0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question