Solved

Delphi 4 and CORBA..

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses
Course of the Month7 days, 13 hours left to enroll

632 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