[omniORB] omniidl generates wrong code

Juergen Weber weberjn at gmail.com
Tue Dec 4 23:59:57 GMT 2007


Hi,

for the attached IDL (distilled from an rmic generate) omniidl
generates wrong code
in CustomerServiceSK.cc

It seems there are 2 colons too many, if I replace all :::: with ::
the code compiles.

Greetings,
Juergen

omniidl -bcxx  -I. -I/home/weberjn/omniORB-4.1.1/idl CustomerService.idl

weberjn at ubuntu:~/c/CustomerService$ omniidl -V
omniidl version 1.0

(1.0 ?)



CustomerServiceSK.cc: In member function 'virtual void*
javax::ejb::_objref_HomeHandle::_ptrToObjRef(const char*)':
CustomerServiceSK.cc:956: error: expected id-expression before '::' token
CustomerServiceSK.cc:956: error: expected `)' before '::' token

...

void*
javax::ejb::_objref_HomeHandle::_ptrToObjRef(const char* id)
{
  if( id == ::javax::ejb::HomeHandle::_PD_repoId )
    return (::javax::ejb::HomeHandle_ptr) this;
  if( id == ::::CORBA::AbstractBase::_PD_repoId )
    return (::::CORBA::AbstractBase_ptr) this;
-------------- next part --------------


/*
module CORBA{

    valuetype StringValue string;
    valuetype WStringValue wstring;

};
*/

#include "orb.idl"

module java
{
	module lang
	{
	
	  typedef any _Object;
	
		valuetype JavaException
		{
			public ::CORBA::WStringValue detailMessage;
		};
		#pragma ID JavaException "RMI:java.lang.Exception:77E8B62CD7E79AA2:D0FD1F3E1A3B1CC4"
		
		exception Ex
		{
			::java::lang::JavaException value;
		};
	};

};

module javax
{
	module ejb
	{
		valuetype RemoveException : ::java::lang::JavaException
		{
		};
		#pragma ID RemoveException "RMI:javax.ejb.RemoveException:048A3675A6FD5463:C06A008FD05A462A"
		

		exception RemoveEx
		{
			::javax::ejb::RemoveException value;
		};

		valuetype CreateException : ::java::lang::JavaException
		{
		};
		#pragma ID CreateException "RMI:javax.ejb.CreateException:048A3675A6FD5463:575FB6C03D49AD6A"
		exception CreateEx
		{	
			::javax::ejb::CreateException value;
		};
		
//		  abstract valuetype EJBMetaData {

//#pragma ID EJBMetaData "RMI:javax.ejb.EJBMetaData:0000000000000000"


//};

interface EJBHome;
  abstract  interface HomeHandle {
    readonly attribute ::javax::ejb::EJBHome EJBHome;


#pragma ID HomeHandle "RMI:javax.ejb.HomeHandle:0000000000000000"


};		

interface EJBObject;

  abstract interface Handle {
    readonly attribute ::javax::ejb::EJBObject EJBObject;


#pragma ID Handle "RMI:javax.ejb.Handle:0000000000000000"


};


		
		  interface EJBHome {
//    readonly attribute ::javax::ejb::EJBMetaData EJBMetaData;

    readonly attribute ::javax::ejb::HomeHandle homeHandle;

    void remove__javax_ejb_Handle( in ::javax::ejb::Handle arg0) raises (::javax::ejb::RemoveEx);
    void remove__java_lang_Object( in ::java::lang::_Object arg0) raises (::javax::ejb::RemoveEx);

#pragma ID EJBHome "RMI:javax.ejb.EJBHome:0000000000000000"


};
		
		
		  interface EJBObject {
		    readonly attribute ::javax::ejb::EJBHome EJBHome;
		
		    readonly attribute ::java::lang::_Object _primaryKey;
		
		    readonly attribute ::javax::ejb::Handle handle;
		
		    void remove() raises (::javax::ejb::RemoveEx);
		    boolean isIdentical( in ::javax::ejb::EJBObject arg0);
		
		#pragma ID EJBObject "RMI:javax.ejb.EJBObject:0000000000000000"
	};
		
		
	};
};




module ejb 
{
    valuetype Customer {
    
        private long birthyear;
        private ::CORBA::WStringValue id;
        private ::CORBA::WStringValue name;
        factory create(
            in ::CORBA::WStringValue arg0,
            in ::CORBA::WStringValue arg1,
            in long arg2 );
    
    };

#pragma ID Customer "RMI:ejb.Customer:5149C1FD0850AB64:FF270EEC7900A92C"

    interface CustomerService: ::javax::ejb::EJBObject {
    
        void ping( );
        boolean doesCustomerExist(
            in ::CORBA::WStringValue arg0 );
        ::ejb::Customer findCustomer(
            in ::CORBA::WStringValue arg0 );
    
    };
    

#pragma ID CustomerService "RMI:ejb.CustomerService:0000000000000000"

  
  
  interface CustomerServiceHome : ::javax::ejb::EJBHome {
    ::ejb::CustomerService create() raises (::javax::ejb::CreateEx);

#pragma ID CustomerServiceHome "RMI:ejb.CustomerServiceHome:0000000000000000"
  
  
  };
  
};




More information about the omniORB-list mailing list