[omniORB] connect omniORB-Server and VisiBroker-Java-Client solved

Heinrich Götzger Heinrich.Goetzger@exploding-systems.de
Sat Aug 24 20:28:00 2002


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

---1463809436-2138994840-1030216751=:1608
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.LNX.4.44.0208242122541.1608@io.exploding-systems.de>

Hi,

due to a missing documentation in the web about how to connect some
omniORB 3.0.5 server with a VisiBroker 5.1 Client in Java using omniORBs
NameService I send some notes on how I got this running.
(I couldn't find anything like this so I decided this might be helpful to
someone else.)

This example is based on the example 3 of omniORB docu using the eg3_impl
as an echo server and providing its interface to the omniNames NameServer.
I got this running on a linux box.

To get the server running follow the documentation in omniORB user guide
chapter Basic / Example 3 --- Using the Naming Service (2.10) and the
README in the src/examples/echo directory of omniORB.

To get the client running follow these steps:

- copy the echo.idl and the file Eg3_clt.java (attached to this mail) into
some directory.

- create the java files from the idl: idl2java echo.idl

- compile the javacode: vbjc *.java

- and finally start the client:
  vbj -VBJprop ORBInitRef=NameService=corbaname::<serverIP>:<serverPORT> \
  Eg3_clt myText

then you should read:

I said, "myText".
The Echo object replied, "myText".

and all is fine.

HTH.

Thanks to Steve Brenneis for helping me with important information.

regards

Heinrich

---1463809436-2138994840-1030216751=:1608
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="Eg3_clt.java"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.44.0208242119110.1608@io.exploding-systems.de>
Content-Description: Eg3_clt.java
Content-Disposition: ATTACHMENT; FILENAME="Eg3_clt.java"

Ly8gRWczX2NsdC5qYXZhDQppbXBvcnQgb3JnLm9tZy5Db3NOYW1pbmcuKjsN
Cg0KcHVibGljIGNsYXNzIEVnM19jbHQgew0KDQogIHB1YmxpYyBzdGF0aWMg
dm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpIHsNCiAgIC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ICAgLy8gdXNlIGFyZ3NbMF0gYXMg
dGhlIGFjY291bnQgbmFtZSwgb3IgYSBkZWZhdWx0Lg0KICAgICAgU3RyaW5n
IG5hbWUgPSBhcmdzLmxlbmd0aCA+IDAgPyBhcmdzWzBdIDogIi1kZWZhdWx0
IFRleHQtIjsNCg0KICAgICAgLy8gR2V0IHRoZSBlY2hvIGZyb20gZWczX2lt
cGwNCiAgICAgIFN0cmluZyBkZXN0ID0gZWNob3JlZi5lY2hvU3RyaW5nKG5h
bWUpOw0KDQogICAgICAvLyBQcmludCBvdXQgdGhlIHJldHVybnZhbHVlDQog
ICAgICBTeXN0ZW0ub3V0LnByaW50bG4NCiAgICAgICAgICAgICAgICAgICgi
SSBzYWlkLCBcIiIgKyBuYW1lICsgIlwiLiIpOw0KICAgICAgU3lzdGVtLm91
dC5wcmludGxuDQogICAgICAgICgiVGhlIEVjaG8gb2JqZWN0IHJlcGxpZWQs
IFwiIiArIGRlc3QgKyAiXCIuIik7DQogICAgfQ0KICAgIGNhdGNoIChFeGNl
cHRpb24gZSkgew0KICAgICAgZS5wcmludFN0YWNrVHJhY2UoKTsNCiAgICB9
DQogIH0NCn0NCg==
---1463809436-2138994840-1030216751=:1608--