----- Original Message ----- From: "Grant Echols (JanusLogix)" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 17, 2002 8:24 AM Subject: Re: How to use the Java2WSDL class inside a java program
> That problem has bitten me too. We want to do a dynamic publish which we try > to use the Java2WSDL and WSDL2Java so we get a deploy.wsdd file. We found a > couple of things that seemed to help. The biggest is we load a custom > SecurityManager just before running the .main() methods. The primary > objective of the custom SecurityManager is to reject any attempts at running > System.exit(). What you'll get is an exception thrown when the System.exit() > method gets invoked. > > To clean up the exception caused by the SecurityManager we wrote a > PrintStream that swallows the exception. This enabled us to essentially call > the two utilities inside our JVM without having them shut us down. > > Note: this is a hack and the real solution would be for Axis to stop making > the System.exit() call. Instead it should be doing a return...but I don't > know who's listening or if its of significant value so my hack will stay in > place for a while. Calling system.exit in a main() app is *exactly* what it should be doing, so your makefiles and shell scripts can see if it worked. The solution is not to use a wrapper class like the main entry point, or even the ant task, but the stuff one level down that does the work. I.e. the solution in the open source world is to look at the source files and find out what they do, rather than complain about apparent deficiencies in the interface. -steve
