Lists Home |
Date Index |
- From: "Michael Kay" <M.H.Kay@eng.icl.co.uk>
- To: "Mike Wagner" <firstname.lastname@example.org>, <email@example.com>
- Date: Mon, 23 Feb 1998 11:24:59 -0000
>Has anybody managed to get the Microsoft Java XML Parser running as a
>component accessible by ASP under IIS?
I tried and failed, probably because I was doing it wrong; then I rewrote
my app using SAX (over AElfred) and have this working under ASP fine.
I tried first using Javasoft's ActiveX Bridge which I couldn't get to work
except for the most trivial single-class javabeans; then I tried using
javareg and got it working - at least once I had worked out how to ensure
that the class path setting for the Microsoft Java VM was right. I found it
test the thing with a little VB app as the environment is more controllable.
I found it necessary to pay some attention to exception handling: if you
don't catch the things, they have a habit of crashing the ActiveX container,
i.e. the web server.
To keep things simple, I wrote a simple wrapper class for my application
which exposed all the interfaces I needed in the ASP script and nothing
else, and it was this wrapper class that I registered using javareg. The
underlying Java classes, so long as they are on the classpath, do not need
to be registered.
My javareg call was
javareg /register /class:com.icl.saxon.showXML /progid:ShowXML.Java
and the CreateDocument (in VBScript) was:
Set app = CreateObject("ShowXML.Java")
I haven't tried calling back from the Java code to ActiveX objects (e.g.
calling Response.Write) but it should work in theory. Instead I put the
output in String variables which the ASP page retrieves explicitly using
methods on ShowXML. Not elegant, but I was deliberately minimising the
number of things that might go wrong. I also haven't tried anything
complicated with collections or enumerations.
Hope that helps,
Mike Kay, ICL
xml-dev: A list for W3C XML Developers. To post, mailto:firstname.lastname@example.org
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:email@example.com the following message;
To subscribe to the digests, mailto:firstname.lastname@example.org the following message;
List coordinator, Henry Rzepa (mailto:email@example.com)