Re: ORBACUS CLIENT and EJB server

"Anoop Ahamad" <[email protected]>
Newsgroups gmane.comp.corba.orbacus
Message-ID <[email protected]>
Hi Darren,
   Please find the CPP source code that I have pasted below.

 #include <OB/CORBA.h>
#include <OB/CosNaming.h>
#include "CorbaEai.h"
#include<iostream>

int main(int argc, char* argv[])
{
  try {
    CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);

    cout << "Accessing the naming service" << endl;
    CORBA::Object_ptr o = orb->resolve_initial_references("NameService");

    cout << "Getting the naming context" << endl;
    CosNaming::NamingContext_var context =
CosNaming::NamingContext::_narrow(o);
    CosNaming::Name name;
    name.length(1);
    name[0].id = CORBA::string_dup("corba-eai");
    name[0].kind = CORBA::string_dup("");

    cout << "Resolving the home interface" << endl;
    CORBA::Object_var object = context->resolve(name);
    eai::CorbaEaiHome_var ceaihome = eai::CorbaEaiHome::_narrow(object);

    cout << "Creating a new instance" << endl;/////////////???////THE
EXECUTION STOPS AT THIS LINE ALWAYES
    eai::CorbaEai_ptr ceai = ceaihome->create();

    CORBA::Long r = ceai->sum((CORBA::Long)15,(CORBA::Long)20);

    //cout << "Result: " << r << endl;
 cout<< "Result"<<endl;
  }
  catch(const CORBA::Exception& e) {
    cout << "Exception: " << e << endl;
  }
  return 0;
}
I am getting the error just before getting the referrence to the remote
object..
The ejb is beeing depolyed in  a weblogic8.1 server.
We are using orbacus4.2.x on windows platform.
After the clientside exe is created in the vc++ editor..
I am invoking the server side code with the following command.

HelloOrbaClient.exe -ORBInitRef
NameService=corbaloc:iiop:[email protected]:7001/NameService
Is this one is correct or not?

Yes, the runtime error is coming at the client side.
The error message I am getting is
" This application has requested the Runtime to terminate it in an unusual
way.Please contact the application's support team for more information."

Please tell me where I am going wrong.
Thanks in advance.

Regards
Anoop


----- Original Message -----
From: "Darren Middleman" <[email protected]>
To: "Anoop Ahamad" <[email protected]>
Cc: <[email protected]>
Sent: Wednesday, February 09, 2005 7:24 PM
Subject: Re: [OB-Users] ORBACUS CLIENT and EJB server


> Hi Anoop,
>
> On Wed, Feb 09, 2005 at 10:01:24AM +0530, Anoop Ahamad wrote:
> > Hi
> >
> >     When I am trying to communicate EJB server deployed in weblogic from
> > C++ ORBACUS client, it could not create the home interface. That time it
> > shows Abnormal program termination. Anybody please help me.
> >
> > Thanks in advance
> > Anoop Ahamad
> >
>
> I'm not sure I completely understand what your issue is here.  Can you
> provide some more details on what you are trying to do and the exact error
> message you are getting.  Is it the server or client showing the abnormal
> program termination?  Also, which platform, compiler and version of
Orbacus
> are you using?
>
> Regards,
> Darren
>
> --
> Darren Middleman, Software Engineer
> Team Orbacus - Your CORBA Source
> Email: mailto:[email protected]
> WWW: http://www.orbacus.com/
>

_______________________________________________
OB-Users Mailing List - [email protected]
http://mail.ooc.nf.ca/mailman/listinfo/ob-users
Visit our support FAQ before you send a message.
http://www.orbacus.com/faq/support.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.