Saw this and just knew some of might have interest....
MidNight Mapper
aka Neil
****************************
Subject: SUM: Java and ArcView (RPC-Client in Java)
Date: Fri, 2 Apr 1999 16:30:11 +0200
From: Alexander Zipf <[EMAIL PROTECTED]>
Hi ArcView World,
Sorry for my delay with the summary, but here it is:
My original question was how to get Java speak to ArcView and viceversa:
I got some answers, which were really helpful.
One way to go is to use ArcView as a RPC-Server (Remote Procedure Call).
Check RPCServer in the Help.
Then you need a RPC Client in your desired language.
There are commercial Java-RPC solutions available (see below), but
andrew williamson gave a pointer to an example written in C.
Using this we did a first hack and did wrap this with some Java-Code.
Now we will code our own Java-RPC-Client to ArcView. (in progress).
Here is some of the Code we use by now, and the original answers.
Thanks a lot to all of you.
alexander zipf
--------------------
Our Hack so far:
within java it looks like this:
avclient mygis = new avclient("hostname");
mygis.exec("script_this", "param1 param2 param3 ...");
mygis.exec("script_that", "param1 param2 param3 ...");
script_this or _that is just the name of an Avenue script. The params
are one big String, blank seperated, you have to handle this in
the called avenue script.
Then we return just a String
parameter = Self
'do something ...
return "my return string"
oh yah, of course you have to start the RPCServer first in ArcView:
something like this:
' start the RPCServer
RPCServer.Start( 0x40000006, 1 )
This is only a prelimnary version -as said before- using the C-Program
by andrew williamson (originally for CGI).
check: http://www.geocities.com/SiliconValley/Haven/2295/
Will do a real JavaRPC-Client after some holiday ;-).
---------------------------------------------------------
subject: RE: Java integration / sockets
Date: Sun, 14 Mar 1999 23:08:00 -0500
From: Stevens Kent K Civ ACC/CEVAP
<[EMAIL PROTECTED]>
Reply-To: Alexander Zipf <[EMAIL PROTECTED]>
To: 'Alexander Zipf ' <[EMAIL PROTECTED]>
Alexander,
We have given up on trying to make ArcView work with JAVA,and JAVA Beans
and
have chosen another route. We are using a product called Formida...
http://www.formida.com that successfully wraps spatial data in Java
wrappers, and delivers the ability to do GIS functions i.e. buffering,
polygon intersections, etc. in a Web Browser. The data is delivered and
cached on the client in a true vector format, which means that the
application does not have to maintain communication with the server. The
product is compatible with all databases... we are using Oracle 8 with
the
spatial cartridge to store spatial information directly in the database.
Wish you luck.
Kent Stevens
---------------------------------------------
Alex
I asked a similar question about 2 months ago. I tried interfacing Java
and AV via the Java Native Interface and a C/C++ DLL, although I came up
against some underlying problem. Also the DLL Class within AV only
allows
events evoked from within AV. I then tried RPC with much more success,
although somewhat clunky. The RPC connect has been done using a third
party software called JRPC (http://www.distinct.com). It has proven
quite
simple to use and seems to do what I want. I understand from further
reading that Sun will be bringing out an RPC API 'sometime'.
Hope this is of help
Regard
John
-------------------------------------------------------------------------------
Hi
While not using Java, there is an example of how to control AV via C /
RPC on my web page below.
Andrew
My opinion, nothing to do with the Council
http://www.geocities.com/SiliconValley/Haven/2295/
mailto:[EMAIL PROTECTED]
----------------------------------------------------------------------------------
Alexander,
As you know, ArcView speaks RPC and DDE. DDE is an acceptable windows
only solution as free JavaDDE classes can be found on the web. JavaRPC
can purchased from www.distinct.com or www.netbula.com. Both are pretty
spiffy but can be costly. You can write your own. You'll need to write
native methods in C/C++ which perform RPC calls from Java.
Regards,
James Maupin
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Berger & Co. -- A ModisSolutions Company
Information Management Consultants
---------------------------------------------------------------------
Hi;
did you receive an answer to your question yet?
I'm going to be doing exactly what you're asking about so I have some
info on the subject.
Currently, I start my java app through arcview using the avenue
system.execute request. My next
step is to communicate the 2 programs by using RPC requests, or with
TCP/IP protocol. The
Tracking Analyst extension does indeed do this. I've found some java
code that supports the
classes to perform the TCP/IP protocol on the java/app side. However,
since I dont have the
Tracking Analyst extension, I don't have the Avenue code that handles
the ArcView side of
things. (would love a copy of that if you find it?).
I just got back from vacation today so am kind of busy, but let me know
how things are going,
and if you need the java class code, or anything else (I've been
collecting info on this subject
now for several months); and I'll get it out you're way.
Karen Robine
[EMAIL PROTECTED]
---------------------------------------------------------------------
my original question was:
> Hi ArcView World,
>
> I need some help on the integration of ArcView with other applications
>
> (especially Java apps).
> I want to use arcview as an application and data server, that performs
>
> some action and sends some data to another (java) application on
> request
> of the java app.
> Therefore the easiest for me would be to open a socket connection
> between ArcView and another (Java) program,
> so that I can exchange some commands (or data). On such events AV
> should
> perform some of my Avenue scripts and return the result to the other
> application (through the tcp/ip stream).
> I have some rough ideas how to do that, but I am not so sure:
>
> Can this be done with the RFC utilities delivered with AV? I found and
>
> tried only examples who did remote function calls between AV and AV or
>
> AV and Arc/Info !? Any hints on how?
> Would the tracking analyst be of any help? (it supports tcp/IP Input
> streams for real time data)?
>
> Did anybody try to wrap AV through the use of CORBA?!?
>
> (BTW: I think the System Class is not sufficient for this desire). I
> also think that the use of HTTP (AV Internet Map Server) is a little
>
> bit too limited for that (but i am willing to learn the opposite).
> By now I have no experience with MapObjects.
>
> will sum.
> thanks a lot !
>
> alex
----------------------------------------------------
Alexander Zipf
European Media Laboratory (EML)
Villa Bosch - Schloss-Wolfsbrunnenweg 33
69118 Heidelberg - Germany
fon: ++49 - 6221 - 533 202
fax: ++49 - 6221 - 533 298
[EMAIL PROTECTED]
http://www.eml.org/
----------------------------------------------------
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]