OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: MS XML Parser on the Server

[ Lists Home | Date Index | Thread Index ]
  • From: "Michael Kay" <M.H.Kay@eng.icl.co.uk>
  • To: "Mike Wagner" <mwagner@ets.org>, <xml-dev@ic.ac.uk>
  • 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
useful to
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:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS