Contact us | Links

Does IIOP.NET work with Microsoft's .NET 1.1?

Yes, it does. This is in fact the platform it was developed on.

Does IIOP.NET work with Microsoft's Windows CE .NET (Compact Framework)?

No, because Windows CE .NET has no remoting support at all.

Does IIOP.NET support Visual Studio's Intellisense?

There is an implementation limitation in Intellisense for C#: it cannot extract type information from multimodule assemblies, thus you won't be able to see the interfaces and proxies generated with the IDLToCLSCompiler using Intellisense while writing C# code.

This limitation is not present in Intellisense for Visual Basic. Another workaround is to merge the multimodule assemblies into a single assembly; we know of a commercial tool for this purpose called "Salamander.NET linker".

Does IIOP.NET work with mono?

Currently (mono 0.28) not, but only few features are missing. We are regularly testing IIOP.NET against the mono CVS and reporting the problems we find to the mono team.

We expect IIOP.NET to work on Mono pretty soon.

Can IIOP.NET interoperate with BEA WebLogic 6.1?

Yes, it can. Some hints are provided in the EJB example tutorial and in the WebLogic 6.1 interoperation howto.

Can IIOP.NET interoperate with BEA WebLogic 8.1?

Yes, it can. Some hints are provided in the Weblogic 8.1 interoperation howto.

Can IIOP.NET interoperate with IBM Websphere 4?

Yes, it can. Some hints are provided in the Websphere 4 interoperation howto.

Can IIOP.NET interoperate with IBM Websphere 5?

Yes, it can. Some hints are provided in the Websphere 5 interoperation howto.

Can IIOP.NET interoperate with JBoss 3.2?

Yes, it can. Some hints are provided in the JBoss 3.2 interoperation howto.

Can the IIOP.NET sources be compiled without any configuration?

To compile the tutorials, you must copy the files ir.idl and orb.idl in the ./IDL directory before compiling the tutorials. You will find these two files as part of your Java SDK in the %JAVA_HOME%\lib directory.

To compile parts of the project, the makefile requires some environment variables to be set:
WAS_HOME WebSphere 5 application server path
used by Examples\EBJChatRoom\WebSphere_5\ and the IntegrationTests
JBOSS_HOME JBoss 3.2.1 application server path
used by Examples\EBJChatRoom\JBoss3.2.1\ and the IntegrationTests
NUNITV2_HOME NUnit V2 path
used by IIOPChannel unit tests and for the IntegrationTests
JUNIT_HOME JUnit path
used by the IntegrationTests

Can the IIOP.NET channel be configured with a config-file?

Yes, it can.

Example:
The following config file

    <configuration>
      <system.runtime.remoting>
        <application>
          <channels>
            <channel type="Ch.Elca.Iiop.IiopChannel,IiopChannel" port="8087"/>
          </channels>
        </application>
      </system.runtime.remoting>
    </configuration>

is equivalent to the following:

    // register the channel
    IiopChannel chan = new IiopChannel(8087);
    ChannelServices.RegisterChannel(chan);

The config file is processed with:

    RemotingConfiguration.Configure(configFile);

How do I configure NUnit V2.0 to use the .NET Framework 1.1?

Add the following configuration lines in the files %NUnit2%\bin\nunit-console.exe.config and %NUnit2%\bin\nunit-gui.exe.config:

  <startup> 
    <supportedRuntime version="v1.1.4322" /> 
  </startup> 

How do I use the IDLToCLSCompiler?

The IDLToCLSCompiler creates the .NET proxies for one or more IDL files.

IDLToCLSCompiler [options] target_assembly idl-files...

target_assembly   is the name of the target assembly without .dll
idl-files         one or more idl files containg OMG IDL definitions

options are
-h               help
-r assembly      assemblies to check for types in, instead of generating them
-c xmlfile       specifies custom mappings
-d define        defines a preprocessor symbol
-idir directory  directory containing idl files (multiple -idir allowed)

Examples:

IDLToCLSCompiler proxy def.idl
generate proxy.dll from def.idl in the current directory.
IDLToCLSCompiler proxy def1.idl def2.idl
generate proxy.dll from def1.idl and def2.idl in the current directory.
IDLToCLSCompiler -o bin proxy def.idl
generate proxy.dll from def.idl in the directory bin.
IDLToCLSCompiler -o bin -idir c:\IDL -idir d:\IDL proxy def.idl
generate proxy.dll from def.idl in the directory bin; search for imported idl files in c:\IDL and d:\IDL.
IDLToCLSCompiler -d IIOPNet proxy def.idl
generate proxy.dll from def.idl in the current directory; the symbol "IIOPNet" is defined for the IDL preprocessor

Notes:

The compiler will warn you that you must provide the implementation for the classes implementing the CORBA valuetypes. The article Accessing an EJB from .NET Using IIOP.NET: an Example contains a detailed explanation and example (see step 4).

