Return-Path: Delivered-To: apmail-incubator-beehive-dev-archive@www.apache.org Received: (qmail 56397 invoked from network); 9 Sep 2004 20:01:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 9 Sep 2004 20:01:51 -0000 Received: (qmail 28059 invoked by uid 500); 9 Sep 2004 20:01:51 -0000 Delivered-To: apmail-incubator-beehive-dev-archive@incubator.apache.org Received: (qmail 27823 invoked by uid 500); 9 Sep 2004 20:01:48 -0000 Mailing-List: contact beehive-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: list-id: beehive-dev.incubator.apache.org Reply-To: "Beehive Developers" Delivered-To: mailing list beehive-dev@incubator.apache.org Received: (qmail 27810 invoked by uid 99); 9 Sep 2004 20:01:48 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [63.96.162.5] (HELO ussjmh01.bea.com) (63.96.162.5) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 09 Sep 2004 13:01:45 -0700 Received: from ussjfe01.amer.bea.com (ussjfe01b.bea.com [172.16.120.57]) by ussjmh01.bea.com (Switch-3.0.5/Switch-3.0.0) with ESMTP id i89K1hZL005641 for ; Thu, 9 Sep 2004 13:01:43 -0700 Received: from USKIEX01.amer.bea.com ([10.32.32.15]) by ussjfe01.amer.bea.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 9 Sep 2004 13:01:43 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: svn commit: rev 43630 - in incubator/beehive/trunk/wsm: . lib src/runtime/org/apache/beehive/wsm/axis src/runtime/org/apache/beehive/wsm/util test test/webapps test/webapps/AnnotatedAxis test/webapps/AnnotatedAxis/WEB-INF test/webapps/AnnotatedAxis/WE Date: Thu, 9 Sep 2004 13:01:42 -0700 Message-ID: <4B2B4C417991364996F035E1EE39E2E101E43F5A@uskiex01.amer.bea.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: svn commit: rev 43630 - in incubator/beehive/trunk/wsm: . lib src/runtime/org/apache/beehive/wsm/axis src/runtime/org/apache/beehive/wsm/util test test/webapps test/webapps/AnnotatedAxis test/webapps/AnnotatedAxis/WEB-INF test/webapps/AnnotatedAxis/WE Thread-Index: AcSWprz9Wmb6HTUhSAi4NzU6VFmnwwAAG+ag From: "Jonathan Colwell" To: "Beehive Developers" X-OriginalArrivalTime: 09 Sep 2004 20:01:43.0600 (UTC) FILETIME=[D4233B00:01C496A7] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Eddie, I'll ask Michael to rearrange the jars and switch over to the common log4j jar. When I tossed all these jars in there together I had just grabbed them from the AXIS build and it was just too easy to grab the big pile of libraries that I knew played well together. =20 thanks, Jonathan -----Original Message----- From: Eddie O'Neil=20 Sent: Thursday, September 09, 2004 12:54 PM To: Beehive Dev Subject: Re: svn commit: rev 43630 - in incubator/beehive/trunk/wsm: . lib src/runtime/org/apache/beehive/wsm/axis src/runtime/org/apache/beehive/wsm/util test test/webapps test/webapps/AnnotatedAxis test/webapps/AnnotatedAxis/WEB-INF test/webapps/AnnotatedAxis/WE Michael-- Hey, a couple of comments about this change: 1) we're trying to use /external as the location of=20 externally referenced JARs rather than /lib. So, at least=20 according to the project layout plan on the wiki, the Axis JARs would=20 live there. 2) there's a copy of Log4J 1.2.8 available in $BEEHIVE_HOME/external,=20 and Beehive as a whole (at least as far as I know) is using this=20 version, so maybe WSM's Axis snapshot can also use the same version. Anyway, my $0.02. Thanks! Eddie mmerz@apache.org wrote: >Author: mmerz >Date: Thu Sep 9 12:43:48 2004 >New Revision: 43630 > >Added: > incubator/beehive/trunk/wsm/lib/axis-ant.jar (contents, props changed) > incubator/beehive/trunk/wsm/lib/axis.jar (contents, props changed) > incubator/beehive/trunk/wsm/lib/commons-discovery.jar (contents, props changed) > incubator/beehive/trunk/wsm/lib/commons-logging.jar (contents, props changed) > incubator/beehive/trunk/wsm/lib/jaxrpc.jar (contents, props changed) > incubator/beehive/trunk/wsm/lib/log4j-1.2.8.jar (contents, props changed) > incubator/beehive/trunk/wsm/lib/log4j.properties > incubator/beehive/trunk/wsm/lib/saaj.jar (contents, props changed) > incubator/beehive/trunk/wsm/lib/wsdl4j.jar (contents, props changed) > incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/Anno tatedJWSHandler.java > incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/Axis Hook.java > incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/Depl oymentDumper.java > incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/util/ > incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/util/Clas spathUtils.java > incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/util/Java ArchiveFilter.java > incubator/beehive/trunk/wsm/test/ > incubator/beehive/trunk/wsm/test/webapps/ > incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/ > incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/Foo.jws > incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/ > incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/Annotatio nBasedDeployment/ > incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/Annotatio nBasedDeployment/Bar.java > incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/Annotatio nBasedDeployment/Foo.java > incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/Annotatio nBasedDeployment/dump.bat > incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/Annotatio nBasedDeployment/setEnv.bat > incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/classes/ > incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/lib/ > incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/lib/log4j .properties > incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/server-co nfig.wsdd > incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/web.xml > incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/happyaxis.jsp > incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/index.html >Modified: > incubator/beehive/trunk/wsm/build.xml >Log: >Initial checkin of code connecting the JSR-181 object model to AXIS. More details about AXIS WSM can be found on the Beehive Wiki: http://wiki.apache.org/beehive/axis_2dspecific_20implementation > >Contributor: Jonathan Colwell > > > >Modified: incubator/beehive/trunk/wsm/build.xml >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >--- incubator/beehive/trunk/wsm/build.xml (original) >+++ incubator/beehive/trunk/wsm/build.xml Thu Sep 9 12:43:48 2004 >@@ -31,6 +31,11 @@ > > > >+ >+ >+ >+ >+ >=20 > > >@@ -38,7 +43,11 @@ > > >=20 >+ >+ > >+ >+ >=20 > > >@@ -51,10 +60,28 @@ > > > >- >- >+ >+ >+ > >=20 >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ > > > >@@ -69,18 +96,26 @@ > > > >- >+ >+ >+ > >- >+ >+ > > >- >+ >+ > > > > > >- >+ >+ >+ >+ >+ > > > >@@ -101,30 +136,43 @@ > > > >- >- =20 >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ > > > > >+ >=20 >+ > > > >+ > >+ >=20 >- >- >- >- >+ >+ >+ >+ >+ >+ >+ >=20 >- >- >- >- >=20 >=20 >- >=20 > > >@@ -136,7 +184,9 @@ >=20 > > >- >+ >+ >+ > >=20 > >@@ -145,12 +195,28 @@ > >=20 >=20 >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ > > > >- >- >- >+ >+ >=20 > > >@@ -188,13 +254,23 @@ > > > >- >+ > > > >=20 >- >- >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ + todir=3D"${webapps.dist.dir}/${axis.dir}/WEB-INF/lib"/> > > > >@@ -248,8 +324,8 @@ > > > >- >- >+ >+ > >=20 > > >Added: incubator/beehive/trunk/wsm/lib/axis-ant.jar >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >Binary file. No diff available. > >Added: incubator/beehive/trunk/wsm/lib/axis.jar >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >Binary file. No diff available. > >Added: incubator/beehive/trunk/wsm/lib/commons-discovery.jar >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >Binary file. No diff available. > >Added: incubator/beehive/trunk/wsm/lib/commons-logging.jar >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >Binary file. No diff available. > >Added: incubator/beehive/trunk/wsm/lib/jaxrpc.jar >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >Binary file. No diff available. > >Added: incubator/beehive/trunk/wsm/lib/log4j-1.2.8.jar >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >Binary file. No diff available. > >Added: incubator/beehive/trunk/wsm/lib/log4j.properties >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >--- (empty file) >+++ incubator/beehive/trunk/wsm/lib/log4j.properties Thu Sep 9 12:43:48 2004 >@@ -0,0 +1,20 @@ >+# Set root category priority to INFO and its only appender to CONSOLE. > >+log4j.rootCategory=3DINFO, CONSOLE > >+#log4j.rootCategory=3DINFO, CONSOLE, LOGFILE > >+ > >+# Set the enterprise logger category to FATAL and its only appender to CONSOLE. > >+log4j.logger.org.apache.axis.enterprise=3DFATAL, CONSOLE > >+ > >+# CONSOLE is set to be a ConsoleAppender using a PatternLayout. > >+log4j.appender.CONSOLE=3Dorg.apache.log4j.ConsoleAppender > >+log4j.appender.CONSOLE.Threshold=3DINFO > >+log4j.appender.CONSOLE.layout=3Dorg.apache.log4j.PatternLayout > >+log4j.appender.CONSOLE.layout.ConversionPattern=3D- %m%n > >+ > >+# LOGFILE is set to be a File appender using a PatternLayout. > >+log4j.appender.LOGFILE=3Dorg.apache.log4j.FileAppender > >+log4j.appender.LOGFILE.File=3Daxis.log > >+log4j.appender.LOGFILE.Append=3Dtrue > >+log4j.appender.LOGFILE.Threshold=3DINFO > >+log4j.appender.LOGFILE.layout=3Dorg.apache.log4j.PatternLayout > >+log4j.appender.LOGFILE.layout.ConversionPattern=3D%-4r [%t] %-5p %c %x = - %m%n > > >Added: incubator/beehive/trunk/wsm/lib/saaj.jar >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >Binary file. No diff available. > >Added: incubator/beehive/trunk/wsm/lib/wsdl4j.jar >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >Binary file. No diff available. > >Added: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/Anno tatedJWSHandler.java >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >--- (empty file) >+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/Anno tatedJWSHandler.java Thu Sep 9 12:43:48 2004 >@@ -0,0 +1,459 @@ >+/* > >+ * Copyright 2001-2004 The Apache Software Foundation. > >+ *=20 > >+ * Licensed under the Apache License, Version 2.0 (the "License"); > >+ * you may not use this file except in compliance with the License. > >+ * You may obtain a copy of the License at > >+ *=20 > >+ * http://www.apache.org/licenses/LICENSE-2.0 > >+ *=20 > >+ * Unless required by applicable law or agreed to in writing, software > >+ * distributed under the License is distributed on an "AS IS" BASIS, > >+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. > >+ * See the License for the specific language governing permissions and > >+ * limitations under the License. > >+ */ > >+ > >+package org.apache.beehive.wsm.axis; > >+ > >+import org.apache.beehive.wsm.jsr181.model.WebServiceTYPEMetadata; > >+import org.apache.beehive.wsm.jsr181.model.WebServiceMETHODMetadata; > >+import org.apache.beehive.wsm.jsr181.model.WebServicePARAMETERMetadata; > >+import org.apache.beehive.wsm.jsr181.processor.reflection.WsmReflectionAnnotati onProcessor; > >+ > >+import java.io.File; > >+import java.io.FileFilter; > >+import java.io.FileInputStream; > >+import java.io.FileReader; > >+import java.io.FileWriter; > >+import java.io.IOException; > >+import java.io.InputStream; > >+import java.io.FileNotFoundException; > >+import java.net.URL; > >+import java.net.URLClassLoader; > >+import java.net.URLDecoder; > >+import java.util.HashMap; > >+import java.util.Iterator; > >+import java.util.List; > >+import java.util.StringTokenizer; > >+import java.util.jar.Attributes; > >+import java.util.jar.JarFile; > >+import java.util.jar.JarInputStream; > >+import java.util.jar.Manifest; > >+ > >+import org.apache.axis.AxisFault; > >+import org.apache.axis.AxisProperties; > >+import org.apache.axis.Constants; > >+import org.apache.axis.MessageContext; > >+import org.apache.axis.components.compiler.Compiler; > >+import org.apache.axis.components.compiler.CompilerError; > >+import org.apache.axis.components.compiler.CompilerFactory; > >+import org.apache.axis.components.logger.LogFactory; > >+import org.apache.axis.description.ServiceDesc; > >+import org.apache.axis.handlers.JWSHandler; > >+import org.apache.axis.handlers.soap.SOAPService; > >+import org.apache.axis.providers.java.RPCProvider; > >+import org.apache.axis.transport.http.HTTPConstants; > >+import org.apache.axis.utils.ClassUtils; > >+import org.apache.axis.utils.JWSClassLoader; > >+import org.apache.axis.utils.Messages; > >+import org.apache.axis.utils.XMLUtils; > >+import org.apache.beehive.wsm.util.ClasspathUtils; > >+import org.apache.commons.logging.Log; > >+import org.w3c.dom.Document; > >+import org.w3c.dom.Element; > >+ > >+/********************************************************************* ********** > >+ * A few annotation specific things added and lots of code copied=20 > >+ * from the JWSHandler base class by > >+ * > >+ * @author Jonathan Colwell (jcolwell@bea.com) > >+ *=20 > >+ * but most of the code was written by: > >+ * @author Glen Daniels (gdaniels@allaire.com) > >+ * @author Doug Davis (dug@us.ibm.com) > >+ * @author Sam Ruby (rubys@us.ibm.com) > >+ * > >+ */ > >+public class AnnotatedJWSHandler extends JWSHandler { > >+ > >+ > >+ /** > >+ * If our path ends in the right file extension (*.jws), handle all the > >+ * work necessary to compile the source file if it needs it, and set > >+ * up the "proxy" RPC service surrounding it as the MessageContext's > >+ * active service. > >+ * > >+ */=20 > >+ protected void setupService(MessageContext msgContext) throws Exception { > >+ // FORCE the targetService to be JWS if the URL is right. > >+ String realpath =3D msgContext.getStrProp(Constants.MC_REALPATH); > >+ String extension =3D (String)getOption(OPTION_JWS_FILE_EXTENSION); > >+ if (extension =3D=3D null) extension =3D = DEFAULT_JWS_FILE_EXTENSION; > >+ =20 > >+ if ((realpath!=3Dnull) && (realpath.endsWith(extension))) { > >+ /* Grab the *.jws filename from the context - should have been */ > >+ /* placed there by another handler (ie. HTTPActionHandler) */ > >+ /***************************************************************/ > >+ String jwsFile =3D realpath; > >+ String rel =3D = msgContext.getStrProp(Constants.MC_RELATIVE_PATH); > >+ > >+ // Check for file existance, report error with > >+ // relative path to avoid giving out directory info. > >+ File f2 =3D new File( jwsFile ); > >+ if (!f2.exists()) { > >+ throw new FileNotFoundException(rel); > >+ } > >+ > >+ if (rel.charAt(0) =3D=3D '/') { > >+ rel =3D rel.substring(1); > >+ } > >+ > >+ int lastSlash =3D rel.lastIndexOf('/'); > >+ String dir =3D null; > >+ =20 > >+ if (lastSlash > 0) { > >+ dir =3D rel.substring(0, lastSlash); > >+ } > >+ =20 > >+ String file =3D rel.substring(lastSlash + 1); > >+ =20 > >+ String outdir =3D msgContext.getStrProp( = Constants.MC_JWS_CLASSDIR ); > >+ if ( outdir =3D=3D null ) outdir =3D "." ; > >+ =20 > >+ // Build matching directory structure under the output > >+ // directory. In other words, if we have: > >+ // /webroot/jws1/Foo.jws > >+ // > >+ // That will be compiled to: > >+ // .../jwsOutputDirectory/jws1/Foo.class > >+ if (dir !=3D null) { > >+ outdir =3D outdir + File.separator + dir; > >+ } > >+ =20 > >+ // Confirm output directory exists. If not, create it IF we're > >+ // allowed to. > >+ // !!! TODO: add a switch to control this. > >+ File outDirectory =3D new File(outdir); > >+ if (!outDirectory.exists()) { > >+ outDirectory.mkdirs(); > >+ } > >+ =20 > >+ if (log.isDebugEnabled()) > >+ log.debug("jwsFile: " + jwsFile ); > >+ =20 > >+ String jFile =3D outdir + File.separator + file.substring(0, file.length()-3) + > >+ "java" ; > >+ String cFile =3D outdir + File.separator + file.substring(0, file.length()-3) + > >+ "class" ; > >+ =20 > >+ if (log.isDebugEnabled()) { > >+ log.debug("jFile: " + jFile ); > >+ log.debug("cFile: " + cFile ); > >+ log.debug("outdir: " + outdir); > >+ } > >+ =20 > >+ File f1 =3D new File( cFile ); > >+ > >+ /* Get the class */ > >+ /*****************/ > >+ String clsName =3D null ; > >+ //clsName =3D msgContext.getStrProp(Constants.MC_RELATIVE_PATH); > >+ if ( clsName =3D=3D null ) clsName =3D f2.getName(); > >+ if ( clsName !=3D null && clsName.charAt(0) =3D=3D '/' ) > >+ clsName =3D clsName.substring(1); > >+ =20 > >+ clsName =3D clsName.substring( 0, clsName.length()-4 ); > >+ clsName =3D clsName.replace('/', '.'); > >+ =20 > >+ if (log.isDebugEnabled()) > >+ log.debug("ClsName: " + clsName ); > >+ =20 > >+ /* Check to see if we need to recompile */ > >+ /****************************************/ > >+ if ( !f1.exists() || f2.lastModified() > f1.lastModified() ) { > >+ /* If the class file doesn't exist, or it's older than the */ > >+ /* java file then recompile the java file. */ > >+ /* Start by copying the *.jws file to *.java */ > >+ /***********************************************************/ > >+ log.debug(Messages.getMessage("compiling00", jwsFile) ); > >+ log.debug(Messages.getMessage("copy00", jwsFile, jFile) ); > >+ FileReader fr =3D new FileReader( jwsFile ); > >+ FileWriter fw =3D new FileWriter( jFile ); > >+ char[] buf =3D new char[4096]; > >+ int rc ; > >+ while ( (rc =3D fr.read( buf, 0, 4095)) >=3D 0 ) > >+ fw.write( buf, 0, rc ); > >+ fw.close(); > >+ fr.close(); > >+ =20 > >+ /* Now run javac on the *.java file */ > >+ /************************************/ > >+ log.debug("javac " + jFile ); > >+ // Process proc =3D rt.exec( "javac " + jFile ); > >+ // proc.waitFor(); > >+ Compiler compiler =3D CompilerFactory.getCompiler(); > >+ =20 > >+ compiler.setClasspath(getDefaultClasspath(msgContext)); > >+ compiler.setDestination(outdir); > >+ compiler.addFile(jFile); > >+ =20 > >+ boolean result =3D compiler.compile(); > >+ =20 > >+ /* Delete the temporary *.java file and check return code */ > >+ /**********************************************************/ > >+ (new File(jFile)).delete(); > >+ =20 > >+ if ( !result ) { > >+ /* Delete the *class file - sometimes it gets created even */ > >+ /* when there are errors - so erase it so it doesn't */ > >+ /* confuse us. */ > >+ /***********************************************************/ > >+ (new File(cFile)).delete(); > >+ =20 > >+ Document doc =3D XMLUtils.newDocument(); > >+ =20 > >+ Element root =3D doc.createElementNS("", "Errors"); > >+ StringBuffer message =3D new StringBuffer("Error compiling = "); > >+ message.append(jFile); > >+ message.append(":\n"); > >+ =20 > >+ List errors =3D compiler.getErrors(); > >+ int count =3D errors.size(); > >+ for (int i =3D 0; i < count; i++) { > >+ CompilerError error =3D (CompilerError) errors.get(i); > >+ if (i > 0) message.append("\n"); > >+ message.append("Line "); > >+ message.append(error.getStartLine()); > >+ message.append(", column "); > >+ message.append(error.getStartColumn()); > >+ message.append(": "); > >+ message.append(error.getMessage()); > >+ } > >+ root.appendChild( doc.createTextNode( message.toString() ) ); > >+ throw new AxisFault( "Server.compileError", > >+ Messages.getMessage("badCompile00", jFile), > >+ null, new Element[] { root } ); > >+ } > >+ ClassUtils.removeClassLoader( clsName ); > >+ // And clean out the cached service. > >+ soapServices.remove(clsName); > >+ } > >+ =20 > >+ ClassLoader cl =3D ClassUtils.getClassLoader(clsName); > >+ if (cl =3D=3D null) { > >+ cl =3D new JWSClassLoader(clsName, > >+ msgContext.getClassLoader(), > >+ cFile); > >+ } > >+ =20 > >+ msgContext.setClassLoader(cl); > >+ > >+ WebServiceTYPEMetadata wsm =3D WsmReflectionAnnotationProcessor > >+ .getObjectModel(cl.loadClass(clsName)); > >+ =20 > >+ /* Create a new RPCProvider - this will be the "service" */ > >+ /* that we invoke. */ > >+ /******************************************************************/ > >+ // Cache the rpc service created to handle the class. The cache > >+ // is based on class name, so only one .jws/.jwr class can be active > >+ // in the system at a time. > >+ SOAPService rpc =3D (SOAPService)soapServices.get(clsName); > >+ if (rpc =3D=3D null) { > >+ rpc =3D new SOAPService(new RPCProvider()); > >+ rpc.setName(wsm.getWsName()); > >+ rpc.setOption(RPCProvider.OPTION_CLASSNAME, clsName ); > >+ rpc.setEngine(msgContext.getAxisEngine()); > >+ > >+ /* Support specification of "allowedMethods" as a parameter. > >+ String allowed =3D (String)getOption(RPCProvider.OPTION_ALLOWEDMETHODS); > >+ if (allowed =3D=3D null) allowed =3D "*"; > >+ */ > >+ =20 > >+ =20 > >+ // Take the setting for the scope option from the handler > >+ // parameter named "scope" > >+ String scope =3D (String)getOption(RPCProvider.OPTION_SCOPE); > >+ if (scope =3D=3D null) scope =3D "Request"; > >+ rpc.setOption(RPCProvider.OPTION_SCOPE, scope); > >+ =20 > >+ ServiceDesc sd =3D AxisHook.createServiceDesc(wsm, cl); > >+ rpc.setServiceDescription(sd); > >+ =20 > >+ List allowedMethodNames =3D sd.getAllowedMethods(); > >+ Iterator allowIt =3D allowedMethodNames.iterator(); > >+ StringBuffer sb =3D new StringBuffer(); > >+ boolean firstPass =3D true; > >+ while (allowIt.hasNext()) { > >+ if (firstPass) { > >+ sb.append(' '); > >+ firstPass =3D false; > >+ } > >+ sb.append(((String)allowIt.next())); > >+ } > >+ rpc.setOption(RPCProvider.OPTION_ALLOWEDMETHODS, sb.toString()); =20 > >+ rpc.setOption(RPCProvider.OPTION_WSDL_PORTTYPE, wsm.getWsName()); > >+ rpc.setOption(RPCProvider.OPTION_WSDL_SERVICEELEMENT, > >+ wsm.getWsServiceName()); > >+ rpc.setOption(RPCProvider.OPTION_WSDL_TARGETNAMESPACE,=20 > >+ wsm.getWsTargetNamespace()); > >+ > >+ rpc.setStyle(sd.getStyle()); > >+ rpc.setUse(sd.getUse()); > >+ > >+ // NOTE jcolwell@bea.com 2004-Aug-16 -- not needed anymore I think > >+ //rpc.getInitializedServiceDesc(msgContext); > >+ =20 > >+ soapServices.put(clsName, rpc); =20 > >+ } > >+ =20 > >+ // Set engine, which hooks up type mappings. > >+ rpc.setEngine(msgContext.getAxisEngine()); > >+ =20 > >+ rpc.init(); // ?? > >+ > >+ // OK, this is now the destination service! > >+ msgContext.setService( rpc ); > >+ } > >+ > >+ if (log.isDebugEnabled()) { > >+ log.debug("Exit: JWSHandler::invoke"); > >+ } > >+ } =20 > >+ > >+ private String getDefaultClasspath(MessageContext msgContext) > >+ { > >+ StringBuffer classpath =3D new StringBuffer(); > >+ > >+ ClassLoader cl =3D Thread.currentThread().getContextClassLoader(); > >+ fillClassPath(cl, classpath); > >+ > >+ // Just to be safe (the above doesn't seem to return the webapp > >+ // classpath in all cases), manually do this: > >+ > >+ String webBase =3D (String)msgContext.getProperty( > >+ HTTPConstants.MC_HTTP_SERVLETLOCATION); > >+ if (webBase !=3D null) { > >+ classpath.append(webBase + File.separatorChar + "classes" + > >+ File.pathSeparatorChar); > >+ try { > >+ String libBase =3D webBase + File.separatorChar + "lib"; > >+ File libDir =3D new File(libBase); > >+ String [] jarFiles =3D libDir.list(); > >+ for (int i =3D 0; i < jarFiles.length; i++) { > >+ String jarFile =3D jarFiles[i]; > >+ if (jarFile.endsWith(".jar")) { > >+ classpath.append(libBase + > >+ File.separatorChar + > >+ jarFile + > >+ File.pathSeparatorChar); > >+ } > >+ } > >+ } catch (Exception e) { > >+ // Oh well. No big deal. > >+ } > >+ } > >+ > >+ // axis.ext.dirs can be used in any appserver > >+ getClassPathFromDirectoryProperty(classpath, "axis.ext.dirs"); > >+ > >+ // classpath used by Jasper=20 > >+ getClassPathFromProperty(classpath, "org.apache.catalina.jsp_classpath"); > >+ =20 > >+ // websphere stuff. > >+ getClassPathFromProperty(classpath, "ws.ext.dirs"); > >+ getClassPathFromProperty(classpath, "com.ibm.websphere.servlet.application.classpath"); > >+ =20 > >+ // java class path > >+ getClassPathFromProperty(classpath, "java.class.path"); > >+ =20 > >+ // Load jars from java external directory > >+ getClassPathFromDirectoryProperty(classpath, "java.ext.dirs"); > >+ =20 > >+ // boot classpath isn't found in above search > >+ getClassPathFromProperty(classpath, "sun.boot.class.path"); > >+ > >+ return classpath.toString(); > >+ } > >+ > >+ private void getClassPathFromDirectoryProperty(StringBuffer classpath, String property) { > >+ String dirs =3D AxisProperties.getProperty(property); > >+ String path =3D null; > >+ try { > >+ path =3D ClasspathUtils.expandDirs(dirs); > >+ } catch (Exception e) { > >+ // Oh well. No big deal. > >+ } > >+ if( path!=3D null) { > >+ classpath.append(path); > >+ classpath.append(File.pathSeparatorChar); > >+ } > >+ } > >+ > >+ private void getClassPathFromProperty(StringBuffer classpath, String property) { > >+ String path =3D AxisProperties.getProperty(property); > >+ if( path !=3D null) { > >+ classpath.append(path); > >+ classpath.append(File.pathSeparatorChar); > >+ } > >+ } > >+ > >+ /** > >+ * Walk the classloader hierarchy and add to the classpath > >+ *=20 > >+ * @param cl > >+ * @param classpath > >+ */ > >+ private void fillClassPath(ClassLoader cl, StringBuffer classpath) { > >+ while (cl !=3D null) { > >+ if (cl instanceof URLClassLoader) { > >+ URL[] urls =3D ((URLClassLoader) cl).getURLs(); > >+ for (int i =3D 0; (urls !=3D null) && i < urls.length; i++) { > >+ String path =3D urls[i].getPath(); > >+ //If it is a drive letter, adjust accordingly. > >+ if (path.length() >=3D 3 && path.charAt(0) =3D=3D '/' && path.charAt(2) =3D=3D ':') > >+ path =3D path.substring(1); > >+ classpath.append(URLDecoder.decode(path)); > >+ classpath.append(File.pathSeparatorChar); > >+ > >+ // if its a jar extract Class-Path entries from manifest > >+ File file =3D new File(urls[i].getFile()); > >+ if (file.isFile()) { > >+ FileInputStream fis =3D null; > >+ try { > >+ fis =3D new FileInputStream(file); > >+ > >+ if (isJar(fis)) { > >+ JarFile jar =3D new JarFile(file); > >+ Manifest manifest =3D jar.getManifest(); > >+ if (manifest !=3D null) { > >+ Attributes attributes =3D manifest.getMainAttributes(); > >+ if (attributes !=3D null) { > >+ String s =3D attributes.getValue(Attributes.Name.CLASS_PATH); > >+ String base =3D file.getParent(); > >+ > >+ if (s !=3D null) { > >+ StringTokenizer st =3D new StringTokenizer(s, " "); > >+ while (st.hasMoreTokens()) { > >+ String t =3D st.nextToken(); > >+ classpath.append(base + File.separatorChar + t); > >+ classpath.append(File.pathSeparatorChar); > >+ } > >+ } > >+ } > >+ } > >+ } > >+ } catch (IOException ioe) { > >+ if (fis !=3D null) > >+ try { > >+ fis.close(); > >+ } catch (IOException ioe2) { > >+ } > >+ } > >+ } > >+ } > >+ } > >+ cl =3D cl.getParent(); > >+ } > >+ } > >+} > > >Added: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/Axis Hook.java >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >--- (empty file) >+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/Axis Hook.java Thu Sep 9 12:43:48 2004 >@@ -0,0 +1,140 @@ >+/* > >+ * Copyright 2001-2004 The Apache Software Foundation. > >+ *=20 > >+ * Licensed under the Apache License, Version 2.0 (the "License"); > >+ * you may not use this file except in compliance with the License. > >+ * You may obtain a copy of the License at > >+ *=20 > >+ * http://www.apache.org/licenses/LICENSE-2.0 > >+ *=20 > >+ * Unless required by applicable law or agreed to in writing, software > >+ * distributed under the License is distributed on an "AS IS" BASIS, > >+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. > >+ * See the License for the specific language governing permissions and > >+ * limitations under the License. > >+ */ > >+ > >+package org.apache.beehive.wsm.axis; > >+ > >+import java.lang.reflect.Method; > >+import java.util.ArrayList; > >+import java.util.Collection; > >+import java.util.List; > >+ > >+import javax.xml.namespace.QName; > >+ > >+import org.apache.axis.wsdl.fromJava.Emitter; > >+import org.apache.axis.encoding.DefaultSOAPEncodingTypeMappingImpl; > >+import org.apache.axis.description.ServiceDesc; > >+import org.apache.axis.description.JavaServiceDesc; > >+import org.apache.axis.description.ParameterDesc; > >+import org.apache.axis.description.OperationDesc; > >+import org.apache.beehive.wsm.jsr181.model.WebServiceTYPEMetadata; > >+import org.apache.beehive.wsm.jsr181.model.WebServiceMETHODMetadata; > >+import org.apache.beehive.wsm.jsr181.model.WebServicePARAMETERMetadata; > >+ > >+import javax.jws.WebParam; > >+ > >+/********************************************************************* ********** > >+ *=20 > >+ * > >+ * @author Jonathan Colwell > >+ */ > >+public class AxisHook { > >+ > >+ public static ServiceDesc createServiceDesc(WebServiceTYPEMetadata wsm, > >+ ClassLoader cl) > >+ throws ClassNotFoundException, NoSuchMethodException > >+ { > >+=20 > >+ JavaServiceDesc sd =3D new JavaServiceDesc(); > >+ > >+ if (cl =3D=3D null) { > >+ /* > >+ * NOTE jcolwell@bea.com 2004-Aug-30 -- if no classloader=20 > >+ * was provided, use the one that loaded this Class > >+ */ > >+ cl =3D AxisHook.class.getClassLoader(); > >+ } > >+ > >+ Class serviceClass =3D cl.loadClass(wsm.getJavaFQClassName()); > >+ =20 > >+ String portType =3D wsm.getWsName(); > >+ sd.setName(portType); > >+ sd.setImplClass(serviceClass); > >+ > >+ String targetNamespace =3D wsm.getWsTargetNamespace(); > >+ sd.setDefaultNamespace(targetNamespace); > >+ =20 > >+ Collection methods =3D wsm.getMethods(); > >+ List allowedMethods =3D new ArrayList(); > >+ for (WebServiceMETHODMetadata meth : methods) { > >+ > >+ String operationName =3D meth.getWmOperationName(); > >+ > >+ if (operationName !=3D null && operationName.length() > 0) = { > >+ =20 > >+ OperationDesc od =3D new OperationDesc(); > >+ > >+ String javaMethodName =3D meth.getJavaMethodName(); > >+ od.setElementQName(new QName(operationName)); > >+ od.setName(javaMethodName); > >+ allowedMethods.add(javaMethodName); > >+ > >+ od.setSoapAction(meth.getWmAction()); > >+ > >+ od.setReturnQName(new QName(meth.getWrName())); =20 > >+ > >+ od.setReturnClass(meth.getJavaReturnType()); > >+ // od.setReturnHeader( > >+ =20 > >+ List parameters =3D meth.getParams(); > >+ List paramClasses =3D new ArrayList(); > >+=20 > >+ for (WebServicePARAMETERMetadata param : parameters) { > >+ =20 > >+ ParameterDesc pd =3D new ParameterDesc(); > >+ pd.setName(param.getWpName()); > >+ Class paramType =3D param.getJavaType(); > >+ pd.setJavaType(paramType); > >+ paramClasses.add(paramType); > >+ > >+ WebParam.Mode mo =3D param.getWpMode(); > >+ switch (mo) { > >+ case OUT: > >+ pd.setMode(ParameterDesc.OUT); > >+ pd.setInHeader(false); > >+ pd.setOutHeader(param.isWpHeader()); > >+ break; > >+ =20 > >+ case INOUT: > >+ pd.setMode(ParameterDesc.INOUT); > >+ boolean header =3D param.isWpHeader(); > >+ pd.setInHeader(header); > >+ pd.setOutHeader(header); > >+ break; > >+ =20 > >+ case IN: > >+ default: > >+ pd.setMode(ParameterDesc.IN); > >+ pd.setInHeader(param.isWpHeader()); > >+ pd.setOutHeader(false); > >+ } > >+ od.addParameter(pd); > >+ } > >+ > >+ Method javaMethod =3D serviceClass > >+ .getMethod(meth.getJavaMethodName(), > >+ paramClasses.toArray(new Class[paramClasses.size()])); > >+ > >+ od.setMethod(javaMethod); > >+ > >+ sd.addOperationDesc(od); > >+ } > >+ } > >+ sd.setAllowedMethods(allowedMethods); > >+ =20 > >+ return sd; > >+ } > >+} > >+ =20 > > >Added: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/Depl oymentDumper.java >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >--- (empty file) >+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/axis/Depl oymentDumper.java Thu Sep 9 12:43:48 2004 >@@ -0,0 +1,200 @@ >+/* > >+ * DeploymentDumper.java > >+ *=20 > >+ * Copyright 2001-2004 The Apache Software Foundation. > >+ *=20 > >+ *=20 > >+ * Licensed under the Apache License, Version 2.0 (the "License"); > >+ * you may not use this file except in compliance with the License. > >+ * You may obtain a copy of the License at > >+ * > >+ * http://www.apache.org/licenses/LICENSE-2.0 > >+ * > >+ * Unless required by applicable law or agreed to in writing, software > >+ * distributed under the License is distributed on an "AS IS" BASIS, > >+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. > >+ * See the License for the specific language governing permissions and > >+ * limitations under the License. > >+ *=20 > >+ *=20 > >+ * Original author: Jonathan Colwell > >+ */ > >+package org.apache.beehive.wsm.axis; > >+ > >+import com.sun.tools.apt.main.Main; > >+ > >+import java.lang.reflect.Method; > >+import java.io.FileOutputStream; > >+import java.io.OutputStreamWriter; > >+import java.io.Writer; > >+import java.util.ArrayList; > >+import java.util.Collection; > >+import java.util.List; > >+import java.util.Set; > >+ > >+import javax.xml.namespace.QName; > >+import javax.jws.WebParam; > >+ > >+import org.apache.axis.server.AxisServer; > >+import org.apache.axis.configuration.FileProvider; > >+import org.apache.axis.deployment.wsdd.WSDDDeployment; > >+import org.apache.axis.deployment.wsdd.WSDDOperation; > >+import org.apache.axis.deployment.wsdd.WSDDService; > >+import org.apache.axis.description.JavaServiceDesc; > >+import org.apache.axis.description.ServiceDesc; > >+import org.apache.axis.description.OperationDesc; > >+import org.apache.axis.description.ParameterDesc; > >+import org.apache.axis.encoding.SerializationContext; > >+import org.apache.axis.handlers.soap.SOAPService; > >+import org.apache.axis.providers.java.RPCProvider; > >+import org.apache.beehive.wsm.jsr181.model.WebServiceTYPEMetadata; > >+import org.apache.beehive.wsm.jsr181.model.WebServiceMETHODMetadata; > >+import org.apache.beehive.wsm.jsr181.model.WebServicePARAMETERMetadata; > >+import org.apache.beehive.wsm.jsr181.processor.apt.WsmAnnotationProcessor; > >+ > >+/********************************************************************* ********** > >+ *=20 > >+ * > >+ * @author Jonathan Colwell > >+ */ > >+public class DeploymentDumper { > >+ > >+ /** > >+ * FIXME jcolwell@bea.com 2004-Sep-08 -- come up with a better solution for > >+ * providing the args to APT as well as providing the WSDD file names > >+ * > >+ * Currently, the usage is: > >+ * > >+ */ > >+ public static void main(String[] args) throws Exception > >+ { > >+ if (args.length > 2) { > >+ String wsddOut =3D args[0]; > >+ String wsddIn =3D args[1]; > >+ int len =3D args.length - 2; > >+ String[] aptArgs =3D new String[len]; > >+ System.arraycopy(args, 2, aptArgs, 0, len); > >+ for (String arg : aptArgs) { > >+ System.out.println(arg); > >+ } > >+ =20 > >+ Main apt =3D new Main("AxisApt"); > >+ =20 > >+ if (0 =3D=3D apt.compile(aptArgs)) { > >+ DeploymentDumper dd =3D new DeploymentDumper(); > >+ dd.createAxisDeployment(dd.retrieveWebServiceMetadata(), > >+ wsddOut, > >+ wsddIn); > >+ =20 > >+ } > >+ } > >+ } > >+ > >+ public void createAxisDeployment(Collection wsms, > >+ String newConfigFilename, > >+ String existingConfigFilename) > >+ throws Exception > >+ { > >+ Writer fw =3D new OutputStreamWriter > >+ (new FileOutputStream(newConfigFilename), "UTF-8"); > >+ SerializationContext serial =3D new SerializationContext(fw); > >+ serial.setPretty(true); > >+ serial.writeString("\n"); > >+ =20 > >+ if (existingConfigFilename !=3D null) { > >+ FileProvider fp =3D new FileProvider(existingConfigFilename); > >+ > >+ /* > >+ * NOTE jcolwell@bea.com 2004-Sep-08 -- I don't really want > >+ * to configure an engine here but I just need the FileProvider > >+ * to process the loaded WSDD. Find out if there is a more=20 > >+ * "correct" way to accomplish this. > >+ * > >+ * an unfortunate side effect of using this default call to=20 > >+ * configureEngine is that a default server-config.wsdd appears in > >+ * the current directory. > >+ */ > >+ fp.configureEngine(new AxisServer()); > >+ > >+ WSDDDeployment dep =3D fp.getDeployment(); > >+ =20 > >+ if (dep !=3D null) { > >+=20 > >+ for (WebServiceTYPEMetadata wsm : wsms) { > >+ WSDDService wsds =3D new WSDDService(); > >+ =20 > >+ JavaServiceDesc sd =3D (JavaServiceDesc) > >+ AxisHook.createServiceDesc(wsm, getClass() > >+ .getClassLoader()); > >+ wsds.setName(sd.getName()); > >+ /* > >+ * NOTE jcolwell@bea.com 2004-Sep-08 --=20 > >+ * the default namespace needs to be spcified somehow but > >+ * doing so here causes weirdness when the webservice runs > >+ wsds.setQName(new QName(sd.getDefaultNamespace(), > >+ sd.getName())); > >+ */ > >+ wsds.setProviderQName(wsds.QNAME_JAVARPC_PROVIDER); =20 > >+ wsds.setUse(sd.getUse()); > >+ wsds.setStyle(sd.getStyle()); > >+ =20 > >+ /* > >+ * NOTE jcolwell@bea.com 2004-Sep-08 -- I want to prevent=20 > >+ * the JavaServiceDesc from introspecting itself when I call > >+ * getOperations() but it complained when I tried to set the=20 > >+ * impl class back to null after having set it when creating=20 > >+ * the servicedesc. In any case the resulting operations=20 > >+ * shown in the resulting WSDD look correct. > >+ */ > >+ // sd.setImplClass(null); > >+ > >+ List ops =3D = (List)sd > >+ .getOperations(); > >+ > >+ for (OperationDesc op : ops) { > >+ wsds.addOperation(new WSDDOperation(op)); > >+ } > >+ =20 > >+ List allowedMethods =3D sd.getAllowedMethods(); > >+ StringBuffer allowedNames =3D new StringBuffer(allowedMethods > >+ .size()); > >+ boolean firstRun =3D true; > >+ for (Object methName : allowedMethods) { > >+ if (firstRun) { > >+ firstRun =3D false; > >+ } > >+ else { > >+ allowedNames.append(' '); > >+ } > >+ allowedNames.append((String)methName); > >+ } > >+ wsds.setParameter("allowedMethods", allowedNames.toString()); > >+ wsds.setParameter("className", sd.getImplClass().getName()); > >+ > >+ > >+ /* > >+ * NOTE jcolwell@bea.com 2004-Sep-08 -- addService is=20 > >+ * protected in WSDDDeployment, but deployService=20 > >+ * appears to work for now. > >+ */ > >+ dep.deployService(wsds); > >+ } > >+ dep.writeToContext(serial); > >+ } > >+ } > >+ fw.close(); > >+ } > >+ > >+ protected Collection retrieveWebServiceMetadata() > >+ { > >+ Collection meta =3D=20 > >+ new ArrayList(); > >+ =20 > >+ Set keys =3D WsmAnnotationProcessor.getObjectModelNames(); > >+ for (String key : keys) { > >+ meta.add((WebServiceTYPEMetadata)WsmAnnotationProcessor > >+ .getObjectModel(key)); > >+ } > >+ return meta; =20 > >+ } > >+} > > >Added: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/util/Clas spathUtils.java >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >--- (empty file) >+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/util/Clas spathUtils.java Thu Sep 9 12:43:48 2004 >@@ -0,0 +1,62 @@ >+/* > >+ * ClasspathUtils.java > >+ *=20 > >+ * Copyright 2001-2004 The Apache Software Foundation. > >+ *=20 > >+ *=20 > >+ * Licensed under the Apache License, Version 2.0 (the "License"); > >+ * you may not use this file except in compliance with the License. > >+ * You may obtain a copy of the License at > >+ * > >+ * http://www.apache.org/licenses/LICENSE-2.0 > >+ * > >+ * Unless required by applicable law or agreed to in writing, software > >+ * distributed under the License is distributed on an "AS IS" BASIS, > >+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. > >+ * See the License for the specific language governing permissions and > >+ * limitations under the License. > >+ *=20 > >+ */ > >+package org.apache.beehive.wsm.util; > >+ > >+import java.io.File; > >+import java.util.StringTokenizer; > >+ > >+import org.apache.beehive.wsm.util.JavaArchiveFilter; > >+ > >+/********************************************************************* ********** > >+ *=20 > >+ * > >+ * @author Jonathan Colwell > >+ */ > >+public class ClasspathUtils { > >+ > >+ /** > >+ * Function borrowed from org.apache.axis.handlers.JWSHandler > >+ * > >+ * Expand a directory path or list of directory paths (File.pathSeparator > >+ * delimited) into a list of file paths of all the jar files in those > >+ * directories. > >+ * > >+ * @param dirPaths The string containing the directory path or list of > >+ * directory paths. > >+ * @return The file paths of the jar files in the directories. This is an > >+ * empty string if no files were found, and is terminated by an > >+ * additional pathSeparator in all other cases. > >+ */ > >+ public static String expandDirs(String dirPaths) { > >+ StringTokenizer st =3D new StringTokenizer(dirPaths, File.pathSeparator); > >+ StringBuffer buffer =3D new StringBuffer(); > >+ while (st.hasMoreTokens()) { > >+ String d =3D st.nextToken(); > >+ File dir =3D new File(d); > >+ if (dir.isDirectory()) { > >+ File[] files =3D dir.listFiles(new = JavaArchiveFilter()); > >+ for (int i =3D 0; i < files.length; i++) { > >+ buffer.append(files[i]).append(File.pathSeparator); > >+ } > >+ } > >+ } > >+ return buffer.toString(); > >+ } > >+} > > >Added: incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/util/Java ArchiveFilter.java >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >--- (empty file) >+++ incubator/beehive/trunk/wsm/src/runtime/org/apache/beehive/wsm/util/Java ArchiveFilter.java Thu Sep 9 12:43:48 2004 >@@ -0,0 +1,34 @@ >+/* > >+ * JavaArchiveFilter.java > >+ *=20 > >+ * Copyright 2001-2004 The Apache Software Foundation. > >+ *=20 > >+ *=20 > >+ * Licensed under the Apache License, Version 2.0 (the "License"); > >+ * you may not use this file except in compliance with the License. > >+ * You may obtain a copy of the License at > >+ * > >+ * http://www.apache.org/licenses/LICENSE-2.0 > >+ * > >+ * Unless required by applicable law or agreed to in writing, software > >+ * distributed under the License is distributed on an "AS IS" BASIS, > >+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. > >+ * See the License for the specific language governing permissions and > >+ * limitations under the License. > >+ *=20 > >+ */ > >+package org.apache.beehive.wsm.util; > >+ > >+import java.io.File; > >+import java.io.FileFilter; > >+ > >+/********************************************************************* ********** > >+ * This class stolen from an package private inner class of=20 > >+ * org.apache.axis.handlers.JWSHandler > >+ */ > >+public class JavaArchiveFilter implements FileFilter { > >+ public boolean accept(File file) { > >+ String name =3D file.getName().toLowerCase(); > >+ return (name.endsWith(".jar") || name.endsWith(".zip")); > >+ } > >+} > > >Added: incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/Foo.jws >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >--- (empty file) >+++ incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/Foo.jws Thu Sep 9 12:43:48 2004 >@@ -0,0 +1,46 @@ >+/* > >+ * Copyright 2001-2004 The Apache Software Foundation. > >+ *=20 > >+ * Licensed under the Apache License, Version 2.0 (the "License"); > >+ * you may not use this file except in compliance with the License. > >+ * You may obtain a copy of the License at > >+ *=20 > >+ * http://www.apache.org/licenses/LICENSE-2.0 > >+ *=20 > >+ * Unless required by applicable law or agreed to in writing, software > >+ * distributed under the License is distributed on an "AS IS" BASIS, > >+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. > >+ * See the License for the specific language governing permissions and > >+ * limitations under the License. > >+ */ > >+ > >+ > >+import javax.jws.Oneway; > >+import javax.jws.WebMethod; > >+import javax.jws.WebParam; > >+import javax.jws.WebResult; > >+import javax.jws.WebService; > >+ > >+/********************************************************************* ********** > >+ *=20 > >+ * > >+ * @author Jonathan Colwell > >+ */ > >+@WebService(name =3D "Abacus", > >+ serviceName =3D "Cheetorama", > >+ targetNamespace =3D "http://www.superflaco.com/AnnotationTest") > >+ public class Foo { > >+ > >+ @WebMethod(operationName =3D "GoLoco", action=3D"LocoAction") > >+ @WebResult > >+ public boolean getNutty(@WebParam int level, > >+ @WebParam(name=3D"detail") String = detail) { > >+ =20 > >+ return (level > 5); > >+ } > >+ > >+ @WebMethod @Oneway public String goHome(@WebParam(name=3D"when") long time) > >+ { > >+ return "Now"; > >+ } > >+ } > > >Added: incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/Annotatio nBasedDeployment/Bar.java >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >--- (empty file) >+++ incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/Annotatio nBasedDeployment/Bar.java Thu Sep 9 12:43:48 2004 >@@ -0,0 +1,46 @@ >+/* > >+ * Copyright 2001-2004 The Apache Software Foundation. > >+ *=20 > >+ * Licensed under the Apache License, Version 2.0 (the "License"); > >+ * you may not use this file except in compliance with the License. > >+ * You may obtain a copy of the License at > >+ *=20 > >+ * http://www.apache.org/licenses/LICENSE-2.0 > >+ *=20 > >+ * Unless required by applicable law or agreed to in writing, software > >+ * distributed under the License is distributed on an "AS IS" BASIS, > >+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. > >+ * See the License for the specific language governing permissions and > >+ * limitations under the License. > >+ */ > >+ > >+ > >+import javax.jws.Oneway; > >+import javax.jws.WebMethod; > >+import javax.jws.WebParam; > >+import javax.jws.WebResult; > >+import javax.jws.WebService; > >+ > >+/********************************************************************* ********** > >+ *=20 > >+ * > >+ * @author Jonathan Colwell > >+ */ > >+@WebService(name =3D "Milk", > >+ serviceName =3D "Chocolate", > >+ targetNamespace =3D "http://www.superflaco.com/Cocoa") > >+ public class Bar { > >+ > >+ @WebMethod(operationName =3D "EatCookie", action=3D"ChompChomp") > >+ @WebResult > >+ public String eatDough(@WebParam int chipCount, > >+ @WebParam String flavor) { > >+ =20 > >+ return flavor + ((chipCount > 5) ? " is Yummy" : " is boring"); > >+ } > >+ > >+ @WebMethod @WebResult(name =3D "cookiesInside") public int openCookieJar() > >+ { > >+ return 123; > >+ } > >+ } > > >Added: incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/Annotatio nBasedDeployment/Foo.java >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >--- (empty file) >+++ incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/Annotatio nBasedDeployment/Foo.java Thu Sep 9 12:43:48 2004 >@@ -0,0 +1,51 @@ >+/* > >+ * Copyright 2001-2004 The Apache Software Foundation. > >+ *=20 > >+ * Licensed under the Apache License, Version 2.0 (the "License"); > >+ * you may not use this file except in compliance with the License. > >+ * You may obtain a copy of the License at > >+ *=20 > >+ * http://www.apache.org/licenses/LICENSE-2.0 > >+ *=20 > >+ * Unless required by applicable law or agreed to in writing, software > >+ * distributed under the License is distributed on an "AS IS" BASIS, > >+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. > >+ * See the License for the specific language governing permissions and > >+ * limitations under the License. > >+ */ > >+ > >+ > >+import javax.jws.Oneway; > >+import javax.jws.WebMethod; > >+import javax.jws.WebParam; > >+import javax.jws.WebResult; > >+import javax.jws.WebService; > >+ > >+/********************************************************************* ********** > >+ *=20 > >+ * > >+ * @author Jonathan Colwell > >+ */ > >+@WebService(name =3D "Abacus", > >+ serviceName =3D "Cheetorama", > >+ targetNamespace =3D "http://www.superflaco.com/AnnotationTest") > >+ public class Foo { > >+ > >+ @WebMethod(operationName =3D "GoLoco", action=3D"LocoAction") > >+ @WebResult > >+ public boolean getNutty(@WebParam int level, > >+ @WebParam(name=3D"detail") String = detail) { > >+ =20 > >+ return (level > 5); > >+ } > >+ > >+ @WebMethod @WebResult(name =3D "howdy") public String goHome() > >+ { > >+ try { > >+ return "wutup!"; > >+ } > >+ catch (Exception e) { > >+ return e.toString(); > >+ } > >+ } > >+ } > > >Added: incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/Annotatio nBasedDeployment/dump.bat >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >--- (empty file) >+++ incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/Annotatio nBasedDeployment/dump.bat Thu Sep 9 12:43:48 2004 >@@ -0,0 +1,5 @@ >+call setEnv > >+ > >+%JAVA_HOME%\bin\java org.apache.beehive.wsm.axis.DeploymentDumper ..\annotated-server-config.wsdd ..\server-config.wsdd -classpath %classpath% -factory org.apache.beehive.wsm.jsr181.processor.apt.WsmAnnotationProcessorFactor y -d ..\classes Bar.java Foo.java > >+ > >+del server-config.wsdd > > >Added: incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/Annotatio nBasedDeployment/setEnv.bat >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >--- (empty file) >+++ incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/Annotatio nBasedDeployment/setEnv.bat Thu Sep 9 12:43:48 2004 >@@ -0,0 +1 @@ >+set classpath=3D..\classes;%JAVA_HOME%\lib\tools.jar;..\lib\axis.jar;..\lib\j= a xrpc.jar;..\lib\wsm.jar;..\lib\wsm-axis.jar;..\lib\commons-logging.jar;. .\lib\saaj.jar;..\lib\wsdl4j.jar;..\lib\;..\lib\jaxrpc.jar;..\lib\common s-discovery.jar;..\lib\log4j-1.2.8.jar > > >Added: incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/lib/log4j .properties >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >--- (empty file) >+++ incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/lib/log4j .properties Thu Sep 9 12:43:48 2004 >@@ -0,0 +1,20 @@ >+# Set root category priority to INFO and its only appender to CONSOLE. > >+log4j.rootCategory=3DINFO, CONSOLE > >+#log4j.rootCategory=3DINFO, CONSOLE, LOGFILE > >+ > >+# Set the enterprise logger category to FATAL and its only appender to CONSOLE. > >+log4j.logger.org.apache.axis.enterprise=3DFATAL, CONSOLE > >+ > >+# CONSOLE is set to be a ConsoleAppender using a PatternLayout. > >+log4j.appender.CONSOLE=3Dorg.apache.log4j.ConsoleAppender > >+log4j.appender.CONSOLE.Threshold=3DINFO > >+log4j.appender.CONSOLE.layout=3Dorg.apache.log4j.PatternLayout > >+log4j.appender.CONSOLE.layout.ConversionPattern=3D- %m%n > >+ > >+# LOGFILE is set to be a File appender using a PatternLayout. > >+log4j.appender.LOGFILE=3Dorg.apache.log4j.FileAppender > >+log4j.appender.LOGFILE.File=3Daxis.log > >+log4j.appender.LOGFILE.Append=3Dtrue > >+log4j.appender.LOGFILE.Threshold=3DINFO > >+log4j.appender.LOGFILE.layout=3Dorg.apache.log4j.PatternLayout > >+log4j.appender.LOGFILE.layout.ConversionPattern=3D%-4r [%t] %-5p %c %x = - %m%n > > >Added: incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/server-co nfig.wsdd >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >--- (empty file) >+++ incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/server-co nfig.wsdd Thu Sep 9 12:43:48 2004 >@@ -0,0 +1,47 @@ >+ > >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ http://xml.apache.org/axis/wsdd/ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ >+ > > >Added: incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/web.xml >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >--- (empty file) >+++ incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/WEB-INF/web.xml Thu Sep 9 12:43:48 2004 >@@ -0,0 +1,96 @@ >+ >+ >++Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> >+ >+ >+ Apache-Axis >+ =20 >+ >+ org.apache.axis.transport.http.AxisHTTPSessionListener >+ >+ =20 >+ >+ AxisServlet >+ Apache-Axis Servlet >+ >+ org.apache.axis.transport.http.AxisServlet >+ >+ >+ >+ >+ AdminServlet >+ Axis Admin Servlet >+ >+ org.apache.axis.transport.http.AdminServlet >+ >+ 100 >+ >+ >+ >+ SOAPMonitorService >+ SOAPMonitorService >+ >+ org.apache.axis.monitor.SOAPMonitorService >+ >+ >+ SOAPMonitorPort >+ 5001 >+ >+ 100 >+ >+ >+ >+ AxisServlet >+ /servlet/AxisServlet >+ >+ >+ >+ AxisServlet >+ *.jws >+ >+ >+ >+ AxisServlet >+ /services/* >+ >+ >+ >+ SOAPMonitorService >+ /SOAPMonitor >+ >+ >+ >+ >+ >+ >+ >+ 5 >+ >+ >+ >+ >+ wsdl >+ text/xml >+ >+ =20 >+ >+ >+ xsd >+ text/xml >+ >+ >+ >+ index.html >+ index.jsp >+ index.jws >+ >+ >+ > >Added: incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/happyaxis.jsp >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >--- (empty file) >+++ incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/happyaxis.jsp Thu Sep 9 12:43:48 2004 >@@ -0,0 +1,488 @@ >+ > >+<%@ page import=3D"java.io.InputStream, > >+ java.io.IOException, > >+ javax.xml.parsers.SAXParser, > >+ javax.xml.parsers.SAXParserFactory" > >+ session=3D"false" %> > >+ <% > >+ /* > >+ * Copyright 2002,2004 The Apache Software Foundation. > >+ *=20 > >+ * Licensed under the Apache License, Version 2.0 (the "License"); > >+ * you may not use this file except in compliance with the License. > >+ * You may obtain a copy of the License at > >+ *=20 > >+ * http://www.apache.org/licenses/LICENSE-2.0 > >+ *=20 > >+ * Unless required by applicable law or agreed to in writing, software > >+ * distributed under the License is distributed on an "AS IS" BASIS, > >+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. > >+ * See the License for the specific language governing permissions and > >+ * limitations under the License. > >+ */ > >+%> > >+ > >+Axis Happiness Page > >+ > >+ > >+<%! > >+ > >+ /* > >+ * Happiness tests for axis. These look at the classpath and warn if things > >+ * are missing. Normally addng this much code in a JSP page is mad > >+ * but here we want to validate JSP compilation too, and have a drop-in > >+ * page for easy re-use > >+ * @author Steve 'configuration problems' Loughran > >+ * @author dims > >+ * @author Brian Ewins > >+ */ > >+ > >+ > >+ /** > >+ * Get a string providing install information. > >+ * TODO: make this platform aware and give specific hints > >+ */ > >+ public String getInstallHints(HttpServletRequest request) { > >+ > >+ String hint=3D > >+ "Note: On Tomcat 4.x and Java1.4, you may need to put libraries that contain " > >+ +"java.* or javax.* packages into CATALINA_HOME/common/lib" > >+ +"
jaxrpc.jar and saaj.jar are two such libraries."; > >+ return hint; > >+ } > >+ > >+ /** > >+ * test for a class existing > >+ * @param classname > >+ * @return class iff present > >+ */ > >+ Class classExists(String classname) { > >+ try { > >+ return Class.forName(classname); > >+ } catch (ClassNotFoundException e) { > >+ return null; > >+ } > >+ } > >+ > >+ /** > >+ * test for resource on the classpath > >+ * @param resource > >+ * @return true iff present > >+ */ > >+ boolean resourceExists(String resource) { > >+ boolean found; > >+ InputStream instream=3Dthis.getClass().getResourceAsStream(resource); > >+ found=3Dinstream!=3Dnull; > >+ if(instream!=3Dnull) { > >+ try { > >+ instream.close(); > >+ } catch (IOException e) { > >+ } > >+ } > >+ return found; > >+ } > >+ > >+ /** > >+ * probe for a class, print an error message is missing > >+ * @param out stream to print stuff > >+ * @param category text like "warning" or "error" > >+ * @param classname class to look for > >+ * @param jarFile where this class comes from > >+ * @param errorText extra error text > >+ * @param homePage where to d/l the library > >+ * @return the number of missing classes > >+ * @throws IOException > >+ */ > >+ int probeClass(JspWriter out, > >+ String category, > >+ String classname, > >+ String jarFile, > >+ String description, > >+ String errorText, > >+ String homePage) throws IOException { > >+ try { > >+ Class clazz =3D classExists(classname); > >+ if(clazz =3D=3D null) { > >+ String url=3D""; > >+ if(homePage!=3Dnull) { > >+ url=3D"
See "+homePage+""; > >+ } > >+ out.write("

"+category+": could not find class "+classname > >+ +" from file "+jarFile > >+ +"
"+errorText > >+ +url > >+ +"

"); > >+ return 1; > >+ } else { > >+ String location =3D getLocation(out, clazz); > >+ if(location =3D=3D null) { > >+ out.write("Found "+ description + " (" + classname + ")
"); > >+ } > >+ else { > >+ out.write("Found "+ description + " (" + classname + ") at " + location + "
"); > >+ } > >+ return 0; > >+ } > >+ } catch(NoClassDefFoundError ncdfe) {=20 > >+ String url=3D""; > >+ if(homePage!=3Dnull) { > >+ url=3D"
See "+homePage+""; > >+ } > >+ out.write("

"+category+": could not find a dependency" > >+ +" of class "+classname > >+ +" from file "+jarFile > >+ +"
"+errorText > >+ +url > >+ +"
The root cause was: "+ncdfe.getMessage() > >+ +"
This can happen e.g. if "+classname+" is in" > >+ +" the 'common' classpath, but a dependency like " > >+ +" activation.jar is only in the webapp classpath." > >+ +"

"); > >+ return 1; > >+ } > >+ } > >+ > >+ /** > >+ * get the location of a class > >+ * @param out > >+ * @param clazz > >+ * @return the jar file or path where a class was found > >+ */ > >+ > >+ String getLocation(JspWriter out, > >+ Class clazz) { > >+ try { > >+ java.net.URL url =3D clazz.getProtectionDomain().getCodeSource().getLocation(); > >+ String location =3D url.toString(); > >+ if(location.startsWith("jar")) { > >+ url =3D ((java.net.JarURLConnection)url.openConnection()).getJarFileURL(); > >+ location =3D url.toString(); > >+ }=20 > >+ =20 > >+ if(location.startsWith("file")) { > >+ java.io.File file =3D new java.io.File(url.getFile()); > >+ return file.getAbsolutePath(); > >+ } else { > >+ return url.toString(); > >+ } > >+ } catch (Throwable t){ > >+ } > >+ return "an unknown location"; > >+ } > >+ > >+ /** > >+ * a class we need if a class is missing > >+ * @param out stream to print stuff > >+ * @param classname class to look for > >+ * @param jarFile where this class comes from > >+ * @param errorText extra error text > >+ * @param homePage where to d/l the library > >+ * @throws IOException when needed > >+ * @return the number of missing libraries (0 or 1) > >+ */ > >+ int needClass(JspWriter out, > >+ String classname, > >+ String jarFile, > >+ String description, > >+ String errorText, > >+ String homePage) throws IOException { > >+ return probeClass(out, > >+ "Error", > >+ classname, > >+ jarFile, > >+ description, > >+ errorText, > >+ homePage); > >+ } > >+ > >+ /** > >+ * print warning message if a class is missing > >+ * @param out stream to print stuff > >+ * @param classname class to look for > >+ * @param jarFile where this class comes from > >+ * @param errorText extra error text > >+ * @param homePage where to d/l the library > >+ * @throws IOException when needed > >+ * @return the number of missing libraries (0 or 1) > >+ */ > >+ int wantClass(JspWriter out, > >+ String classname, > >+ String jarFile, > >+ String description, > >+ String errorText, > >+ String homePage) throws IOException { > >+ return probeClass(out, > >+ "Warning", > >+ classname, > >+ jarFile, > >+ description, > >+ errorText, > >+ homePage); > >+ } > >+ > >+ /** > >+ * probe for a resource existing, > >+ * @param out > >+ * @param resource > >+ * @param errorText > >+ * @throws Exception > >+ */ > >+ int wantResource(JspWriter out, > >+ String resource, > >+ String errorText) throws Exception { > >+ if(!resourceExists(resource)) { > >+ out.write("

Warning: could not find resource "+resource > >+ +"
" > >+ +errorText); > >+ return 0; > >+ } else { > >+ out.write("found "+resource+"
"); > >+ return 1; > >+ } > >+ } > >+ > >+ > >+ /** > >+ * get servlet version string > >+ * > >+ */ > >+ > >+ public String getServletVersion() { > >+ ServletContext = context=3DgetServletConfig().getServletContext(); > >+ int major =3D context.getMajorVersion(); > >+ int minor =3D context.getMinorVersion(); > >+ return Integer.toString(major) + '.' + Integer.toString(minor); > >+ } > >+ > >+ > >+ > >+ /** > >+ * what parser are we using. > >+ * @return the classname of the parser > >+ */ > >+ private String getParserName() { > >+ SAXParser saxParser =3D getSAXParser(); > >+ if (saxParser =3D=3D null) { > >+ return "Could not create an XML Parser"; > >+ } > >+ > >+ // check to what is in the classname > >+ String saxParserName =3D saxParser.getClass().getName(); > >+ return saxParserName; > >+ } > >+ > >+ /** > >+ * Create a JAXP SAXParser > >+ * @return parser or null for trouble > >+ */ > >+ private SAXParser getSAXParser() { > >+ SAXParserFactory saxParserFactory =3D SAXParserFactory.newInstance(); > >+ if (saxParserFactory =3D=3D null) { > >+ return null; > >+ } > >+ SAXParser saxParser =3D null; > >+ try { > >+ saxParser =3D saxParserFactory.newSAXParser(); > >+ } catch (Exception e) { > >+ } > >+ return saxParser; > >+ } > >+ > >+ /** > >+ * get the location of the parser > >+ * @return path or null for trouble in tracking it down > >+ */ > >+ > >+ private String getParserLocation(JspWriter out) { > >+ SAXParser saxParser =3D getSAXParser(); > >+ if (saxParser =3D=3D null) { > >+ return null; > >+ } > >+ String location =3D getLocation(out,saxParser.getClass()); > >+ return location; > >+ } > >+ %> > >+Axis Happiness Page > >+ > >+

Axis Happiness Page

> >+

Examining webapp configuration

> >+ > >+

> >+

Needed Components

> >+<% > >+ int needed=3D0,wanted=3D0; > >+ > >+ /** > >+ * the essentials, without these Axis is not going to work > >+ */ > >+ needed=3DneedClass(out, "javax.xml.soap.SOAPMessage", > >+ "saaj.jar", > >+ "SAAJ API", > >+ "Axis will not work", > >+ "http://xml.apache.org/axis/"); > >+ > >+ needed+=3DneedClass(out, "javax.xml.rpc.Service", > >+ "jaxrpc.jar", > >+ "JAX-RPC API", > >+ "Axis will not work", > >+ "http://xml.apache.org/axis/"); > >+ > >+ needed+=3DneedClass(out, "org.apache.axis.transport.http.AxisServlet", > >+ "axis.jar", > >+ "Apache-Axis", > >+ "Axis will not work", > >+ "http://xml.apache.org/axis/"); > >+ > >+ needed+=3DneedClass(out, "org.apache.commons.discovery.Resource", > >+ "commons-discovery.jar", > >+ "Jakarta-Commons Discovery", > >+ "Axis will not work", > >+ "http://jakarta.apache.org/commons/discovery.html"); > >+ > >+ needed+=3DneedClass(out, "org.apache.commons.logging.Log", > >+ "commons-logging.jar", > >+ "Jakarta-Commons Logging", > >+ "Axis will not work", > >+ "http://jakarta.apache.org/commons/logging.html"); > >+ > >+ needed+=3DneedClass(out, "org.apache.log4j.Layout", > >+ "log4j-1.2.8.jar", > >+ "Log4j", > >+ "Axis may not work", > >+ "http://jakarta.apache.org/log4j"); > >+ > >+ //should we search for a javax.wsdl file here, to hint that it needs > >+ //to go into an approved directory? because we dont seem to need to do that. > >+ needed+=3DneedClass(out, "com.ibm.wsdl.factory.WSDLFactoryImpl", > >+ "wsdl4j.jar", > >+ "IBM's WSDL4Java", > >+ "Axis will not work", > >+ null); > >+ > >+ needed+=3DneedClass(out, "javax.xml.parsers.SAXParserFactory", > >+ "xerces.jar", > >+ "JAXP implementation", > >+ "Axis will not work", > >+ "http://xml.apache.org/xerces-j/"); > >+ > >+ needed+=3DneedClass(out,"javax.activation.DataHandler", > >+ "activation.jar", > >+ "Activation API", > >+ "Axis will not work", > >+ "http://java.sun.com/products/javabeans/glasgow/jaf.html"); > >+%> > >+

Optional Components

> >+<% > >+ /* > >+ * now the stuff we can live without > >+ */ > >+ wanted+=3DwantClass(out,"javax.mail.internet.MimeMessage", > >+ "mail.jar", > >+ "Mail API", > >+ "Attachments will not work", > >+ "http://java.sun.com/products/javamail/"); > >+ > >+ wanted+=3DwantClass(out,"org.apache.xml.security.Init", > >+ "xmlsec.jar", > >+ "XML Security API", > >+ "XML Security is not supported", > >+ "http://xml.apache.org/security/"); > >+ > >+ wanted +=3D wantClass(out, "javax.net.ssl.SSLSocketFactory", > >+ "jsse.jar or java1.4+ runtime", > >+ "Java Secure Socket Extension", > >+ "https is not supported", > >+ "http://java.sun.com/products/jsse/"); > >+ /* > >+ * resources on the classpath path > >+ */ > >+ /* broken; this is a file, not a resource > >+ wantResource(out,"/server-config.wsdd", > >+ "There is no server configuration file;" > >+ +"run AdminClient to create one"); > >+ */ > >+ /* add more libraries here */ > >+ > >+ out.write("

"); > >+ //is everythng we need here > >+ if(needed=3D=3D0) { > >+ //yes, be happy > >+ out.write("The core axis libraries are present. "); > >+ } else { > >+ //no, be very unhappy > >+ response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); > >+ out.write("" > >+ +needed > >+ +" core axis librar" > >+ +(needed=3D=3D1?"y is":"ies are") > >+ +" missing"); > >+ } > >+ //now look at wanted stuff > >+ if(wanted>0) { > >+ out.write("" > >+ +wanted > >+ +" optional axis librar" > >+ +(wanted=3D=3D1?"y is":"ies are") > >+ +" missing"); > >+ } else { > >+ out.write("The optional components are present."); > >+ } > >+ out.write("

"); > >+ //hint if anything is missing > >+ if(needed>0 || wanted>0 ) { > >+ out.write(getInstallHints(request)); > >+ } > >+ > >+ %> > >+

> >+ Note: Even if everything this page probes for is present, there is no guarantee your > >+ web service will work, because there are many configuration options that we do > >+ not check for. These tests are necessary but not sufficient > >+


> >+ > >+

Examining Application Server

> >+ <% > >+ String servletVersion=3DgetServletVersion(); > >+ String xmlParser=3DgetParserName(); > >+ String xmlParserLocation =3D getParserLocation(out); > >+ > >+ %> > >+ > >+ > >+ > >+ > >+
Servlet version<%=3D servletVersion %>
XML Parser<%=3D xmlParser %>
XML ParserLocation<%=3D xmlParserLocation %>
> >+<% if(xmlParser.indexOf("crimson")>=3D0) { %> > >+

> >+ We recommend Xerces 2 > >+ over Crimson as the XML parser for Axis > >+

> >+<% } %> > >+ > >+

Examining System Properties

> >+<% > >+ /**=20 > >+ * Dump the system properties > >+ */ > >+ java.util.Enumeration e=3Dnull; > >+ try { > >+ e=3D System.getProperties().propertyNames(); > >+ } catch (SecurityException se) { > >+ } > >+ if(e!=3Dnull) { > >+ out.write("
");
>
>+        for (;e.hasMoreElements();) {
>
>+            String key =3D (String) e.nextElement();
>
>+            out.write(key + "=3D" + System.getProperty(key)+"\n");
>
>+        }
>
>+        out.write("

"); > >+ } else { > >+ out.write("System properties are not accessible

"); > >+ } > >+%> > >+


> >+ Platform: <%=3D getServletConfig().getServletContext().getServerInfo() %> > >+ > >+ > >+ > >+ > > >Added: incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/index.html >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D >--- (empty file) >+++ incubator/beehive/trunk/wsm/test/webapps/AnnotatedAxis/index.html Thu Sep 9 12:43:48 2004 >@@ -0,0 +1,45 @@ >+ > >+ > >+ > >+ >+content=3D"text/html; charset=3Diso-8859-1"> > >+Apache-Axis > >+ > >+ > >+ > >+ > >+

Apache-AXIS

> >+ > >+

Hello! Welcome to Apache-Axis -- now with Annotations!.

> >+ > >+

What do you want to do today?

> >+ > >+
    > >+
  • Validate > >+ the local installation's configuration
    > >+ see below if this does not work.
  • > >+
  • View > >+ the list of deployed Web services
  • > >+
  • > >+ Call a local endpoint by its Annotated name (or see its > >+ WSDL). > >+
  • Visit > >+ the Apache-Axis Home Page
  • > >+
> >+ > >+This is a prototype implementation of JSR-181 intended to simply explore how difficult it is to make the existing AXIS JWS system support Annotations. This is not a complete implementation of JSR-181 but it does cover many of the key features. One should also keep in mind that there is no intention that this code be considered as anything more than a somewhat functional draft whipped up in just a few days. Comments and criticism are welcome especially considering that the author only started looking at the internals of AXIS on August 10, 2004 and may have misunderstood how it actually functions. > >+ > >+ > >+

Validating Axis

> >+ > >+If the "happyaxis" validation page displays an exception instead of a > >+status page, the likely cause is that you have multiple XML parsers in > >+your classpath. Clean up your classpath by eliminating extraneous parsers. > >+ > >+

> >+If you have problems getting Axis to work, consult the Axis > >+ >+href=3D"http://nagoya.apache.org/wiki/apachewiki.cgi?AxisProjectPages">= W iki > >+and then try the Axis user mailing list. > >+ > >+ > > > =20 >