Solved

Delphi 4 and CORBA..

Posted on 1999-01-27
5
271 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
  • 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now