Callback to Client in orbacus 3.3.1 not working

[email protected] Sun, 16 Apr 2006 17:10:44 +0530
Newsgroups gmane.comp.corba.orbacus
Message-ID <[email protected]>
Hello,
I hvae written a client in C++ (orbacus version :3.3.1) and its sending
requests to a JAVA server (visibroker) and also receiving callback requests
from the server.
I am able to invoke functions on the server but unable to receive any.
Client code:
      {
            orb = CORBA_ORB_init(argc, argv);
            TRACE("ORB initialized");
            obj = orb->resolve_initial_references("NameService");
            CORBA_BOA_var boa = orb -> BOA_init(argc, argv);
            TRACE("BOA initialized");
            boa->init_servers();

            if(CORBA_is_nil(obj))
            {
                  TRACE("resolve_initial_references is null ");
                  exit(0);
            }
            TRACE ("IOR converted to corba object");
            ctx = CosNaming_NamingContextExt::_narrow(obj);
            if(CORBA_is_nil(ctx))
            {
                  TRACE("ctx is null");
                  exit(0);
            }
            TRACE("NamingCtx_narrow");
            CosNaming_Name *CosNaming_Name_ptr = NULL;
            CosNaming_Name_ptr = (CosNaming_Name
*)(ctx->to_name("ISAFramework"));
            if(CosNaming_Name_ptr == NULL)
            {
                  TRACE("CosNaming_Name_ptr is null");
                  exit(0);
            }
            TRACE("ctx->to_name");
            factoryRef = ctx->resolve(*CosNaming_Name_ptr);
            if(CORBA_is_nil(factoryRef))
            {
                  TRACE("factoryRef is null");
                  exit(0);
            }
            TRACE("ctx->resolve");
            m_ISAFramework =
com_telcordia_iscp_isa_corba_ISAFramework::_narrow(factoryRef);
            if(CORBA_is_nil(m_ISAFramework))
            {
                  TRACE("m_ISAFramework is null");
                  exit(0);
            }
            TRACE("m_ISA narrow init");
            m_accessID = m_ISAFramework->negotiateServiceAccess
(portNumber,clientID,clientGroup);
            TRACE("negotiateServiceAccess");
            m_Client = m_ISAFramework->getISAMessagingProvider(m_accessID,
NULL);
            TRACE("getISAMessagingProvider");
            TRACE("preparing packet...");
            com_telcordia_iscp_isa_corba_ISAInvokeAppMessage iamsg;
            String sysid = "isa_tps",rcid = "iscp",acsid="isa_axs";
            iamsg.originatingSysID = sysid;
            iamsg.receiverID = rcid;
            iamsg.accessID = acsid;

iamsg.errorCode=com_telcordia_iscp_isa_corba_ee_successfulUpdate;
            com_telcordia_iscp_isa_corba_SecurityIDHeader
tmpSecurityIDHeader;
            tmpSecurityIDHeader.paramType =
com_telcordia_iscp_isa_corba_userIDType;
            tmpSecurityIDHeader.paramValue <<=
CORBA_Any::from_string("defaultSecurity",0,false);
            iamsg.securityID = tmpSecurityIDHeader;
            iamsg.actionID.paramType =
com_telcordia_iscp_isa_corba_stringTypeActionID;
            iamsg.actionID.paramValue <<=
CORBA_Any::from_string("ia_dln",0,false);
            iamsg.applicationName.paramType =
com_telcordia_iscp_isa_corba_stringTypeAppName;
            iamsg.applicationName.paramValue <<=
CORBA_Any::from_string("TELE2_VouUpd_ISA",0,false);
            com_telcordia_iscp_isa_corba_InvokeAppDataElement data_elem;
            //Operation code
            data_elem.elementKey = 1 ;
            data_elem.elementType =
com_telcordia_iscp_isa_corba_IntegerDataType;
            data_elem.elementValue <<= 1;
            iamsg.dataList.insert(data_elem);

            //MDN
            data_elem.elementKey = 2 ;
            data_elem.elementType =
com_telcordia_iscp_isa_corba_StringDataType;
            data_elem.elementValue <<=
CORBA_Any::from_string("919210558645",0,false);
            iamsg.dataList.insert(data_elem);
            TRACE("calling startMessagin...");
            m_msgCor = m_Client->startMessagingSession(iamsg, m_accessID);
            TRACE("msgCor received"); //works till here.
            com_telcordia_iscp_isa_corba_ISAMessagingBase_var m_ISAMsgBase
= new com_telcordia_iscp_isa_corba_ISAMessagingBase_impl;
            while(1){} //waiting here ...but no callback received.

      }

_impl code://the tow functions are supposed to be invoked by the server
#include <isa2way_impl.h>


void
com_telcordia_iscp_isa_corba_ISAMessagingBase_impl::endMessagingSession(const
 com_telcordia_iscp_isa_corba_ISAInvokeAppMessage& finalMsg,
                                     const
com_telcordia_iscp_isa_corba_ISAMessageCorrelation& msgCorrelation,
                                     const char* isaAccessToken)
  {
      cout <<"endMessagingSession"<<endl;
  }

void
com_telcordia_iscp_isa_corba_ISAMessagingBase_impl::noReplyFromReceivingSystem(const
 com_telcordia_iscp_isa_corba_ISAMessageCorrelation& msgCorrelation,
                                            const char* isaAccessToken)
  {
      cout <<"noReplyFromReceivingSystem"<<endl;
  }



_______________________________________________
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