How do I configure IIOP.NET to generate debug information?

Availability: November 6th 2003 (CVS); release 1.5.1

The IIOP.NET channel must be recompiled with /debug+ /d:DEBUG /d:TRACE to enable the debugging code; using nmake:

	nmake rebuild-base-debug

This will delete the channel's binaries and recompile them with debug enabled.

You can now recompile the example or code that need inspection and execute it. After execution, you will find in the same directory a file named IIOPNET_DebugOutput_timestamp containing additional information.

After debugging remember to recompile the channel without debugging, as this can generate fairly big trace files whenever used:

	nmake rebuild-base

How can I access an object using its stringified IOR?

The following Code reads an stringified IOR from the file iorfile and creates a proxy for the remote object represented by the IOR:

    StreamReader stream = new StreamReader(iorfile);
    String ior = stream.ReadLine();
    MyRemoteObjectIF remoteObject = (MyRemoteObjectIF)RemotingServices.Connect(typeof(MyRemoteObjectIF),
                                                                               ior);

How can I get the stringified IOR from a proxy object?

The following Code returns the stringified IOR of a remote object, given its local proxy:

    String ior = RemotingServices.GetObjectUri(proxy);

This won't obviously work, when the proxy is created manually with RemotingServices.Connect using a .NET URI or a corbaloc URI. In this case the above call will return the URI used in Connect.

How can I access an object using its corbaloc:iiop address?

The following code creates a proxy for the remote object represented by the given corbaloc:

    string loc = "corbaloc::localhost:3528/myobject";
    MyRemoteObjectIF remoteObject = (MyRemoteObjectIF)RemotingServices.Connect(typeof(MyRemoteObjectIF), 
                                                                               loc);
Note: This feature is only available in IIOP.NET 1.4.0 and above.

How do I implement a callback?

IIOP.NET contains two examples using callbacks:
    Examples\Callback\ChatroomInterDN
    shows using a callback in a scenario with an IIOP.NET client and an IIOP.NET server
    Examples\EJBChatRoom
    contains a similar example with an IIOP.NET client and various J2EE application servers; this example is explained in detail in the Code Project's article Accessing an EJB from .NET Using IIOP.NET: an Example
For each callback, ensure that the following points are fullfilled:
  • The callback implementation class must inherhit from MarshalByRefObject
  • The callback implementation class must implement the callback interface
  • The callback implementation class must have the SupportedInterfaceAttribute:
      [SupportedInterfac(typeof(CallbackInterface)]
      public class CallbackImpl : CallbackInterface {
           // ...
      }
    
  • Use an IiopChannel to allow the client to receive the server's messages (using only an IIOPClientChannel won't work):
      int callbackPort = 0; // automatic assignement
      IiopChannel chan = new IiopChannel(callbackPort);
      ChannelServices.RegisterChannel(chan);
      

Exception: Invalid PInvoke metadata format

This is usually caused by the some backward incompatibility between the .NET framework 1.0 and 1.1: the error occurs, when you run an application built for .NET framework 1.0 on the .NET framework 1.1.

A detailed description of the problem and possible solutions can be found here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetdep/html/sidexsidenet.asp

CORBA Exception: No_Implement (minor-code = 1)

The marshaller on the .NET-side cannot find the class implementing the valuetype.

Check that:

  • you did implement a class XYZImpl, where XYZ is the type name of the valuetype
  • XYZImpl inherits from the abstract class XYZ (this class is generated by the IDLToCLSgenerator)
  • XYZImpl is in the same namespace as XYZ
  • XYZImpl is serializable
  • XYZImpl has a parameterless public constructor
  • XYZImpl is not abstract
  • XYZImpl implements all the inherited abstract methods and properties

CORBA system exception, completed: Completed_MayBe minor: 1414

This exception is thrown by IIOP.NET whenever it receives an object reference of an unknown type. The most common errors are:

  • the required type was not mapped with the IDLToCLSCompiler
  • the assembly containing the mapped type was not found by IIOP.NET (it must be in the same directory or in the application domain's search path)

omg.org.CORBA.CODESET_INCOMPATIBLE: CORBA system exception, completed: Completed_No minor: 9501

Currently, IIOP.NET does only support a limited set of codesets:
  • Character Sets:
    • ISO 8859-1:1987; Latin Alphabet No. 1
    • UTF8
    • ISO 646:1991 IRV (International Reference Version)
  • Wide Character Sets:
    • UTF16
    • ISO/IEC 10646-1:1993; UCS-2, Level 1
If possible, you sould use UTF8, Latin1 or UTF16.

About this project

This project is maintained by Elca Informatique SA and was developed in collaboration with the Programming Languages and Runtime Systems Research Group of the ETH-Zurich as part of Dominic Ullmann's diploma thesis.

News

 
© 2003 ELCA All Rights Reserved