diff --git a/services/additions/WEB-INF/classes/README.txt b/services/additions/WEB-INF/classes/README.txt deleted file mode 100644 index e783a08f9..000000000 --- a/services/additions/WEB-INF/classes/README.txt +++ /dev/null @@ -1,12 +0,0 @@ -bdc34: -This directory is here so that we can stick properties files -and other resources into a directory that will end up on -the java CLASSPATH. - -Files for apache axis: - -rw-r--r-- 1 bdc34 bdc34 9355 Aug 14 12:13 i18n_ja.properties - -rw-r--r-- 1 bdc34 bdc34 4799 Aug 14 12:13 i18n.properties - -rw-rw-r-- 1 bdc34 bdc34 921 Aug 14 12:32 log4j.properties - -It seems like the log4j.properties file may cause problems if -we start using log4j in other parts of the system. diff --git a/services/additions/WEB-INF/classes/i18n.properties b/services/additions/WEB-INF/classes/i18n.properties deleted file mode 100644 index 8b1deba2e..000000000 --- a/services/additions/WEB-INF/classes/i18n.properties +++ /dev/null @@ -1,132 +0,0 @@ -############################################################ -# i18n settings for the Axis Web-Application -# - -#################### [i18n global setting] ################# -# -locales=en ja - -#################### [index.jsp] ########################### -# - -### Header ### -# -language=Language -welcomeMessage=Hello! Welcome to Apache-Axis. - -### Operation list ### -# -operationType=What do you want to do today? - -# Validation -validation=Validation -validationURL=happyaxis.jsp -validationFootnote00=Validate the local installation's configuration -validationFootnote01=see below if this does not work. - -# List -serviceList=List -serviceListURL=servlet/AxisServlet -serviceListFootnote=View the list of deployed Web services - -# Call -callAnEndpoint=Call -callAnEndpointURL=EchoHeaders.jws?method=list -callAnEndpointFootnote00=Call a local endpoint that list's the caller's http headers -callAnEndpointFootnote01=(or see its WSDL). - -# Visit -visit=Visit -visitURL=http://ws.apache.org/axis/ -visitFootnote=Visit the Apache-Axis Home Page - -# Admin -admin=Administer Axis -adminURL=servlet/AdminServlet -adminFootnote=[disabled by default for security reasons] - -# SOAPMonitor -soapMonitor=SOAPMonitor -soapMonitorURL=SOAPMonitor -soapMonitorFootnote=[disabled by default for security reasons] - -# Sidenote -sideNote=To enable the disabled features, uncomment the appropriate declarations in WEB-INF/web.xml in the webapplication and restart it. - -### Validating Axis ### -# - -# Title -validatingAxis=Validating Axis - -# Note 0 -validationNote00=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. - -# Note 1 -validationNote01=If you have problems getting Axis to work, consult the Axis Wiki and then try the Axis user mailing list. - -# -#################### [index.jsp] ########################### - -#################### [happyaxis.jsp] ####################### -# - -pageTitle=Axis Happiness Page -pageRole=Examining webapp configuration - -### Needed Components ### -# -neededComponents=Needed Components -error=Error -warning=Warning -criticalErrorMessage=Axis will not work. -uncertainErrorMessage=Axis may not work. -# parameters = url, name -seeHomepage=
See {0} -# parameters = category, classname, jarFile, errorText, url -couldNotFound=

{0}: could not find class {1} from file {2}
{3} {4}

-# parameters = description, classname -foundClass00=Found {0} ( {1} ) -# parameters = description, classname -foundClass01=Found {0} ( {1} ) at {2} -# parameters = category, classname, errorText, url -couldNotFoundDep=

{0}: could not find a dependency of class {1} from file {2}
{3} {4} -# parameters = ncdfe.getMessage(), classname -theRootCause=
The root cause was: {0}
This can happen e.g. if {1} is in the 'common' classpath, but a dependency like activation.jar is only in the webapp classpath.

-# parameters = location -invalidSAAJ=Error: Invalid version of SAAJ API found in {0}. Make sure that Axis' saaj.jar precedes {0} in CLASSPATH.
-axisInstallation=Axis installation instructions - -### Optional Components ### -# - -optionalComponents=Optional Components -attachmentsError=Attachments will not work. -xmlSecurityError=XML Security is not supported. -httpsError=https is not supported. - -happyResult00=The core axis libraries are present. -happyResult01=The optional components are present. -# parameters = needed(num of missing libraries) -unhappyResult00={0} core axis library(ies) are missing -# parameters = wanted(num of missing libraries) -unhappyResult01={0} wanted optional axis librar(ies) are missing - -hintString=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.

-noteString=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 ### -# -apsExamining=Examining Application Server -recommendedParser=We recommend Xerces 2 over Crimson as the XML parser for Axis -couldNotCreateParser=Could not create an XML Parser - -### Examining System Properties ### -# -sysExamining=Examining System Properties -sysPropError=System properties are not accessible.

-classFoundError=an unknown location -apsPlatform=Platform - -# -#################### [happyaxis.jsp] ####################### \ No newline at end of file diff --git a/services/additions/WEB-INF/classes/i18n_ja.properties b/services/additions/WEB-INF/classes/i18n_ja.properties deleted file mode 100644 index 91fb3cf14..000000000 --- a/services/additions/WEB-INF/classes/i18n_ja.properties +++ /dev/null @@ -1,127 +0,0 @@ -############################################################ -# Japanese settings for the Axis Web-Application -# - -#################### [index.jsp] ########################### -# - -### Header ### -# -language=\u8a00\u8a9e -welcomeMessage=\u3053\u3093\u306b\u3061\u306f\uff01 Apache-Axis\u3078\u3088\u3046\u3053\u305d - -### Operation list ### -# -operationType=\u4eca\u65e5\u306f\u4f55\u3092\u3057\u305f\u3044\u3067\u3059\u304b\uff1f - -# Validation -validation=\u691c\u8a3c -validationURL=happyaxis.jsp -validationFootnote00=\u30ed\u30fc\u30ab\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u72b6\u6cc1\u3092\u691c\u8a3c\u3059\u308b -validationFootnote01=\u3046\u307e\u304f\u6a5f\u80fd\u3057\u306a\u3044\u5834\u5408\u306f\u3001\u4e0b\u8a18\u300cAxis\u306e\u691c\u8a3c\u300d\u3092\u53c2\u7167 - -# List -serviceList=\u30ea\u30b9\u30c8 -serviceListURL=servlet/AxisServlet -serviceListFootnote=\u30c7\u30d7\u30ed\u30a4\u6e08\u307f\u306eWeb\u30b5\u30fc\u30d3\u30b9\u30ea\u30b9\u30c8\u3092\u898b\u308b - -# Call -callAnEndpoint=\u547c\u51fa\u3057 -callAnEndpointURL=EchoHeaders.jws?method=list -callAnEndpointFootnote00=HTTP\u30d8\u30c3\u30c0\u306e\u4e00\u89a7\u8868\u793a\u3092\u884c\u3046\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u8d77\u52d5\u3059\u308b -callAnEndpointFootnote01=(\u3082\u3057\u304f\u306fWSDL\u306e\u53c2\u7167) - -# Visit -visit=\u8a2a\u554f -visitURL=http://ws.apache.org/axis/ja/index.html -visitFootnote=Apache Axis\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u3092\u8a2a\u554f\u3059\u308b - -# Admin -admin=Axis\u306e\u7ba1\u7406 -adminURL=servlet/AdminServlet -adminFootnote=[\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u306e\u7406\u7531\u304b\u3089\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u5229\u7528\u4e0d\u53ef] - -# SOAPMonitor -soapMonitor=SOAP\u30e2\u30cb\u30bf -soapMonitorURL=SOAPMonitor -soapMonitorFootnote=[\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u306e\u7406\u7531\u304b\u3089\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u5229\u7528\u4e0d\u53ef] - -# Sidenote -sideNote=\u4e0a\u8a18\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u5229\u7528\u3067\u304d\u306a\u3044\u6a5f\u80fd\u3092\u6709\u52b9\u306b\u3059\u308b\u306b\u306f\u3001web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u5185\u306eWEB-INF/web.xml\u30d5\u30a1\u30a4\u30eb\u306e\u8a72\u5f53\u3059\u308b\u5ba3\u8a00\u306e\u30b3\u30e1\u30f3\u30c8\u3092\u5916\u3057\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u518d\u8d77\u52d5\u3057\u3066\u4e0b\u3055\u3044\u3002 - -### Validating Axis ### -# - -# Title -validatingAxis=Axis\u306e\u691c\u8a3c - -# Note 0 -validationNote00="happyaxis"\u691c\u8a3c\u30da\u30fc\u30b8\u304c\u72b6\u614b\u8868\u793a\u3067\u306f\u306a\u304f\u4f8b\u5916\u3092\u8868\u793a\u3059\u308b\u5834\u5408\u3001\u539f\u56e0\u3068\u3057\u3066\u306f\u30af\u30e9\u30b9\u30d1\u30b9\u5185\u306b\u8907\u6570\u306eXML\u30d1\u30fc\u30b5\u3092\u6307\u5b9a\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u3002\u95a2\u4fc2\u306a\u3044\u30d1\u30fc\u30b5\u3092\u30af\u30e9\u30b9\u30d1\u30b9\u304b\u3089\u53d6\u308a\u9664\u3044\u3066\u307f\u3066\u4e0b\u3055\u3044\u3002 - -# Note 1 -validationNote01=Axis\u3092\u52d5\u4f5c\u3055\u305b\u308b\u4e0a\u3067\u554f\u984c\u3092\u62b1\u3048\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u307e\u305aAxis Wiki\u3092\u53c2\u8003\u306b\u3057\u3001\u305d\u306e\u5f8c\u3067Axis\u30e6\u30fc\u30b6\u30e1\u30fc\u30ea\u30f3\u30b0\u30ea\u30b9\u30c8\u306b\u6295\u7a3f\u3057\u3066\u307f\u3066\u4e0b\u3055\u3044\u3002 - -# -#################### [index.jsp] ########################### - -#################### [happyaxis.jsp] ####################### -# -pageTitle=Axis Happiness Page -pageRole=webapp\u306e\u69cb\u6210\u306b\u95a2\u3059\u308b\u8abf\u67fb - -### Needed Components ### -# -neededComponents=\u5fc5\u9808\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8 -error=\u30a8\u30e9\u30fc -warning=\u8b66\u544a -criticalErrorMessage=\u304a\u305d\u3089\u304fAxis\u306f\u52d5\u304d\u307e\u305b\u3093\u3002 -uncertainErrorMessage=Axis\u306f\u52d5\u304b\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002 -# parameters = url, name -seeHomepage=
{0}\u3092\u898b\u3066\u4e0b\u3055\u3044\u3002 -# parameters = category, classname, jarFile, errorText, url -couldNotFound=

{0}: {2}\u30d5\u30a1\u30a4\u30eb\u304c\u63d0\u4f9b\u3059\u308b{1}\u30af\u30e9\u30b9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002
{3} {4}

-# parameters = description, classname -foundClass00={0} ( {1} ) \u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002 -# parameters = description, classname, location -foundClass01={0} ( {1} ) \u304c{2}\u3067\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002 -# parameters = category, classname, errorText, url -couldNotFoundDep=

{0}: {2}\u30d5\u30a1\u30a4\u30eb\u304c\u63d0\u4f9b\u3059\u308b{1}\u30af\u30e9\u30b9\u306e\u4f9d\u5b58\u95a2\u4fc2\u304c\u89e3\u6c7a\u3067\u304d\u307e\u305b\u3093\u3002
{3} {4} -# parameters = ncdfe.getMessage(), classname -theRootCause=
\u6839\u672c\u539f\u56e0: {0}
\u3053\u306e\u30a8\u30e9\u30fc\u306f\u6b21\u306e\u3088\u3046\u306a\u5834\u5408\u306b\u767a\u751f\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u300c\u5171\u901a\u306e\u300d\u30af\u30e9\u30b9\u30d1\u30b9\u306b{1}\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u306b\u3082\u304b\u304b\u308f\u3089\u305a\u3001activation.jar \u306e\u3088\u3046\u306a\u4f9d\u5b58\u3059\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u304cwebapp\u306e\u30af\u30e9\u30b9\u30d1\u30b9\u3060\u3051\u306b\u3057\u304b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u3088\u3046\u306a\u5834\u5408\u3067\u3059\u3002

-# parameters = location -invalidSAAJ=\u30a8\u30e9\u30fc: {0}\u306b\u9069\u5207\u3067\u306a\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306eSAAJ API\u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002Axis\u306esaaj.jar\u3092\u3001CLASSPATH\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b{0} \u3088\u308a\u3082\u524d\u65b9\u306b\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002
-axisInstallation=Axis\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806 - -### Optional Components ### -# -optionalComponents=\u30aa\u30d7\u30b7\u30e7\u30ca\u30eb\uff65\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8 -attachmentsError=\u304a\u305d\u3089\u304fAttachments\u306f\u6a5f\u80fd\u3057\u307e\u305b\u3093\u3002 -xmlSecurityError=XML Security\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u307e\u305b\u3093\u3002 -httpsError=https\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u307e\u305b\u3093\u3002 - -happyResult00=axis\u306e\u30b3\u30a2\uff65\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u5168\u3066\u5b58\u5728\u3057\u3066\u3044\u307e\u3059\u3002 -happyResult01=\u30aa\u30d7\u30b7\u30e7\u30ca\u30eb\uff65\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u5b58\u5728\u3057\u3066\u3044\u307e\u3059\u3002 -# parameters = needed(num of missing libraries) -unhappyResult00=axis\u306e\u30b3\u30a2\uff65\u30e9\u30a4\u30d6\u30e9\u30ea\u304c{0}\u3064\u6b20\u3051\u3066\u3044\u307e\u3059\u3002 -# parameters = wanted(num of missing libraries) -unhappyResult01=axis\u306e\u30aa\u30d7\u30b7\u30e7\u30ca\u30eb\uff65\u30e9\u30a4\u30d6\u30e9\u30ea\u304c{0}\u3064\u6b20\u3051\u3066\u3044\u307e\u3059\u3002 - -hintString=\u6ce8\u610f: Tomcat 4.x \u3068 Java1.4 \u4e0a\u3067\u306f\u3001CATALINA_HOME/common/lib \u306b\u3001java.* \u3082\u3057\u304f\u306f javax.* \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u542b\u3080\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u914d\u7f6e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002
\u4f8b\u3048\u3070 jaxrpc.jar \u3068 saaj.jar \u306f\u3001\u305d\u306e\u3088\u3046\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002

-noteString=\u6ce8\u610f: \u30da\u30fc\u30b8\u306b\u5168\u3066\u306e\u8abf\u67fb\u7d50\u679c\u304c\u8868\u793a\u3055\u308c\u305f\u3068\u3057\u3066\u3082\u3001\u30c1\u30a7\u30c3\u30af\u3067\u304d\u306a\u3044\u69cb\u6210\u30aa\u30d7\u30b7\u30e7\u30f3\u3082\u591a\u3044\u305f\u3081\u3001\u3042\u306a\u305f\u306eWeb\u30b5\u30fc\u30d3\u30b9\u304c\u6b63\u5e38\u306b\u6a5f\u80fd\u3059\u308b\u4fdd\u969c\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3053\u308c\u3089\u306e\u30c6\u30b9\u30c8\u306f\u5fc5\u8981\u306a\u3082\u306e\u3067\u3059\u304c\u3001\u5341\u5206\u306a\u3082\u306e\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 - -### Examining Application Server ### -# -apsExamining=\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\uff65\u30b5\u30fc\u30d0\u30fc\u306b\u95a2\u3059\u308b\u8abf\u67fb -recommendedParser=Axis\u3067\u4f7f\u7528\u3059\u308bXML\u30d1\u30fc\u30b5\u30fc\u306b\u306f Crimson \u3067\u306f\u306a\u304f\u3001Xerces 2 \u3092\u63a8\u5968\u3057\u3066\u3044\u307e\u3059\u3002 -couldNotCreateParser=XML Parser\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002 - -### Examining System Properties ### -# -sysExamining=\u30b7\u30b9\u30c6\u30e0\uff65\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u95a2\u3059\u308b\u8abf\u67fb -sysPropError=\u30b7\u30b9\u30c6\u30e0\uff65\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093\u3002

- -classFoundError=\u4e0d\u660e\u306a\u5834\u6240 -apsPlatform=\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0 - -# -#################### [happyaxis.jsp] ####################### diff --git a/services/additions/WEB-INF/classes/log4j.properties b/services/additions/WEB-INF/classes/log4j.properties deleted file mode 100644 index 3ca86f404..000000000 --- a/services/additions/WEB-INF/classes/log4j.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Set root category priority to INFO and its only appender to CONSOLE. -log4j.rootCategory=INFO, CONSOLE -#log4j.rootCategory=INFO, CONSOLE, LOGFILE - -# Set the enterprise logger category to FATAL and its only appender to CONSOLE. -log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE - -# CONSOLE is set to be a ConsoleAppender using a PatternLayout. -log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender -log4j.appender.CONSOLE.Threshold=INFO -log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout -log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n - -# LOGFILE is set to be a File appender using a PatternLayout. -log4j.appender.LOGFILE=org.apache.log4j.FileAppender -log4j.appender.LOGFILE.File=axis.log -log4j.appender.LOGFILE.Append=true -log4j.appender.LOGFILE.Threshold=INFO -log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout -log4j.appender.LOGFILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n diff --git a/services/additions/admin/axis/SOAPMonitorApplet.java b/services/additions/admin/axis/SOAPMonitorApplet.java deleted file mode 100644 index 08b0ce1cd..000000000 --- a/services/additions/admin/axis/SOAPMonitorApplet.java +++ /dev/null @@ -1,1482 +0,0 @@ -/* - * Copyright 2001,2004 The Apache Software Foundation. - * - * 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. - */ - -import java.awt.*; -import java.awt.event.*; -import java.io.*; -import java.net.*; -import java.text.*; -import java.util.*; -import javax.swing.*; -import javax.swing.border.*; -import javax.swing.event.*; -import javax.swing.table.*; - -import org.apache.axis.monitor.SOAPMonitorConstants; - -/** - * This is a SOAP Mointor Applet class. This class provides - * the user interface for displaying data from the SOAP - * monitor service. - * - * @author Brian Price (pricebe@us.ibm.com) - * - */ -public class SOAPMonitorApplet extends JApplet { - - /** - * Private data - */ - private JPanel main_panel = null; - private JTabbedPane tabbed_pane = null; - private int port = 0; - private Vector pages = null; - - /** - * Constructor - */ - public SOAPMonitorApplet() { - } - - /** - * Applet initialization - */ - public void init() { - // Get the port to be used - String port_str = getParameter("port"); - if (port_str != null) { - port = Integer.parseInt(port_str); - } - // Try to use the system look and feel - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (Exception e){ - } - // Create main panel to hold notebook - main_panel = new JPanel(); - main_panel.setBackground(Color.white); - main_panel.setLayout(new BorderLayout()); - setContentPane(main_panel); - // Create the notebook - tabbed_pane = new JTabbedPane(JTabbedPane.TOP); - main_panel.add(tabbed_pane,BorderLayout.CENTER); - // Add notebook page for default host connection - pages = new Vector(); - addPage(new SOAPMonitorPage(getCodeBase().getHost())); - } - - /** - * Add a page to the notebook - */ - private void addPage(SOAPMonitorPage pg) { - tabbed_pane.addTab(" "+pg.getHost()+" ", pg); - pages.addElement(pg); - } - - /** - * Applet is being displayed - */ - public void start() { - // Tell all pages to start talking to the server - Enumeration e = pages.elements(); - while (e.hasMoreElements()) { - SOAPMonitorPage pg = (SOAPMonitorPage) e.nextElement(); - if (pg != null) { - pg.start(); - } - } - } - - /* - * Applet is no longer displayed - */ - public void stop() { - // Tell all pages to stop talking to the server - Enumeration e = pages.elements(); - while (e.hasMoreElements()) { - SOAPMonitorPage pg = (SOAPMonitorPage) e.nextElement(); - if (pg != null) { - pg.stop(); - } - } - } - - /** - * Applet cleanup - */ - public void destroy() { - tabbed_pane = null; - main_panel = null; - } - - /** - * This class provides the contents of a notebook page - * representing a server connection. - */ - class SOAPMonitorPage extends JPanel - implements Runnable, - ListSelectionListener, - ActionListener { - - /** - * Status Strings - */ - private final String STATUS_ACTIVE = "The SOAP Monitor is started."; - private final String STATUS_STOPPED = "The SOAP Monitor is stopped."; - private final String STATUS_CLOSED = "The server communication has been terminated."; - private final String STATUS_NOCONNECT = "The SOAP Monitor is unable to communcate with the server."; - - /** - * Private data - */ - private String host = null; - private Socket socket = null; - private ObjectInputStream in = null; - private ObjectOutputStream out = null; - private SOAPMonitorTableModel model = null; - private JTable table = null; - private JScrollPane scroll = null; - private JPanel list_panel = null; - private JPanel list_buttons = null; - private JButton remove_button = null; - private JButton remove_all_button = null; - private JButton filter_button = null; - private JPanel details_panel = null; - private JPanel details_header = null; - private JSplitPane details_soap = null; - private JPanel details_buttons = null; - private JLabel details_time = null; - private JLabel details_target = null; - private JLabel details_status = null; - private JLabel details_time_value = null; - private JLabel details_target_value = null; - private JLabel details_status_value = null; - private EmptyBorder empty_border = null; - private EtchedBorder etched_border = null; - private JPanel request_panel = null; - private JPanel response_panel = null; - private JLabel request_label = null; - private JLabel response_label = null; - private SOAPMonitorTextArea request_text = null; - private SOAPMonitorTextArea response_text = null; - private JScrollPane request_scroll = null; - private JScrollPane response_scroll = null; - private JButton layout_button = null; - private JSplitPane split = null; - private JPanel status_area = null; - private JPanel status_buttons = null; - private JButton start_button = null; - private JButton stop_button = null; - private JLabel status_text = null; - private JPanel status_text_panel = null; - private SOAPMonitorFilter filter = null; - private GridBagLayout details_header_layout = null; - private GridBagConstraints details_header_constraints = null; - private JCheckBox reflow_xml = null; - - /** - * Constructor (create and layout page) - */ - public SOAPMonitorPage(String host_name) { - host = host_name; - // Set up default filter (show all messages) - filter = new SOAPMonitorFilter(); - // Use borders to help improve appearance - etched_border = new EtchedBorder(); - // Build top portion of split (list panel) - model = new SOAPMonitorTableModel(); - table = new JTable(model); - table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - table.setRowSelectionInterval(0,0); - table.setPreferredScrollableViewportSize(new Dimension(600, 96)); - table.getSelectionModel().addListSelectionListener(this); - scroll = new JScrollPane(table); - remove_button = new JButton("Remove"); - remove_button.addActionListener(this); - remove_button.setEnabled(false); - remove_all_button = new JButton("Remove All"); - remove_all_button.addActionListener(this); - filter_button = new JButton("Filter ..."); - filter_button.addActionListener(this); - list_buttons = new JPanel(); - list_buttons.setLayout(new FlowLayout()); - list_buttons.add(remove_button); - list_buttons.add(remove_all_button); - list_buttons.add(filter_button); - list_panel = new JPanel(); - list_panel.setLayout(new BorderLayout()); - list_panel.add(scroll,BorderLayout.CENTER); - list_panel.add(list_buttons, BorderLayout.SOUTH); - list_panel.setBorder(empty_border); - // Build bottom portion of split (message details) - details_time = new JLabel("Time: ", SwingConstants.RIGHT); - details_target = new JLabel("Target Service: ", SwingConstants.RIGHT); - details_status = new JLabel("Status: ", SwingConstants.RIGHT); - details_time_value = new JLabel(); - details_target_value = new JLabel(); - details_status_value = new JLabel(); - Dimension preferred_size = details_time.getPreferredSize(); - preferred_size.width = 1; - details_time.setPreferredSize(preferred_size); - details_target.setPreferredSize(preferred_size); - details_status.setPreferredSize(preferred_size); - details_time_value.setPreferredSize(preferred_size); - details_target_value.setPreferredSize(preferred_size); - details_status_value.setPreferredSize(preferred_size); - details_header = new JPanel(); - details_header_layout = new GridBagLayout(); - details_header.setLayout(details_header_layout); - details_header_constraints = new GridBagConstraints(); - details_header_constraints.fill=GridBagConstraints.BOTH; - details_header_constraints.weightx=0.5; - details_header_layout.setConstraints(details_time,details_header_constraints); - details_header.add(details_time); - details_header_layout.setConstraints(details_time_value,details_header_constraints); - details_header.add(details_time_value); - details_header_layout.setConstraints(details_target,details_header_constraints); - details_header.add(details_target); - details_header_constraints.weightx=1.0; - details_header_layout.setConstraints(details_target_value,details_header_constraints); - details_header.add(details_target_value); - details_header_constraints.weightx=.5; - details_header_layout.setConstraints(details_status,details_header_constraints); - details_header.add(details_status); - details_header_layout.setConstraints(details_status_value,details_header_constraints); - details_header.add(details_status_value); - details_header.setBorder(etched_border); - request_label = new JLabel("SOAP Request", SwingConstants.CENTER); - request_text = new SOAPMonitorTextArea(); - request_text.setEditable(false); - request_scroll = new JScrollPane(request_text); - request_panel = new JPanel(); - request_panel.setLayout(new BorderLayout()); - request_panel.add(request_label, BorderLayout.NORTH); - request_panel.add(request_scroll, BorderLayout.CENTER); - response_label = new JLabel("SOAP Response", SwingConstants.CENTER); - response_text = new SOAPMonitorTextArea(); - response_text.setEditable(false); - response_scroll = new JScrollPane(response_text); - response_panel = new JPanel(); - response_panel.setLayout(new BorderLayout()); - response_panel.add(response_label, BorderLayout.NORTH); - response_panel.add(response_scroll, BorderLayout.CENTER); - details_soap = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); - details_soap.setTopComponent(request_panel); - details_soap.setRightComponent(response_panel); - details_soap.setResizeWeight(.5); - details_panel = new JPanel(); - layout_button = new JButton("Switch Layout"); - layout_button.addActionListener(this); - reflow_xml = new JCheckBox("Reflow XML text"); - reflow_xml.addActionListener(this); - details_buttons = new JPanel(); - details_buttons.setLayout(new FlowLayout()); - details_buttons.add(reflow_xml); - details_buttons.add(layout_button); - details_panel.setLayout(new BorderLayout()); - details_panel.add(details_header,BorderLayout.NORTH); - details_panel.add(details_soap,BorderLayout.CENTER); - details_panel.add(details_buttons,BorderLayout.SOUTH); - details_panel.setBorder(empty_border); - // Add the two parts to the age split pane - split = new JSplitPane(JSplitPane.VERTICAL_SPLIT); - split.setTopComponent(list_panel); - split.setRightComponent(details_panel); - // Build status area - start_button = new JButton("Start"); - start_button.addActionListener(this); - stop_button = new JButton("Stop"); - stop_button.addActionListener(this); - status_buttons = new JPanel(); - status_buttons.setLayout(new FlowLayout()); - status_buttons.add(start_button); - status_buttons.add(stop_button); - status_text = new JLabel(); - status_text.setBorder(new BevelBorder(BevelBorder.LOWERED)); - status_text_panel = new JPanel(); - status_text_panel.setLayout(new BorderLayout()); - status_text_panel.add(status_text, BorderLayout.CENTER); - status_text_panel.setBorder(empty_border); - status_area = new JPanel(); - status_area.setLayout(new BorderLayout()); - status_area.add(status_buttons, BorderLayout.WEST); - status_area.add(status_text_panel, BorderLayout.CENTER); - status_area.setBorder(etched_border); - // Add the split and status area to page - setLayout(new BorderLayout()); - add(split, BorderLayout.CENTER); - add(status_area, BorderLayout.SOUTH); - } - - /** - * Get the name of the host we are displaying - */ - public String getHost() { - return host; - } - - /** - * Set the status text - */ - public void setStatus(String txt) { - status_text.setForeground(Color.black); - status_text.setText(" "+txt); - } - - /** - * Set the status text to an error - */ - public void setErrorStatus(String txt) { - status_text.setForeground(Color.red); - status_text.setText(" "+txt); - } - - /** - * Start talking to the server - */ - public void start() { - String codehost = getCodeBase().getHost(); - if (socket == null) { - try { - // Open the socket to the server - socket = new Socket(codehost, port); - // Create output stream - out = new ObjectOutputStream(socket.getOutputStream()); - out.flush(); - // Create input stream and start background - // thread to read data from the server - in = new ObjectInputStream(socket.getInputStream()); - new Thread(this).start(); - } catch (Exception e) { - // Exceptions here are unexpected, but we can't - // really do anything (so just write it to stdout - // in case someone cares and then ignore it) - System.out.println("Exception! "+e.toString()); - e.printStackTrace(); - setErrorStatus(STATUS_NOCONNECT); - socket = null; - } - } else { - // Already started - } - if (socket != null) { - // Make sure the right buttons are enabled - start_button.setEnabled(false); - stop_button.setEnabled(true); - setStatus(STATUS_ACTIVE); - } - } - - /** - * Stop talking to the server - */ - public void stop() { - if (socket != null) { - // Close all the streams and socket - if (out != null) { - try { - out.close(); - } catch (IOException ioe) { - } - out = null; - } - if (in != null) { - try { - in.close(); - } catch (IOException ioe) { - } - in = null; - } - if (socket != null) { - try { - socket.close(); - } catch (IOException ioe) { - } - socket = null; - } - } else { - // Already stopped - } - // Make sure the right buttons are enabled - start_button.setEnabled(true); - stop_button.setEnabled(false); - setStatus(STATUS_STOPPED); - } - - /** - * Background thread used to receive data from - * the server. - */ - public void run() { - Long id; - Integer message_type; - String target; - String soap; - SOAPMonitorData data; - int selected; - int row; - boolean update_needed; - while (socket != null) { - try { - // Get the data from the server - message_type = (Integer) in.readObject(); - // Process the data depending on its type - switch (message_type.intValue()) { - case SOAPMonitorConstants.SOAP_MONITOR_REQUEST: - // Get the id, target and soap info - id = (Long) in.readObject(); - target = (String) in.readObject(); - soap = (String) in.readObject(); - // Add new request data to the table - data = new SOAPMonitorData(id,target,soap); - model.addData(data); - // If "most recent" selected then update - // the details area if needed - selected = table.getSelectedRow(); - if ((selected == 0) && model.filterMatch(data)) { - valueChanged(null); - } - break; - case SOAPMonitorConstants.SOAP_MONITOR_RESPONSE: - // Get the id and soap info - id = (Long) in.readObject(); - soap = (String) in.readObject(); - data = model.findData(id); - if (data != null) { - update_needed = false; - // Get the selected row - selected = table.getSelectedRow(); - // If "most recent", then always - // update details area - if (selected == 0) { - update_needed = true; - } - // If the data being updated is - // selected then update details - row = model.findRow(data); - if ((row != -1) && (row == selected)) { - update_needed = true; - } - // Set the response and update table - data.setSOAPResponse(soap); - model.updateData(data); - // Refresh details area (if needed) - if (update_needed) { - valueChanged(null); - } - } - break; - } - - } catch (Exception e) { - // Exceptions are expected here when the - // server communication has been terminated. - if (stop_button.isEnabled()) { - stop(); - setErrorStatus(STATUS_CLOSED); - } - } - } - } - - /** - * Listener to handle table selection changes - */ - public void valueChanged(ListSelectionEvent e) { - int row = table.getSelectedRow(); - // Check if they selected a specific row - if (row > 0) { - remove_button.setEnabled(true); - } else { - remove_button.setEnabled(false); - } - // Check for "most recent" selection - if (row == 0) { - row = model.getRowCount() - 1; - if (row == 0) { - row = -1; - } - } - if (row == -1) { - // Clear the details panel - details_time_value.setText(""); - details_target_value.setText(""); - details_status_value.setText(""); - request_text.setText(""); - response_text.setText(""); - } else { - // Show the details for the row - SOAPMonitorData soap = model.getData(row); - details_time_value.setText(soap.getTime()); - details_target_value.setText(soap.getTargetService()); - details_status_value.setText(soap.getStatus()); - if (soap.getSOAPRequest() == null) { - request_text.setText(""); - } else { - request_text.setText(soap.getSOAPRequest()); - request_text.setCaretPosition(0); - } - if (soap.getSOAPResponse() == null) { - response_text.setText(""); - } else { - response_text.setText(soap.getSOAPResponse()); - response_text.setCaretPosition(0); - } - } - } - - /** - * Listener to handle button actions - */ - public void actionPerformed(ActionEvent e) { - // Check if the user pressed the remove button - if (e.getSource() == remove_button) { - int row = table.getSelectedRow(); - model.removeRow(row); - table.clearSelection(); - table.repaint(); - valueChanged(null); - } - // Check if the user pressed the remove all button - if (e.getSource() == remove_all_button) { - model.clearAll(); - table.setRowSelectionInterval(0,0); - table.repaint(); - valueChanged(null); - } - // Check if the user pressed the filter button - if (e.getSource() == filter_button) { - filter.showDialog(); - if (filter.okPressed()) { - // Update the display with new filter - model.setFilter(filter); - table.repaint(); - } - } - // Check if the user pressed the start button - if (e.getSource() == start_button) { - start(); - } - // Check if the user pressed the stop button - if (e.getSource() == stop_button) { - stop(); - } - // Check if the user wants to switch layout - if (e.getSource() == layout_button) { - details_panel.remove(details_soap); - details_soap.removeAll(); - if (details_soap.getOrientation() == JSplitPane.HORIZONTAL_SPLIT) { - details_soap = new JSplitPane(JSplitPane.VERTICAL_SPLIT); - } else { - details_soap = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); - } - details_soap.setTopComponent(request_panel); - details_soap.setRightComponent(response_panel); - details_soap.setResizeWeight(.5); - details_panel.add(details_soap, BorderLayout.CENTER); - details_panel.validate(); - details_panel.repaint(); - } - // Check if the user is changing the reflow option - if (e.getSource() == reflow_xml) { - request_text.setReflowXML(reflow_xml.isSelected()); - response_text.setReflowXML(reflow_xml.isSelected()); - } - } - } - - /** - * This class represend the data for a SOAP request/response pair - */ - class SOAPMonitorData { - - /** - * Private data - */ - private Long id; - private String time; - private String target; - private String soap_request; - private String soap_response; - - /** - * Constructor - */ - public SOAPMonitorData(Long id, String target, String soap_request) { - this.id = id; - // A null id is used to signal that the "most recent" entry - // is being created. - if (id == null) { - this.time = "Most Recent"; - this.target = "---"; - this.soap_request = null; - this.soap_response = null; - } else { - this.time = DateFormat.getTimeInstance().format(new Date()); - this.target = target; - this.soap_request = soap_request; - this.soap_response = null; - } - } - - /** - * Get the id for the SOAP message - */ - public Long getId() { - return id; - } - - /** - * Get the time the SOAP request was received by the applet - */ - public String getTime() { - return time; - } - - /** - * Get the SOAP request target service name - */ - public String getTargetService() { - return target; - } - - /** - * Get the status of the request - */ - public String getStatus() { - String status = "---"; - if (id != null) { - status = "Complete"; - if (soap_response == null) { - status = "Active"; - } - } - return status; - } - - /** - * Get the request SOAP contents - */ - public String getSOAPRequest() { - return soap_request; - } - - /** - * Set the resposne SOAP contents - */ - public void setSOAPResponse(String response) { - soap_response = response; - } - - /** - * Get the response SOAP contents - */ - public String getSOAPResponse() { - return soap_response; - } - } - - /** - * This table model is used to manage the table displayed - * at the top of the page to show all the SOAP messages - * we have received and to control which message details are - * to be displayed on the bottom of the page. - */ - class SOAPMonitorTableModel extends AbstractTableModel { - - /** - * Column titles - */ - private final String[] column_names = { "Time", - "Target Service", - "Status" }; - /** - * Private data - */ - private Vector data; - private Vector filter_include; - private Vector filter_exclude; - private boolean filter_active; - private boolean filter_complete; - private Vector filter_data; - - /** - * Constructor - */ - public SOAPMonitorTableModel() { - data = new Vector(); - // Add "most recent" entry to top of table - SOAPMonitorData soap = new SOAPMonitorData(null,null,null); - data.addElement(soap); - filter_include = null; - filter_exclude = null; - filter_active = false; - filter_complete = false; - filter_data = null; - // By default, exclude NotificationService and - // EventViewerService messages - filter_exclude = new Vector(); - filter_exclude.addElement("NotificationService"); - filter_exclude.addElement("EventViewerService"); - filter_data = new Vector(); - filter_data.addElement(soap); - } - - /** - * Get column count (part of table model interface) - */ - public int getColumnCount() { - return column_names.length; - } - - /** - * Get row count (part of table model interface) - */ - public int getRowCount() { - int count = data.size(); - if (filter_data != null) { - count = filter_data.size(); - } - return count; - } - - /** - * Get column name (part of table model interface) - */ - public String getColumnName(int col) { - return column_names[col]; - } - - /** - * Get value at (part of table model interface) - */ - public Object getValueAt(int row, int col) { - SOAPMonitorData soap; - String value = null; - soap = (SOAPMonitorData) data.elementAt(row); - if (filter_data != null) { - soap = (SOAPMonitorData) filter_data.elementAt(row); - } - switch (col) { - case 0: - value = soap.getTime(); - break; - case 1: - value = soap.getTargetService(); - break; - case 2: - value = soap.getStatus(); - break; - } - return value; - } - - /** - * Check if soap data matches filter - */ - public boolean filterMatch(SOAPMonitorData soap) { - boolean match = true; - if (filter_include != null) { - // Check for service match - Enumeration e = filter_include.elements(); - match = false; - while (e.hasMoreElements() && !match) { - String service = (String) e.nextElement(); - if (service.equals(soap.getTargetService())) { - match = true; - } - } - } - if (filter_exclude != null) { - // Check for service match - Enumeration e = filter_exclude.elements(); - while (e.hasMoreElements() && match) { - String service = (String) e.nextElement(); - if (service.equals(soap.getTargetService())) { - match = false; - } - } - } - if (filter_active) { - // Check for active status match - if (soap.getSOAPResponse() != null) { - match = false; - } - } - if (filter_complete) { - // Check for complete status match - if (soap.getSOAPResponse() == null) { - match = false; - } - } - // The "most recent" is always a match - if (soap.getId() == null) { - match = true; - } - return match; - } - - /** - * Add data to the table as a new row - */ - public void addData(SOAPMonitorData soap) { - int row = data.size(); - data.addElement(soap); - if (filter_data != null) { - if (filterMatch(soap)) { - row = filter_data.size(); - filter_data.addElement(soap); - fireTableRowsInserted(row,row); - } - } else { - fireTableRowsInserted(row,row); - } - } - - /** - * Find the data for a given id - */ - public SOAPMonitorData findData(Long id) { - SOAPMonitorData soap = null; - for (int row=data.size(); (row > 0) && (soap == null); row--) { - soap = (SOAPMonitorData) data.elementAt(row-1); - if (soap.getId().longValue() != id.longValue()) { - soap = null; - } - } - return soap; - } - - /** - * Find the row in the table for a given message id - */ - public int findRow(SOAPMonitorData soap) { - int row = -1; - if (filter_data != null) { - row = filter_data.indexOf(soap); - } else { - row = data.indexOf(soap); - } - return row; - } - - /** - * Remove all messages from the table (but leave "most recent") - */ - public void clearAll() { - int last_row = data.size() - 1; - if (last_row > 0) { - data.removeAllElements(); - SOAPMonitorData soap = new SOAPMonitorData(null,null,null); - data.addElement(soap); - if (filter_data != null) { - filter_data.removeAllElements(); - filter_data.addElement(soap); - } - fireTableDataChanged(); - } - } - - /** - * Remove a message from the table - */ - public void removeRow(int row) { - SOAPMonitorData soap = null; - if (filter_data == null) { - soap = (SOAPMonitorData) data.elementAt(row); - data.remove(soap); - } else { - soap = (SOAPMonitorData) filter_data.elementAt(row); - filter_data.remove(soap); - data.remove(soap); - } - fireTableRowsDeleted(row,row); - } - - /** - * Set a new filter - */ - public void setFilter(SOAPMonitorFilter filter) { - // Save new filter criteria - filter_include = filter.getFilterIncludeList(); - filter_exclude = filter.getFilterExcludeList(); - filter_active = filter.getFilterActive(); - filter_complete = filter.getFilterComplete(); - applyFilter(); - } - - /** - * Refilter the list of messages - */ - public void applyFilter() { - // Re-filter using new criteria - filter_data = null; - if ((filter_include != null) || - (filter_exclude != null) || - filter_active || filter_complete ) { - filter_data = new Vector(); - Enumeration e = data.elements(); - SOAPMonitorData soap; - while (e.hasMoreElements()) { - soap = (SOAPMonitorData) e.nextElement(); - if (filterMatch(soap)) { - filter_data.addElement(soap); - } - } - } - fireTableDataChanged(); - } - - /** - * Get the data for a row - */ - public SOAPMonitorData getData(int row) { - SOAPMonitorData soap = null; - if (filter_data == null) { - soap = (SOAPMonitorData) data.elementAt(row); - } else { - soap = (SOAPMonitorData) filter_data.elementAt(row); - } - return soap; - } - - /** - * Update a message - */ - public void updateData (SOAPMonitorData soap) { - int row; - if (filter_data == null) { - // No filter, so just fire table updated - row = data.indexOf(soap); - if (row != -1) { - fireTableRowsUpdated(row,row); - } - } else { - // Check if the row was being displayed - row = filter_data.indexOf(soap); - if (row == -1) { - // Row was not displayed, so check for if it - // now needs to be displayed - if (filterMatch(soap)) { - int index = -1; - row = data.indexOf(soap) + 1; - while ((row < data.size()) && (index == -1)) { - index = filter_data.indexOf(data.elementAt(row)); - if (index != -1) { - // Insert at this location - filter_data.add(index,soap); - } - row++; - } - if (index == -1) { - // Insert at end - index = filter_data.size(); - filter_data.addElement(soap); - } - fireTableRowsInserted(index,index); - } - } else { - // Row was displayed, so check if it needs to - // be updated or removed - if (filterMatch(soap)) { - fireTableRowsUpdated(row,row); - } else { - filter_data.remove(soap); - fireTableRowsDeleted(row,row); - } - } - } - } - - } - - /** - * Panel with checkbox and list - */ - class ServiceFilterPanel extends JPanel - implements ActionListener, - ListSelectionListener, - DocumentListener { - - private JCheckBox service_box = null; - private Vector filter_list = null; - private Vector service_data = null; - private JList service_list = null; - private JScrollPane service_scroll = null; - private JButton remove_service_button = null; - private JPanel remove_service_panel = null; - private EmptyBorder indent_border = null; - private EmptyBorder empty_border = null; - private JPanel service_area = null; - private JPanel add_service_area = null; - private JTextField add_service_field = null; - private JButton add_service_button = null; - private JPanel add_service_panel = null; - - /** - * Constructor - */ - public ServiceFilterPanel(String text, Vector list) { - empty_border = new EmptyBorder(5,5,0,5); - indent_border = new EmptyBorder(5,25,5,5); - service_box = new JCheckBox(text); - service_box.addActionListener(this); - service_data = new Vector(); - if (list != null) { - service_box.setSelected(true); - service_data = (Vector) list.clone(); - } - service_list = new JList(service_data); - service_list.setBorder(new EtchedBorder()); - service_list.setVisibleRowCount(5); - service_list.addListSelectionListener(this); - service_list.setEnabled(service_box.isSelected()); - service_scroll = new JScrollPane(service_list); - service_scroll.setBorder(new EtchedBorder()); - remove_service_button = new JButton("Remove"); - remove_service_button.addActionListener(this); - remove_service_button.setEnabled(false); - remove_service_panel = new JPanel(); - remove_service_panel.setLayout(new FlowLayout()); - remove_service_panel.add(remove_service_button); - service_area = new JPanel(); - service_area.setLayout(new BorderLayout()); - service_area.add(service_scroll, BorderLayout.CENTER); - service_area.add(remove_service_panel, BorderLayout.EAST); - service_area.setBorder(indent_border); - add_service_field = new JTextField(); - add_service_field.addActionListener(this); - add_service_field.getDocument().addDocumentListener(this); - add_service_field.setEnabled(service_box.isSelected()); - add_service_button = new JButton("Add"); - add_service_button.addActionListener(this); - add_service_button.setEnabled(false); - add_service_panel = new JPanel(); - add_service_panel.setLayout(new BorderLayout()); - JPanel dummy = new JPanel(); - dummy.setBorder(empty_border); - add_service_panel.add(dummy, BorderLayout.WEST); - add_service_panel.add(add_service_button, BorderLayout.EAST); - add_service_area = new JPanel(); - add_service_area.setLayout(new BorderLayout()); - add_service_area.add(add_service_field, BorderLayout.CENTER); - add_service_area.add(add_service_panel, BorderLayout.EAST); - add_service_area.setBorder(indent_border); - setLayout(new BorderLayout()); - add(service_box, BorderLayout.NORTH); - add(service_area, BorderLayout.CENTER); - add(add_service_area, BorderLayout.SOUTH); - setBorder(empty_border); - } - - /** - * Get the current list of services - */ - public Vector getServiceList() { - Vector list = null; - if (service_box.isSelected()) { - list = service_data; - } - return list; - } - - /** - * Listener to handle button actions - */ - public void actionPerformed(ActionEvent e) { - // Check if the user changed the service filter option - if (e.getSource() == service_box) { - service_list.setEnabled(service_box.isSelected()); - service_list.clearSelection(); - remove_service_button.setEnabled(false); - add_service_field.setEnabled(service_box.isSelected()); - add_service_field.setText(""); - add_service_button.setEnabled(false); - } - // Check if the user pressed the add service button - if ((e.getSource() == add_service_button) || - (e.getSource() == add_service_field)) { - String text = add_service_field.getText(); - if ((text != null) && (text.length() > 0)) { - service_data.addElement(text); - service_list.setListData(service_data); - } - add_service_field.setText(""); - add_service_field.requestFocus(); - } - // Check if the user pressed the remove service button - if (e.getSource() == remove_service_button) { - Object[] sels = service_list.getSelectedValues(); - for (int i=0; i 0)) { - add_service_button.setEnabled(true); - } else { - add_service_button.setEnabled(false); - } - } - - /** - * Handle changes to the text field - */ - public void insertUpdate(DocumentEvent e) { - changedUpdate(e); - } - - /** - * Handle changes to the text field - */ - public void removeUpdate(DocumentEvent e) { - changedUpdate(e); - } - - /** - * Listener to handle service list selection changes - */ - public void valueChanged(ListSelectionEvent e) { - if (service_list.getSelectedIndex() == -1) { - remove_service_button.setEnabled(false); - } else { - remove_service_button.setEnabled(true); - } - } - } - - /** - * Class for showing the filter dialog - */ - class SOAPMonitorFilter implements ActionListener { - - /** - * Private data - */ - private JDialog dialog = null; - private JPanel panel = null; - private JPanel buttons = null; - private JButton ok_button = null; - private JButton cancel_button = null; - private ServiceFilterPanel include_panel = null; - private ServiceFilterPanel exclude_panel = null; - private JPanel status_panel = null; - private JCheckBox status_box = null; - private EmptyBorder empty_border = null; - private EmptyBorder indent_border = null; - private JPanel status_options = null; - private ButtonGroup status_group = null; - private JRadioButton status_active = null; - private JRadioButton status_complete = null; - private Vector filter_include_list = null; - private Vector filter_exclude_list = null; - private boolean filter_active = false; - private boolean filter_complete = false; - private boolean ok_pressed = false; - - /** - * Constructor - */ - public SOAPMonitorFilter() { - // By default, exclude NotificationService and - // EventViewerService messages - filter_exclude_list = new Vector(); - filter_exclude_list.addElement("NotificationService"); - filter_exclude_list.addElement("EventViewerService"); - } - - /** - * Get list of services to be included - */ - public Vector getFilterIncludeList() { - return filter_include_list; - } - - /** - * Get list of services to be excluded - */ - public Vector getFilterExcludeList() { - return filter_exclude_list; - } - - /** - * Check if filter active messages - */ - public boolean getFilterActive() { - return filter_active; - } - - /** - * Check if filter complete messages - */ - public boolean getFilterComplete() { - return filter_complete; - } - - /** - * Show the filter dialog - */ - public void showDialog() { - empty_border = new EmptyBorder(5,5,0,5); - indent_border = new EmptyBorder(5,25,5,5); - include_panel = new ServiceFilterPanel("Include messages based on target service:", - filter_include_list); - exclude_panel = new ServiceFilterPanel("Exclude messages based on target service:", - filter_exclude_list); - status_box = new JCheckBox("Filter messages based on status:"); - status_box.addActionListener(this); - status_active = new JRadioButton("Active messages only"); - status_active.setSelected(true); - status_active.setEnabled(false); - status_complete = new JRadioButton("Complete messages only"); - status_complete.setEnabled(false); - status_group = new ButtonGroup(); - status_group.add(status_active); - status_group.add(status_complete); - if (filter_active || filter_complete) { - status_box.setSelected(true); - status_active.setEnabled(true); - status_complete.setEnabled(true); - if (filter_complete) { - status_complete.setSelected(true); - } - } - status_options = new JPanel(); - status_options.setLayout(new BoxLayout(status_options, BoxLayout.Y_AXIS)); - status_options.add(status_active); - status_options.add(status_complete); - status_options.setBorder(indent_border); - status_panel = new JPanel(); - status_panel.setLayout(new BorderLayout()); - status_panel.add(status_box, BorderLayout.NORTH); - status_panel.add(status_options, BorderLayout.CENTER); - status_panel.setBorder(empty_border); - ok_button = new JButton("Ok"); - ok_button.addActionListener(this); - cancel_button = new JButton("Cancel"); - cancel_button.addActionListener(this); - buttons = new JPanel(); - buttons.setLayout(new FlowLayout()); - buttons.add(ok_button); - buttons.add(cancel_button); - panel = new JPanel(); - panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); - panel.add(include_panel); - panel.add(exclude_panel); - panel.add(status_panel); - panel.add(buttons); - dialog = new JDialog(); - dialog.setTitle("SOAP Monitor Filter"); - dialog.setContentPane(panel); - dialog.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); - dialog.setModal(true); - dialog.pack(); - Dimension d = dialog.getToolkit().getScreenSize(); - dialog.setLocation((d.width-dialog.getWidth())/2, - (d.height-dialog.getHeight())/2); - ok_pressed = false; - dialog.show(); - } - - /** - * Listener to handle button actions - */ - public void actionPerformed(ActionEvent e) { - // Check if the user pressed the ok button - if (e.getSource() == ok_button) { - filter_include_list = include_panel.getServiceList(); - filter_exclude_list = exclude_panel.getServiceList(); - if (status_box.isSelected()) { - filter_active = status_active.isSelected(); - filter_complete = status_complete.isSelected(); - } else { - filter_active = false; - filter_complete = false; - } - ok_pressed = true; - dialog.dispose(); - } - // Check if the user pressed the cancel button - if (e.getSource() == cancel_button) { - dialog.dispose(); - } - // Check if the user changed the status filter option - if (e.getSource() == status_box) { - status_active.setEnabled(status_box.isSelected()); - status_complete.setEnabled(status_box.isSelected()); - } - } - - /** - * Check if the user pressed the ok button - */ - public boolean okPressed() { - return ok_pressed; - } - } - - /** - * Text panel class that supports XML reflow - */ - class SOAPMonitorTextArea extends JTextArea { - - /** - * Private data - */ - private boolean format = false; - private String original = ""; - private String formatted = null; - - /** - * Constructor - */ - public SOAPMonitorTextArea() { - } - - /** - * Override setText to do formatting - */ - public void setText(String text) { - original = text; - formatted = null; - if (format) { - doFormat(); - super.setText(formatted); - } else { - super.setText(original); - } - } - - /** - * Turn reflow on or off - */ - public void setReflowXML(boolean reflow) { - format = reflow; - if (format) { - if (formatted == null) { - doFormat(); - } - super.setText(formatted); - } else { - super.setText(original); - } - } - - /** - * Reflow XML - */ - public void doFormat() { - Vector parts = new Vector(); - char[] chars = original.toCharArray(); - int index = 0; - int first = 0; - String part = null; - while (index < chars.length) { - // Check for start of tag - if (chars[index] == '<') { - // Did we have data before this tag? - if (first < index) { - part = new String(chars,first,index-first); - part = part.trim(); - // Save non-whitespace data - if (part.length() > 0) { - parts.addElement(part); - } - } - // Save the start of tag - first = index; - } - // Check for end of tag - if (chars[index] == '>') { - // Save the tag - part = new String(chars,first,index-first+1); - parts.addElement(part); - first = index+1; - } - // Check for end of line - if ((chars[index] == '\n') || (chars[index] == '\r')) { - // Was there data on this line? - if (first < index) { - part = new String(chars,first,index-first); - part = part.trim(); - // Save non-whitespace data - if (part.length() > 0) { - parts.addElement(part); - } - } - first = index+1; - } - index++; - } - // Reflow as XML - StringBuffer buf = new StringBuffer(); - Object[] list = parts.toArray(); - int indent = 0; - int pad = 0; - index = 0; - while (index < list.length) { - part = (String) list[index]; - if (buf.length() == 0) { - // Just add first tag (should be XML header) - buf.append(part); - } else { - // All other parts need to start on a new line - buf.append('\n'); - // If we're at an end tag then decrease indent - if (part.startsWith("")) { - indent++; - // Check for special data case - if ((index + 2) < list.length) { - part = (String) list[index+2]; - if (part.startsWith(" - - -<%@ page contentType="text/html; charset=utf-8" %> -<% -/* - * Copyright 2005 The Apache Software Foundation. - * - * 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. - */ -%> - -<%@ include file="i18nLib.jsp" %> - -<% - // initialize a private HttpServletRequest - setRequest(request); - - // set a resouce base - setResouceBase("i18n"); -%> - - - - Apache-Axis - - - - -

Apache-AXIS

- -<%= getLocaleChoice() %> - -<% - out.print(getMessage("welcomeMessage")+"

"); - out.print(getMessage("operationType")); -%> - -

- -<% - out.print(getMessage("sideNote") +"

"); -%> - -<% - out.print("

"+ getMessage("validatingAxis") +"

"); - - out.print(getMessage("validationNote00") +"

"); - out.print(getMessage("validationNote01")); -%> - - diff --git a/services/additions/admin/axis/fingerprint.jsp b/services/additions/admin/axis/fingerprint.jsp deleted file mode 100644 index fa122ce83..000000000 --- a/services/additions/admin/axis/fingerprint.jsp +++ /dev/null @@ -1,274 +0,0 @@ -<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - -<%@ page import="java.io.File, - java.io.IOException, - java.util.Date" - session="false" %> - - -System Fingerprint - - -<%! - - /* - * Fingerprint the users system. This is mainly for use in - * diagnosing classpath problems. It is intended to dump out - * a copy of the environment this webapp is running in, - * and additionally attempt to identify versions of each jar - * in the classpath. - * - * @author Brian Ewins - */ - - private java.util.Properties versionProps=new java.util.Properties(); - - /** - * Identify the version of a jar file. This uses a properties file - * containing known names and sizes in the format - * 'name(size)=version'. Version strings should be like 'xerces-1.4' - * ie they should include the name of the library. - */ - public String getFileVersion(File file) throws IOException { - String key=""+file.getName()+""; - key+= ""+file.length()+""; - Date timestamp=new Date(file.lastModified()); - key+= ""+timestamp.toString()+""; - return key; - - /* TODO: implement - String value=versionProps.getProperty(key); - if (value==null) { - // make it possible to have jars without version nos - value=versionProps.getProperty(file.getName()); - } - if (value==null) { - // fall back on something obvious - value=key; - Date timestamp=new Date(file.lastModified()); - value+=" / "+timestamp.toString(); - } - return value; - */ - } - - /** - * Split up a classpath-like variable. Returns a list of files. - * TODO: this can't cope with relative paths. I think theres code in BCEL that - * can be used for this? - */ - File[] splitClasspath(String path) throws IOException { - java.util.StringTokenizer st= - new java.util.StringTokenizer(path, - System.getProperty("path.separator")); - int toks=st.countTokens(); - File[] files=new File[toks]; - for(int i=0;i"); - out.print(title); - out.println(""); - out.println(""); - for (int i=0; i"+getFileVersion(jars[i])+""); - } - out.println("
"); - if(comment!=null && comment.length()>0) { - out.println("

"); - out.println(comment); - out.println("

"); - } - } - -%> -

System Fingerprint

-

JVM and Server Version

- - - - - - - - - - - - - - - - - - - - - - - - - -
Servlet Engine<%= getServletConfig().getServletContext().getServerInfo() %><%= getServletConfig().getServletContext().getMajorVersion() %><%= getServletConfig().getServletContext().getMinorVersion() %>
Java VM<%= System.getProperty("java.vm.vendor") %><%= System.getProperty("java.vm.name") %><%= System.getProperty("java.vm.version") %>
Java RE<%= System.getProperty("java.vendor") %><%= System.getProperty("java.version") %>
Platform<%= System.getProperty("os.name") %><%= System.getProperty("os.arch") %><%= System.getProperty("os.version") %>
- -<% -listClasspathProperty("Boot jars", out,"sun.boot.class.path", "Only valid on a sun jvm"); -listClasspathProperty("System jars", out,"java.class.path", null); -listDirpathProperty("Extra system jars", out,"java.ext.dirs", null); -listContextPath("Webapp jars", out, "/WEB-INF/lib", null); -// identify the container... -String container=getServletConfig().getServletContext().getServerInfo(); -if (container.startsWith("Tomcat Web Server/3.2")) { - String home=System.getProperty("tomcat.home"); - if(home!=null) { - listDirectory("Tomcat 3.2 Common Jars", out, - home+File.separator - +"lib", - null); - } -} else if (container.startsWith("Tomcat Web Server/3.3")) { - String home=System.getProperty("tomcat.home"); - if(home!=null) { - listDirectory("Tomcat 3.3 Container Jars", out, - home+File.separator - +"lib"+File.separator - +"container", - null); - listDirectory("Tomcat 3.3 Common Jars", out, - home+File.separator - +"lib"+File.separator - +"common", - null); - } -} else if (container.startsWith("Apache Tomcat/4.0")) { - //handle catalina common dir - String home=System.getProperty("catalina.home"); - if(home!=null) { - listDirectory("Tomcat 4.0 Common Jars", out, - home+File.separator - +"common"+File.separator - +"lib", - null); - } -} else if (container.startsWith("Apache Tomcat/4.1")) { - //handle catalina common dir - String home=System.getProperty("catalina.home"); - if(home!=null) { - listDirectory("Tomcat 4.1 Common Jars", out, - home+File.separator - +"shared"+File.separator - +"lib", - null); - } -} else if (System.getProperty("resin.home")!=null) { - String home=System.getProperty("resin.home"); - if(home!=null) { - listDirectory("Resin Common Jars", out, - home+File.separator - +"lib", - null); - } -} else if (System.getProperty("weblogic.httpd.servlet.classpath")!=null) { - listClasspathProperty("Weblogic Servlet Jars", out, - "weblogic.httpd.servlet.classpath", - null); -} else { - //TODO: identify more servlet engine classpaths. -} -%> - - \ No newline at end of file diff --git a/services/additions/admin/axis/happyaxis.jsp b/services/additions/admin/axis/happyaxis.jsp deleted file mode 100644 index 1267783d2..000000000 --- a/services/additions/admin/axis/happyaxis.jsp +++ /dev/null @@ -1,493 +0,0 @@ -<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - - -<%@ page contentType="text/html; charset=utf-8" - import="java.io.InputStream, - java.io.IOException, - javax.xml.parsers.SAXParser, - java.lang.reflect.*, - javax.xml.parsers.SAXParserFactory" - session="false" %> -<% -/* - * Copyright 2002,2004,2005 The Apache Software Foundation. - * - * 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. - */ -%> - -<%! - /* - * 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 - */ - - /** - * 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=this.getClass().getResourceAsStream(resource); - found=instream!=null; - if(instream!=null) { - 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 = classExists(classname); - if(clazz == null) { - String url=""; - if(homePage!=null) { - url=getMessage("seeHomepage",homePage,homePage); - } - out.write(getMessage("couldNotFound",category,classname,jarFile,errorText,url)); - return 1; - } else { - String location = getLocation(out, clazz); - - if(location == null) { - out.write("
  • "+getMessage("foundClass00",description,classname)+"

  • "); - } - else { - out.write("
  • "+getMessage("foundClass01",description,classname,location)+"

  • "); - } - return 0; - } - } catch(NoClassDefFoundError ncdfe) { - String url=""; - if(homePage!=null) { - url=getMessage("seeHomepage",homePage,homePage); - } - out.write(getMessage("couldNotFoundDep",category, classname, errorText, url)); - out.write(getMessage("theRootCause",ncdfe.getMessage(), classname)); - 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 = clazz.getProtectionDomain().getCodeSource().getLocation(); - String location = url.toString(); - if(location.startsWith("jar")) { - url = ((java.net.JarURLConnection)url.openConnection()).getJarFileURL(); - location = url.toString(); - } - - if(location.startsWith("file")) { - java.io.File file = new java.io.File(url.getFile()); - return file.getAbsolutePath(); - } else { - return url.toString(); - } - } catch (Throwable t){ - } - return getMessage("classFoundError"); - } - - /** - * 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, - ""+getMessage("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, - ""+getMessage("warning")+"", - classname, - jarFile, - description, - errorText, - homePage); - } - - /** - * get servlet version string - * - */ - - public String getServletVersion() { - ServletContext context=getServletConfig().getServletContext(); - int major = context.getMajorVersion(); - int minor = 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 = getSAXParser(); - if (saxParser == null) { - return getMessage("couldNotCreateParser"); - } - - // check to what is in the classname - String saxParserName = saxParser.getClass().getName(); - return saxParserName; - } - - /** - * Create a JAXP SAXParser - * @return parser or null for trouble - */ - private SAXParser getSAXParser() { - SAXParserFactory saxParserFactory = SAXParserFactory.newInstance(); - if (saxParserFactory == null) { - return null; - } - SAXParser saxParser = null; - try { - saxParser = 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 = getSAXParser(); - if (saxParser == null) { - return null; - } - String location = getLocation(out,saxParser.getClass()); - return location; - } - - /** - * Check if class implements specified interface. - * @param Class clazz - * @param String interface name - * @return boolean - */ - private boolean implementsInterface(Class clazz, String interfaceName) { - if (clazz == null) { - return false; - } - Class[] interfaces = clazz.getInterfaces(); - if (interfaces.length != 0) { - for (int i = 0; i < interfaces.length; i++) { - if (interfaces[i].getName().equals(interfaceName)) { - return true; - } - } - } - return false; - } - %> - -<%@ include file="i18nLib.jsp" %> - -<% - // initialize a private HttpServletRequest - setRequest(request); - - // set a resouce base - setResouceBase("i18n"); -%> - - -<%= getMessage("pageTitle") %> - - - -<% - out.print("

    "+ getMessage("pageTitle") +"

    "); - out.print("

    "+ getMessage("pageRole") +"

    "); -%> - -<%= getLocaleChoice() %> - -<% - out.print("

    "+ getMessage("neededComponents") +"

    "); -%> - - -<% - out.print("

    "+ getMessage("optionalComponents") +"

    "); -%> - -<% - out.write("

    "); - //is everythng we need here - if(needed==0) { - //yes, be happy - out.write(getMessage("happyResult00")); - } else { - //no, be very unhappy - response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); - out.write(getMessage("unhappyResult00",Integer.toString(needed))); - } - //now look at wanted stuff - if(wanted>0) { - out.write(getMessage("unhappyResult01",Integer.toString(wanted))); - } else { - out.write(getMessage("happyResult01")); - } - out.write("

    "); -%> - - -

    <%= getMessage("apsExamining") %>

    - - - -<% if(xmlParser.indexOf("crimson")>=0) { %> -

    - <%= getMessage("recommendedParser") %> -

    -<% } %> - -

    <%= getMessage("sysExamining") %>

    - -
    - <%= getMessage("apsPlatform") %>: - <%= getServletConfig().getServletContext().getServerInfo() %> - - diff --git a/services/additions/admin/axis/i18nLib.jsp b/services/additions/admin/axis/i18nLib.jsp deleted file mode 100644 index 545b69e0f..000000000 --- a/services/additions/admin/axis/i18nLib.jsp +++ /dev/null @@ -1,223 +0,0 @@ -<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> - -<%@ page import="java.util.*" %> -<% -/* - * Copyright 2005 The Apache Software Foundation. - * - * 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. - */ -%> - -<%! - /* - * A library file to produce i18n web applications. This can be easily - * reused from your jsp(s) - just include and call any methods. - * @author toshi - */ - - // private variable - HttpServletRequest _req = null; - - // private variable - String _strResourceName = null; - - /** - * Set a HttpServletRequest to a private variable. - * @param request HttpServletRequest - */ - void setRequest(HttpServletRequest request) { - _req = request; - } - - /** - * Get the private variable of the HttpServletRequest. - * @return HttpServletRequest - */ - HttpServletRequest getRequest() { - return _req; - } - - /** - * Set a resouce base name to a private variable. - * @param resouce The resouce base name - */ - void setResouceBase(String resource) { - _strResourceName = resource; - } - - /** - * Get the private variable of the resouce base name. - * @return resouce The resouce base name - */ - String getResouceBase() { - return _strResourceName; - } - - /** - * Get a ResourceBundle object. - * @return a ResourceBundle object - */ - ResourceBundle getRB() { - String strLocale = getRequest().getParameter("locale"); - ResourceBundle objRb = null; - Locale objLcl = null; - - if (strLocale!=null) { - objLcl=new Locale(strLocale,""); - } else { - objLcl=getRequest().getLocale(); - } - - Locale.setDefault(objLcl); - objRb = ResourceBundle.getBundle(getResouceBase(),objLcl); - - return objRb; - } - - /** - * Get a list of locale choice - * @return a list of supported locales - */ - String getLocaleChoice() { - String choice = getMessage("locales"); - StringBuffer buf = new StringBuffer(); - - buf.append("
    \n"); - buf.append(getMessage("language")); - buf.append(": "); - - StringTokenizer st = new StringTokenizer(choice); - String locale = null; - while (st.hasMoreTokens()) { - locale = st.nextToken(); - buf.append("["+ locale +"] "); - } - buf.append("\n
    \n"); - - return buf.toString(); - } - - /** - * Get a message from i18n.properties with several arguments. - * @param key The resource key - * @return The formatted message - */ - String getMessage(String key) { - return getMessage(key, null, null, null, null, null); - } - - /** - * Get a message from i18n.properties with several arguments. - * @param key The resource key - * @param arg0 The argument to place in variable {0} - * @return The formatted message - */ - String getMessage(String key, String arg0) { - return getMessage(key, arg0, null, null, null, null); - } - - /** - * Get a message from i18n.properties with several arguments. - * @param key The resource key - * @param arg0 The argument to place in variable {0} - * @param arg1 The argument to place in variable {1} - * @return The formatted message - */ - String getMessage(String key, String arg0, String arg1) { - return getMessage(key, arg0, arg1, null, null, null); - } - - /** - * Get a message from i18n.properties with several arguments. - * @param key The resource key - * @param arg0 The argument to place in variable {0} - * @param arg1 The argument to place in variable {1} - * @param arg2 The argument to place in variable {2} - * @return The formatted message - */ - String getMessage(String key, String arg0, String arg1, String arg2) { - return getMessage(key, arg0, arg1, arg2, null, null); - } - - /** - * Get a message from i18n.properties with several arguments. - * @param key The resource key - * @param arg0 The argument to place in variable {0} - * @param arg1 The argument to place in variable {1} - * @param arg2 The argument to place in variable {2} - * @param arg3 The argument to place in variable {3} - * @return The formatted message - */ - String getMessage(String key, String arg0, String arg1, - String arg2, String arg3) { - return getMessage(key, arg0, arg1, arg2, arg3, null); - } - - /** - * Get a message from i18n.properties with several arguments. - * @param key The resource key - * @param arg0 The argument to place in variable {0} - * @param arg1 The argument to place in variable {1} - * @param arg2 The argument to place in variable {2} - * @param arg3 The argument to place in variable {3} - * @param arg4 The argument to place in variable {4} - * @return The formatted message - */ - String getMessage(String key, String arg0, String arg1, - String arg2, String arg3, String arg4) { - String strPattern = getRB().getString(key); - - String [] params = { arg0, arg1, arg2, arg3, arg4 }; - for (int i=0; i<5; i++) { - if (params[i]!=null) params[i]=replaceAll(params[i],"%20"," "); - } - - if (arg0!=null) strPattern = replaceAll(strPattern,"{0}",params[0]); - if (arg1!=null) strPattern = replaceAll(strPattern,"{1}",params[1]); - if (arg2!=null) strPattern = replaceAll(strPattern,"{2}",params[2]); - if (arg3!=null) strPattern = replaceAll(strPattern,"{3}",params[3]); - if (arg4!=null) strPattern = replaceAll(strPattern,"{4}",params[4]); - - return strPattern; - } - - /** - * Get a replaced string by the specified message. - * @param source The original message - * @param pattern The key message for replacing - * @param replace The message to place in the key variable - 'pattern' - * @return The replaced message - */ - String replaceAll(String source, String pattern, String replace) - { - int i=0; - boolean ret = false; - StringBuffer buf = new StringBuffer(); - - int lenSource = source.length(); - int lenPattern = pattern.length(); - - for (i=0; i \ No newline at end of file diff --git a/services/build.xml b/services/build.xml deleted file mode 100644 index f70ea310e..000000000 --- a/services/build.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Compile webservices - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/services/lib/axis-ant.jar b/services/lib/axis-ant.jar deleted file mode 100644 index 17527ffdd..000000000 Binary files a/services/lib/axis-ant.jar and /dev/null differ diff --git a/services/lib/axis.jar b/services/lib/axis.jar deleted file mode 100644 index 20b09a595..000000000 Binary files a/services/lib/axis.jar and /dev/null differ diff --git a/services/lib/commons-discovery-0.2.jar b/services/lib/commons-discovery-0.2.jar deleted file mode 100644 index b88554847..000000000 Binary files a/services/lib/commons-discovery-0.2.jar and /dev/null differ diff --git a/services/lib/commons-logging-1.0.4.jar b/services/lib/commons-logging-1.0.4.jar deleted file mode 100644 index b73a80fab..000000000 Binary files a/services/lib/commons-logging-1.0.4.jar and /dev/null differ diff --git a/services/lib/jaxrpc.jar b/services/lib/jaxrpc.jar deleted file mode 100644 index a2c13d9a2..000000000 Binary files a/services/lib/jaxrpc.jar and /dev/null differ diff --git a/services/lib/saaj.jar b/services/lib/saaj.jar deleted file mode 100644 index 4ea696e74..000000000 Binary files a/services/lib/saaj.jar and /dev/null differ diff --git a/services/lib/wsdl4j-1.5.1.jar b/services/lib/wsdl4j-1.5.1.jar deleted file mode 100644 index c6254ee69..000000000 Binary files a/services/lib/wsdl4j-1.5.1.jar and /dev/null differ diff --git a/services/src/edu/cornell/mannlib/vitro/webservices/VitroWs.java b/services/src/edu/cornell/mannlib/vitro/webservices/VitroWs.java deleted file mode 100644 index 55e1dcfbe..000000000 --- a/services/src/edu/cornell/mannlib/vitro/webservices/VitroWs.java +++ /dev/null @@ -1,184 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webservices; - -import edu.cornell.mannlib.vitro.webapp.beans.ApplicationBean; -import edu.cornell.mannlib.vitro.webapp.beans.DataPropertyStatement; -import edu.cornell.mannlib.vitro.webapp.beans.Individual; -import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty; -import edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatement; -import edu.cornell.mannlib.vitro.webapp.beans.Tab; -import edu.cornell.mannlib.vitro.webapp.dao.TabDao; -import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory; -import edu.cornell.mannlib.vitro.webapp.dao.filtering.VitroFilters; -import edu.cornell.mannlib.vitro.webapp.dao.filtering.WebappDaoFactoryFiltering; -import edu.cornell.mannlib.vitro.webapp.utils.VitroFilterFactory; -import org.apache.axis.MessageContext; -import org.apache.axis.transport.http.HTTPConstants; - -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServlet; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.Date; -import java.util.ListIterator; - -/** - - * This is exposed by apache axis to provide a web service where folks can - * get tabs and simple entities. Jim doesn't seem to be using the properties so - * they are commented out. - * - * - * Created: Wed Aug 16 11:36:15 2006 - * @version 1.0 - */ -public class VitroWs { - //private VitroFacade vf; - private WebappDaoFactory webDaoFactory; - private ApplicationBean appBean; - - public VitroWs() { - //System.out.println("is this even getting deployed?"); - //wow, this is how to get a servlet context in axis. - HttpServlet srv = - (HttpServlet)MessageContext.getCurrentContext().getProperty(HTTPConstants.MC_HTTP_SERVLET); - ServletContext context = srv.getServletContext(); - //vf = VitroDataSourceSetup.getFacade(context); - webDaoFactory = (WebappDaoFactory)context.getAttribute("webappDaoFactory"); - - appBean = new ApplicationBean(); //is this the correct way to get one of these? - } - - /** - Gets a tab with related entities. The returned Tab does not have - child tab list filled. - */ - public Tab getFullTab(int tabid, int portalid, int depth, boolean withEntities){ - Tab tab = null; - //System.out.println("is this even getting deployed?"); - VitroFilters dateFilter = VitroFilterFactory.getSunsetWindowFilter(new Date()); - - WebappDaoFactory wdf = new WebappDaoFactoryFiltering(webDaoFactory, dateFilter); - TabDao tabdao= wdf.getTabDao(); - tab = tabdao.getTab(tabid, PUBLIC_AUTH_LEVEL,appBean, depth); - - if( withEntities ) - tab.setRelatedEntityList(tab.getRelatedEntityList(null));//null indicates no alpha filtering - else - tab.setRelatedEntityList(Collections.EMPTY_LIST); - - strip(tab); - tab.placeEntityFactory(null); - return tab; - } - - /** Gets Entity with properties filled out. */ - public Individual getFullEntityById(String entityUri, int portalid){ - //System.out.println("is this even getting deployed?"); - //IndividualWebapp entity = vf.entityById(entityId); - Individual entity = webDaoFactory.getIndividualDao().getIndividualByURI( entityUri ); - setUpEntity(entity); - setUpDescription(entity); - return entity; - } - - public List getTabsForPortal( int portalid ){ - //System.out.println("is this even getting deployed?"); - //return vf.getTabsForPortal(portalid); - return webDaoFactory.getTabDao().getTabsForPortal(portalid); - } - - private void setUpEntity(Individual entity){ -// //webDaoFactory.getCoreDaoFactory().getEnts2EntsDao().fillExistingEnts2Ents( entity ); //this may filter entitys in the ents2ents list -// //webDaoFactory.getPropertyWebappDao().fillEntityProperties( entity ); - - //webDaoFactory.getDataPropertyStatementDao().fillExistingDataPropertyStatementsForIndividual( entity ); - - webDaoFactory.getObjectPropertyStatementDao().fillExistingObjectPropertyStatements(entity); - webDaoFactory.getIndividualDao().fillVClassForIndividual( entity ); - webDaoFactory.getLinksDao().addLinksToIndividual( entity ); - entity.setKeywords(webDaoFactory.getIndividualDao().getKeywordsForIndividual(entity.getURI())); - - // jc55 causes problems with web services if populated - entity.setHiddenFromDisplayBelowRoleLevel(null); - entity.setProhibitedFromUpdateBelowRoleLevel(null); -// //entity.sortForDisplay(); - } - - /** - * Set entity up with a description from data props if there is none. - * - * @param entity - */ - private void setUpDescription(Individual entity) { - if( entity != null && - (entity.getDescription() == null || entity.getDescription().length() == 0)){ - //if there is nothing in the desc then try to get a dataprop and stick that in the desc - List e2d = entity.getDataPropertyStatements(); - if( e2d != null && e2d.size() > 0 ){ - Iterator it = e2d.iterator(); - while(it.hasNext()){ - DataPropertyStatement data = (DataPropertyStatement) it.next(); - if( RESEARCH_FOCUS_DATAPROP_URI.equals( data.getDatapropURI() ) - && data.getData() != null && data.getData().length() > 0 ){ - entity.setDescription(data.getData()); - break; - } - } - } - } - } - - - private void strip(Tab tab){ - if( tab == null ) return; - if( tab.getChildTabs() != null ){ - for( Tab childTab : tab.getChildTabs()){ - childTab.setChildTabs(null); - childTab.setRelatedEntityList(Collections.EMPTY_LIST); - } - } - if( tab.getRelatedEntities() != null ){ - for( Individual ind : tab.getRelatedEntities()){ - strip(ind); - } - } - } - - private void strip(Individual ind){ - webDaoFactory.getObjectPropertyDao().fillObjectPropertiesForIndividual(ind); - - List props = ind.getObjectPropertyList(); - - if( props != null && props.size() > 0 ){ - ListIterator iterator = props.listIterator(); - while(iterator.hasNext()){ - ObjectProperty prop= iterator.next(); - - // jc55 unlikely to be the source of the problem, but try anyway - prop.setProhibitedFromUpdateBelowRoleLevel(null); - prop.setHiddenFromDisplayBelowRoleLevel(null); - - if(! ( HAS_TEACHER.equals( prop.getURI() ) - || IN_SEMESTER.equals( prop.getURI()) )){ - iterator.remove(); - } - } - } - - ind.setDatatypePropertyList(Collections.EMPTY_LIST); - ind.setDataPropertyStatements(Collections.EMPTY_LIST); - ind.setKeywords(Collections.EMPTY_LIST); - } - - - final int PUBLIC_AUTH_LEVEL = 0; - final String RESEARCH_FOCUS_DATAPROP_URI = "http://vivo.library.cornell.edu/ns/0.1#researchFocus"; - - final String HAS_TEACHER = "http://vivo.library.cornell.edu/ns/0.1#SemesterCourseHasTeacherPerson"; - final String IN_SEMESTER = "http://vivo.library.cornell.edu/ns/0.1#SemesterCourseOccursInSemester"; -} diff --git a/services/src/edu/cornell/mannlib/vitro/webservices/semantic.cache b/services/src/edu/cornell/mannlib/vitro/webservices/semantic.cache deleted file mode 100644 index 00c5584ec..000000000 --- a/services/src/edu/cornell/mannlib/vitro/webservices/semantic.cache +++ /dev/null @@ -1,15 +0,0 @@ -;; Object webservices/ -;; SEMANTICDB Tags save file -(semanticdb-project-database-file "webservices/" - :tables (list - (semanticdb-table "VitroWs.java" - :major-mode 'jde-mode - :tags '(("edu.cornell.mannlib.vitro.webservices" package nil nil [1 47]) ("edu.cornell.mannlib.vitro.db.dao.VitroFacade" include nil nil [49 101]) ("edu.cornell.mannlib.vitro.beans.Tab" include nil nil [102 145]) ("edu.cornell.mannlib.vitro.flags.PortalFlag" include nil nil [146 196]) ("formbeans.ApplicationBean" include nil nil [197 230]) ("edu.cornell.mannlib.vitro.beans.Entity" include nil nil [231 277]) ("java.util.List" include nil nil [278 300]) ("VitroWs" type (:typemodifiers ("public") :members (("VitroWs" function (:constructor-flag t :typemodifiers ("public")) (reparse-symbol class_member_declaration) [394 413]) ("getFullTab" function (:typemodifiers ("public") :arguments (("tabid" variable (:type "int") (reparse-symbol formal_parameters) [559 568]) ("portalid" variable (:type "int") (reparse-symbol formal_parameters) [570 582])) :type "Tab") (reparse-symbol class_member_declaration) [537 848]) ("getFullEntityById" function (:typemodifiers ("public") :arguments (("entityId" variable (:type "int") (reparse-symbol formal_parameters) [948 960]) ("portalid" variable (:type "int") (reparse-symbol formal_parameters) [962 974])) :type "Entity") (reparse-symbol class_member_declaration) [916 1175]) ("getTabsForPortal" function (:typemodifiers ("public") :arguments (("portalid" variable (:type "int") (reparse-symbol formal_parameters) [1211 1223])) :type "List") (reparse-symbol class_member_declaration) [1181 1330])) :type "class") nil [366 1532])) - :file "VitroWs.java" - :pointmax 1533 - ) - ) - :file "semantic.cache" - :semantic-tag-version "2.0pre3" - :semanticdb-version "2.0pre3" - ) diff --git a/services/src/edu/cornell/mannlib/vitro/webservices/serializers/EntitySerFactory.java b/services/src/edu/cornell/mannlib/vitro/webservices/serializers/EntitySerFactory.java deleted file mode 100644 index a66ec3629..000000000 --- a/services/src/edu/cornell/mannlib/vitro/webservices/serializers/EntitySerFactory.java +++ /dev/null @@ -1,29 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webservices.serializers; - -import org.apache.axis.Constants; -import org.apache.axis.encoding.SerializerFactory; - -import java.util.Iterator; -import java.util.Vector; - -/** - * * This is used to by the axis webservices. see vitro/webservices/wsdd/VitroWs.wsdd - */ -public class EntitySerFactory implements SerializerFactory { - private Vector mechanisms; - - public EntitySerFactory() { - } - public javax.xml.rpc.encoding.Serializer getSerializerAs(String mechanismType) { - return new EntitySerializer(); - } - public Iterator getSupportedMechanismTypes() { - if (mechanisms == null) { - mechanisms = new Vector(); - mechanisms.add(Constants.AXIS_SAX); - } - return mechanisms.iterator(); - } -} diff --git a/services/src/edu/cornell/mannlib/vitro/webservices/serializers/EntitySerializer.java b/services/src/edu/cornell/mannlib/vitro/webservices/serializers/EntitySerializer.java deleted file mode 100644 index 4dadcef71..000000000 --- a/services/src/edu/cornell/mannlib/vitro/webservices/serializers/EntitySerializer.java +++ /dev/null @@ -1,148 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webservices.serializers; - -import edu.cornell.mannlib.vitro.webapp.beans.Individual; -import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty; -import edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatement; -import org.apache.axis.Constants; -import org.apache.axis.encoding.SerializationContext; -import org.apache.axis.encoding.Serializer; -import org.apache.axis.wsdl.fromJava.Types; -import org.w3c.dom.Element; -import org.xml.sax.Attributes; - -import javax.xml.namespace.QName; -import java.io.IOException; -import java.util.Collections; -import java.util.Iterator; - -/** - * WARNING: SUPER AWFUL, OBJECT ORIENTED NO-NO'S AHEAD - * -- !serializing an entity will change it! -- - * * This is used to by the axis webservices. see vitro/webservices/wsdd/VitroWs.wsdd - */ -public class EntitySerializer implements Serializer { - public static final QName myTypeQName = new QName("typeNS", "VitroEntity"); - - public static final String ID_MBER = "id"; - public static final String NAME_MBER= "name"; - public static final String MONIKER_MBER= "moniker"; - public static final String VCLASS_MBER= "vClass"; - public static final String URL_MBER= "url"; - public static final String DESCRIPTION_MBER= "description"; - public static final String SUNRISE_MBER= "sunrise"; - public static final String SUNSET_MBER= "sunset"; - public static final String TIMEKEY_MBER= "timekey"; - //public static final String MODTIME_MBER= "modTime"; - public static final String IMAGEFILE_MBER= "imageFile"; - public static final String ANCHOR_MBER= "anchor"; - public static final String BLURB_MBER= "blurb"; - public static final String STATUS_MBER= "status"; - public static final String PROPERTYLIST_MBER= "propertyList"; - public static final String LINKSLIST_MBER= "linksList"; - public static final String KEYWORDS_MBER="keywords"; - public static final String VCLASSID_MBER= "vClassId"; - - /** this is not on the original Entity object */ - public static final String RELATED_ENTITIES_MBER ="relatedEntities"; - - /** - * Serialize an element named name, with the indicated attributes - * and value. - * @param name is the element name - * @param attributes are the attributes...serialize is free to add more. - * @param value is the value - * @param context is the SerializationContext - */ - public void serialize(QName name, Attributes attributes, - Object value, SerializationContext context) - throws IOException - { - if (!(value instanceof Individual)) - throw new IOException("Can't serialize a " + value.getClass().getName() + " with a EntitySerializer."); - Individual ent = (Individual)value; - - // jc55 causes problems with web services if populated - ent.setHiddenFromDisplayBelowRoleLevel(null); - ent.setProhibitedFromUpdateBelowRoleLevel(null); - - context.startElement(name, attributes); - - prepareForSerialization( ent ); - - context.serialize(new QName("", ID_MBER), null, ent.getURI()); - context.serialize(new QName("", NAME_MBER), null, ent.getName()); - context.serialize(new QName("", MONIKER_MBER), null, ent.getMoniker()); - context.serialize(new QName("", VCLASS_MBER), null, ent.getVClass()); - context.serialize(new QName("", URL_MBER), null, ent.getUrl()); - context.serialize(new QName("", DESCRIPTION_MBER), null, ent.getDescription()); - context.serialize(new QName("", SUNRISE_MBER), null, ent.getSunrise()); - context.serialize(new QName("", SUNSET_MBER), null, ent.getSunset()); - context.serialize(new QName("", TIMEKEY_MBER), null, ent.getTimekey()); - context.serialize(new QName("", IMAGEFILE_MBER), null, ent.getMainImageUri()); - context.serialize(new QName("", ANCHOR_MBER), null, ent.getAnchor()); - context.serialize(new QName("", BLURB_MBER), null, ent.getBlurb()); - context.serialize(new QName("", STATUS_MBER), null, ent.getStatus()); - context.serialize(new QName("", LINKSLIST_MBER), null, ent.getLinksList()); - context.serialize(new QName("", KEYWORDS_MBER), null, ent.getKeywords()); - context.serialize(new QName("", VCLASSID_MBER), null, ent.getVClassURI()); - - //after the minimize this should only have property->ents2ent with no Entity objs. - context.serialize(new QName("", PROPERTYLIST_MBER), null, ent.getObjectPropertyList()); - - context.endElement(); - } - - public String getMechanismType() { return Constants.AXIS_SAX; } - - public Element writeSchema(Class javaType, Types types) throws Exception { - return null; - } - - /** - * 1) reflects props and ents2ents domainside, - * 2) sorts - * 3) removed domain Entity object from all ents2ents - * - */ - private final void prepareForSerialization(final Individual ent){ - if( ent == null || ent.getObjectPropertyList() == null) return; - - ent.sortForDisplay(); - //ent.forceAllPropertiesDomainSide(); - - Iterator it = ent.getObjectPropertyList().iterator(); - while(it.hasNext()){ - ObjectProperty prop = (ObjectProperty)it.next(); - prepareProperty(prop); - } - } - - /** - * calls prepareEnts2Ents on each ents2ents of Property - */ - private final void prepareProperty(final ObjectProperty prop){ - if( prop == null || prop.getObjectPropertyStatements() == null ) return; - - Iterator it = prop.getObjectPropertyStatements().iterator(); - while(it.hasNext()){ - prepareEnts2Ents((ObjectPropertyStatement)it.next()); - } - } - - private final void prepareEnts2Ents(final ObjectPropertyStatement e2e ){ - if( e2e != null){ - e2e.setSubject(null); - e2e.setProperty(null); - - //we don't want to serialize any deeper - Individual objInd = e2e.getObject(); - objInd.setObjectPropertyStatements(Collections.EMPTY_LIST); - objInd.setDataPropertyStatements(Collections.EMPTY_LIST); - objInd.setPropertyList(Collections.EMPTY_LIST); - objInd.setDatatypePropertyList(Collections.EMPTY_LIST); - - } - } -} diff --git a/services/src/edu/cornell/mannlib/vitro/webservices/serializers/Ents2EntsSerFactory.java b/services/src/edu/cornell/mannlib/vitro/webservices/serializers/Ents2EntsSerFactory.java deleted file mode 100644 index fe12a2a45..000000000 --- a/services/src/edu/cornell/mannlib/vitro/webservices/serializers/Ents2EntsSerFactory.java +++ /dev/null @@ -1,29 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webservices.serializers; - -import org.apache.axis.Constants; -import org.apache.axis.encoding.SerializerFactory; - -import java.util.Iterator; -import java.util.Vector; - -/** - * * This is used to by the axis webservices. see vitro/webservices/wsdd/VitroWs.wsdd - */ -public class Ents2EntsSerFactory implements SerializerFactory { - private Vector mechanisms; - - public Ents2EntsSerFactory() { - } - public javax.xml.rpc.encoding.Serializer getSerializerAs(String mechanismType) { - return new Ents2EntsSerializer(); - } - public Iterator getSupportedMechanismTypes() { - if (mechanisms == null) { - mechanisms = new Vector(); - mechanisms.add(Constants.AXIS_SAX); - } - return mechanisms.iterator(); - } -} diff --git a/services/src/edu/cornell/mannlib/vitro/webservices/serializers/Ents2EntsSerializer.java b/services/src/edu/cornell/mannlib/vitro/webservices/serializers/Ents2EntsSerializer.java deleted file mode 100644 index eee66e791..000000000 --- a/services/src/edu/cornell/mannlib/vitro/webservices/serializers/Ents2EntsSerializer.java +++ /dev/null @@ -1,111 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webservices.serializers; - -import edu.cornell.mannlib.vitro.webapp.beans.Individual; -import edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatement; -import org.apache.axis.Constants; -import org.apache.axis.encoding.SerializationContext; -import org.apache.axis.encoding.Serializer; -import org.apache.axis.wsdl.fromJava.Types; -import org.w3c.dom.Element; -import org.xml.sax.Attributes; - -import javax.xml.namespace.QName; -import java.io.IOException; - -/** - * This is used to by the axis webservices. see vitro/webservices/wsdd/VitroWs.wsdd - */ -public class Ents2EntsSerializer implements Serializer { - public static final QName myTypeQName = new QName("typeNS", "VitroEntity"); - - public static final String ENTS2ENTSID_MBER = "ents2entsId"; - public static final String DOMAINID_MBER = "domainId"; - public static final String DOMAIN_MBER = "domain"; - public static final String RANGEID_MBER = "rangeId"; - public static final String RANGE_MBER = "range"; - public static final String PROPERTYID_MBER = "propertyId"; - public static final String PROPERTY_MBER = "property"; - public static final String QUALIFIER_MBER = "qualifier"; - public static final String DOMAINORIENTED_MBER = "domainOriented"; - - - /** - * Serialize an element named name, with the indicated attributes - * and value. - * @param name is the element name - * @param attributes are the attributes...serialize is free to add more. - * @param value is the value - * @param context is the SerializationContext - */ - public void serialize(QName name, Attributes attributes, - Object value, SerializationContext context) - throws IOException - { - if (!(value instanceof ObjectPropertyStatement)) - throw new IOException("Can't serialize a " + value.getClass().getName() + " with a Ents2EntsSerializer."); - ObjectPropertyStatement e2e = (ObjectPropertyStatement)value; - context.startElement(name, attributes); - - //context.serialize(new QName("", ENTS2ENTSID_MBER), null, e2e.getEnts2entsId()); - //context.serialize(new QName("", DOMAINID_MBER), null, e2e.getDomainId()); - //context.serialize(new QName("", DOMAIN_MBER), null, e2e.getDomain()); - context.serialize(new QName("", RANGEID_MBER), null, e2e.getObjectURI()); - - //we don't want to serialize any further. - Individual object = e2e.getObject(); - object.setObjectPropertyStatements(null); - context.serialize(new QName("", RANGE_MBER), null, object); - - //context.serialize(new QName("", PROPERTYID_MBER), null, e2e.getPropertyId()); - //context.serialize(new QName("", PROPERTY_MBER), null, e2e.getProperty()); - context.serialize(new QName("", QUALIFIER_MBER), null, e2e.getQualifier()); - - context.endElement(); - } - - public String getMechanismType() { return Constants.AXIS_SAX; } - - public Element writeSchema(Class javaType, Types types) throws Exception { - return null; - } - -// /** -// * 1) reflects props and ents2ents domainside, -// * 2) sorts -// * 3) removed domain Entity object from all ents2ents -// * -// */ -// private final void prepareForSerialization(final Entity ent){ -// if( ent == null || ent.getPropertyList() == null) return; - -// ent.sortForDisplay(); -// ent.forceAllPropertiesDomainSide(); - -// Iterator it = ent.getPropertyList().iterator(); -// while(it.hasNext()){ -// Property prop = (Property)it.next(); -// prepareProperty(prop); -// } -// } - -// /** -// * calls prepareEnts2Ents on each ents2ents of Property -// */ -// private final void prepareProperty(final Property prop){ -// if( prop == null || prop.getEnts2Ents() == null ) return; - -// Iterator it = prop.getEnts2Ents().iterator(); -// while(it.hasNext()){ -// prepareEnts2Ents((Ents2Ents)it.next()); -// } -// } - -// private final void prepareEnts2Ents(final Ents2Ents e2e ){ -// if( e2e != null){ -// e2e.setDomain(null); -// e2e.setProperty(null); -// } -// } -} diff --git a/services/src/edu/cornell/mannlib/vitro/webservices/serializers/EshipRetroObjectPropertySerFactory.java b/services/src/edu/cornell/mannlib/vitro/webservices/serializers/EshipRetroObjectPropertySerFactory.java deleted file mode 100644 index 74bbb6c67..000000000 --- a/services/src/edu/cornell/mannlib/vitro/webservices/serializers/EshipRetroObjectPropertySerFactory.java +++ /dev/null @@ -1,29 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webservices.serializers; - -import org.apache.axis.Constants; -import org.apache.axis.encoding.SerializerFactory; - -import java.util.Iterator; -import java.util.Vector; - -/** - * * This is used to by the axis webservices. see vitro/webservices/wsdd/VitroWs.wsdd - */ -public class EshipRetroObjectPropertySerFactory implements SerializerFactory { - private Vector mechanisms; - - public EshipRetroObjectPropertySerFactory () { - } - public javax.xml.rpc.encoding.Serializer getSerializerAs(String mechanismType) { - return new EshipRetroObjectPropertySerializer(); - } - public Iterator getSupportedMechanismTypes() { - if (mechanisms == null) { - mechanisms = new Vector(); - mechanisms.add(Constants.AXIS_SAX); - } - return mechanisms.iterator(); - } -} diff --git a/services/src/edu/cornell/mannlib/vitro/webservices/serializers/EshipRetroObjectPropertySerializer.java b/services/src/edu/cornell/mannlib/vitro/webservices/serializers/EshipRetroObjectPropertySerializer.java deleted file mode 100644 index 4f4a05cd6..000000000 --- a/services/src/edu/cornell/mannlib/vitro/webservices/serializers/EshipRetroObjectPropertySerializer.java +++ /dev/null @@ -1,78 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webservices.serializers; - -import edu.cornell.mannlib.vitro.webapp.beans.Individual; -import edu.cornell.mannlib.vitro.webapp.beans.ObjectPropertyStatement; -import edu.cornell.mannlib.vitro.webapp.beans.ObjectProperty; -import org.apache.axis.Constants; -import org.apache.axis.encoding.SerializationContext; -import org.apache.axis.encoding.Serializer; -import org.apache.axis.wsdl.fromJava.Types; -import org.w3c.dom.Element; -import org.xml.sax.Attributes; - -import javax.xml.namespace.QName; -import java.io.IOException; -import java.util.List; - - -/** - * This is used to by the axis webservices. see vitro/webservices/wsdd/VitroWs.wsdd - */ -public class EshipRetroObjectPropertySerializer implements Serializer { - public static final QName myTypeQName = new QName("typeNS", "VitroEntity"); - - public static final String ENTS2ENTSID_MBER = "ents2entsId"; - public static final String DOMAINID_MBER = "domainId"; - public static final String DOMAIN_MBER = "domain"; - public static final String RANGEID_MBER = "rangeId"; - public static final String RANGE_MBER = "range"; - public static final String PROPERTYID_MBER = "propertyId"; - public static final String PROPERTY_MBER = "property"; - public static final String QUALIFIER_MBER = "qualifier"; - public static final String DOMAINORIENTED_MBER = "domainOriented"; - - - /** - * Serialize an element named name, with the indicated attributes - * and value. - * @param name is the element name - * @param attributes are the attributes...serialize is free to add more. - * @param value is the value - * @param context is the SerializationContext - */ - public void serialize(QName name, Attributes attributes, - Object value, SerializationContext context) - throws IOException - { - if (!(value instanceof ObjectProperty )) - throw new IOException("Can't serialize a " + value.getClass().getName() + " with a EshipRetroObjectPropertySerializer."); - ObjectProperty e2e = (ObjectProperty)value; - - //jc55 trouble with RoleLevel objects - e2e.setProhibitedFromUpdateBelowRoleLevel(null); - e2e.setHiddenFromDisplayBelowRoleLevel(null); - - context.startElement(name, attributes); - - //context.serialize(new QName("", ENTS2ENTSID_MBER), null, e2e.getEnts2entsId()); - //context.serialize(new QName("", DOMAINID_MBER), null, e2e.getDomainId()); - //context.serialize(new QName("", DOMAIN_MBER), null, e2e.getDomain()); - context.serialize(new QName("", "URI" ), null, e2e.getURI()); - context.serialize(new QName("", "domainPublic"), null, e2e.getDomainPublic()); - context.serialize(new QName("", "domainSide" ), null, e2e.getDomainSide()); - - List stmts = e2e.getObjectPropertyStatements(); - context.serialize(new QName("", "ents2Ents" ), null, stmts); - - context.endElement(); - } - - public String getMechanismType() { return Constants.AXIS_SAX; } - - public Element writeSchema(Class javaType, Types types) throws Exception { - return null; - } - -} diff --git a/services/test/edu/cornell/mannlib/vitro/webservices/xml/convert/EntityXmlTest.java b/services/test/edu/cornell/mannlib/vitro/webservices/xml/convert/EntityXmlTest.java deleted file mode 100644 index f24629ad1..000000000 --- a/services/test/edu/cornell/mannlib/vitro/webservices/xml/convert/EntityXmlTest.java +++ /dev/null @@ -1,337 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webservices.xml.convert.test; - -import junit.framework.TestCase; - -import org.dom4j.Element; -import org.dom4j.io.HTMLWriter; - -import edu.cornell.mannlib.vitro.beans.Entity; -import edu.cornell.mannlib.vitro.webapp.dao.VitroFacade; -import edu.cornell.mannlib.vitro.webservices.xml.convert.EntityXml; - -public class EntityXmlTest extends TestCase { - - public void testEntityProperties(){ - String resultXml = null; - VitroFacade facade = new VitroFacade(); - Entity ent = facade.entityById(1); - ent = facade.fillExistingEnts2Ents(ent); -// assertTrue(ent.getDomainEnts2ents() != null && -// ent.getDomainEnts2ents().size() > 0); -// assertTrue(ent.getRangeEnts2ents() != null && -// ent.getRangeEnts2ents().size() > 0); - Element elem = EntityXml.toXmlElem(ent,EntityXml.FULL); - assertTrue( elem != null ); - try{ - resultXml = HTMLWriter.prettyPrintXHTML( elem.asXML() ); - }catch(Exception ex){ - fail("exception: " + ex.toString()); - } - assertTrue(resultXml != null && resultXml.length() > 0); - } - - public static void main(String[] args) { - junit.textui.TestRunner.run( EntityXmlTest.class ); - } - -} -// -// -// 1 -// Albert R. Mann Library -// library -// -// Mann Library web page -// -// -// -// -// -// 1 -// Albert R. Mann Library -// -// -// -// -// 9036 -// PRESERVING THE HISTORY OF UNITED STATES AGRICULTURE AND RURAL LIFE: STATE AND LOCAL LITERATURE, 1820-1945, PHASE IV -// -// -// -// -// administers sponsored project -// administered by -// -// -// CUL unit library -// -// -// -// -// research grant -// -// -// -// -// -// -// -// -// 1 -// Albert R. Mann Library -// -// -// -// -// 9390 -// AGORA: ACCESS TO GLOBAL ONLINE RESEARCH IN AGRICULTURE -// -// -// -// -// administers sponsored project -// administered by -// -// -// CUL unit library -// -// -// -// -// research grant -// -// -// -// -// -// -// -// -// 1 -// Albert R. Mann Library -// -// -// -// -// 9461 -// COORDINATED COLLECTION DEVELOPMENT AID -// -// -// -// -// administers sponsored project -// administered by -// -// -// CUL unit library -// -// -// -// -// research grant -// -// -// -// -// -// -// -// -// 1 -// Albert R. Mann Library -// -// -// -// -// 9500 -// PRESERVING THE HISTORY OF UNITED STATES AGRICULTURE AND RURAL LIFE: STATE AND LOCAL LITERATURE, 1820-1945: PHASE V, 2004-2006 -// -// -// -// -// administers sponsored project -// administered by -// -// -// CUL unit library -// -// -// -// -// research grant -// -// -// -// -// -// -// -// -// 1 -// Albert R. Mann Library -// -// -// -// -// 9561 -// TEEAL(THE ESSENTIAL ELECTRONIC AGRICULTURAL LIBRARY) -// -// -// -// -// administers sponsored project -// administered by -// -// -// CUL unit library -// -// -// -// -// research grant -// -// -// -// -// -// -// -// -// 1 -// Albert R. Mann Library -// -// -// -// -// 9774 -// PLANNING INFORMATION INFRASTRUCTURE THROUGH A NEW LIBRARY-RESEARCH PARTNERSHIP -// -// -// -// -// administers sponsored project -// administered by -// -// -// CUL unit library -// -// -// -// -// research grant -// -// -// -// -// -// -// -// -// 1 -// Albert R. Mann Library -// -// -// -// -// 9833 -// DISSEMINATION AND PRESERVAITON OF DIGITAL AGRICULTURAL ECONOMIC DATA ON THE INTERNET -// -// -// -// -// administers sponsored project -// administered by -// -// -// CUL unit library -// -// -// -// -// research grant -// -// -// -// -// -// -// -// -// 1 -// Albert R. Mann Library -// -// -// -// -// 9848 -// BUILDING A SERVICE ORIENTED ARCHITECTURE FOR AGNIC -// -// -// -// -// administers sponsored project -// administered by -// -// -// CUL unit library -// -// -// -// -// research grant -// -// -// -// -// -// -// -// -// 1 -// Albert R. Mann Library -// -// -// -// -// 9859 -// THE ESSENTIAL ELECTRONIC AGRICULTURAL LIBRARY -// -// -// -// -// administers sponsored project -// administered by -// -// -// CUL unit library -// -// -// -// -// research grant -// -// -// -// -// -// -// -// -// 1 -// Albert R. Mann Library -// -// -// -// -// 11579 -// COORDINATED COLLECTION DEVELOPMENT AID -// -// -// -// -// administers sponsored project -// administered by -// -// <"); - return obj; - } - - public void testAttributes(){ - Ents2Ents ent = makeObj(); - Ents2EntsXml xmler = new Ents2EntsXml(); - Element elem = xmler.toXmlElem(ent); - assertEquals(elem.valueOf("@ents2entsId"), - Integer.toString(ent.getEnts2entsId())); - assertEquals(elem.valueOf("@domainId"), - Integer.toString(ent.getDomainId())); - assertEquals(elem.valueOf("@rangeId"), - Integer.toString(ent.getRangeId())); - assertEquals(elem.valueOf("@etypes2RelationsId"), - Integer.toString(ent.getPropertyId())); - assertEquals(elem.valueOf("@qualifier"),ent.getQualifier()); - } - - public static void main(String[] args) { - junit.textui.TestRunner.run( Ents2EntsTest.class ); - } - -} diff --git a/services/test/edu/cornell/mannlib/vitro/webservices/xml/convert/EtypeXmlTest.java b/services/test/edu/cornell/mannlib/vitro/webservices/xml/convert/EtypeXmlTest.java deleted file mode 100644 index 0670367f4..000000000 --- a/services/test/edu/cornell/mannlib/vitro/webservices/xml/convert/EtypeXmlTest.java +++ /dev/null @@ -1,26 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webservices.xml.convert.test; - -import edu.cornell.mannlib.vitro.beans.VClass; -import edu.cornell.mannlib.vitro.webservices.xml.convert.*; -import edu.cornell.mannlib.vitro.dao.db.test.EntityDaoTest; -import junit.framework.TestCase; - -public class EtypeXmlTest extends TestCase { - public void testXml1(){ - String result = ""+ - "testtype"; - VClass etype = new VClass(); - etype.setId(2132); -// etype.setTypename("testtype"); - etype.setQuickEditJsp("bleck/editjsp.bla"); - EtypeXml xmler = new EtypeXml(); - assertEquals(result, xmler.toXmlStr(etype)); - - } - public static void main(String[] args) { - junit.textui.TestRunner.run( EtypeXmlTest.class ); - } -//this is a test change -} diff --git a/services/test/edu/cornell/mannlib/vitro/webservices/xml/convert/PropertyXmlTest.java b/services/test/edu/cornell/mannlib/vitro/webservices/xml/convert/PropertyXmlTest.java deleted file mode 100644 index 9e4cce119..000000000 --- a/services/test/edu/cornell/mannlib/vitro/webservices/xml/convert/PropertyXmlTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webservices.xml.convert.test; - -import junit.framework.TestCase; -import edu.cornell.mannlib.vitro.webservices.xml.convert.*; -import edu.cornell.mannlib.vitro.beans.*; - -public class PropertyXmlTest extends TestCase { - public void testXml1(){ - String expected = - ""; - - Property prop = new Property(); - prop.setId(12); - prop.setParentId(1); - prop.setMinCardinality(0); - prop.setMaxCardinality(23); -// prop.setDomainEtypeId(2323); -// prop.setRangeEtypeId(2443); - PropertyXml xmler = new PropertyXml(); - assertEquals(expected,xmler.toXmlStr(prop)); - } - - public void testXml2(){ - String expected = - ""; - - Property prop = new Property(); - prop.setId(12); - prop.setParentId(1); - prop.setMinCardinality(0); - prop.setMaxCardinality(23); -// prop.setDomainEtypeId(2323); -// prop.setRangeEtypeId(2443); - PropertyXml xmler = new PropertyXml(); - assertEquals(expected,xmler.toXmlStr(prop)); - } - - public static void main(String[] args) { - junit.textui.TestRunner.run( PropertyXmlTest.class ); - } - -} diff --git a/services/test/edu/cornell/mannlib/vitro/webservices/xml/convert/TabXmlTest.java b/services/test/edu/cornell/mannlib/vitro/webservices/xml/convert/TabXmlTest.java deleted file mode 100755 index 8a8a97b38..000000000 --- a/services/test/edu/cornell/mannlib/vitro/webservices/xml/convert/TabXmlTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* $This file is distributed under the terms of the license in /doc/license.txt$ */ - -package edu.cornell.mannlib.vitro.webservices.xml.convert.test; - -import org.dom4j.Element; -import org.dom4j.io.HTMLWriter; - -import junit.framework.TestCase; -import edu.cornell.mannlib.vitro.beans.*; -import edu.cornell.mannlib.vitro.dao.db.*; -import edu.cornell.mannlib.vitro.webservices.xml.convert.TabXml; - -public class TabXmlTest extends TestCase { - - private void doTabXmlTest(int tabId){ -// Tab tab = TabDao.getTab(tabId, 1,"now()",10,60,0,null,null,null); -// Element elem = TabXml.toXmlElem(tab, 10); -// assertTrue( elem != null ); -// String resultXml = null; -// try{ -// resultXml = HTMLWriter.prettyPrintXHTML( elem.asXML() ); -// }catch(Exception ex){ -// fail("exception: " + ex.toString()); -// } -// assertTrue(resultXml != null && resultXml.length() > 0); - - } - - public void testTabs(){ - doTabXmlTest(63); - doTabXmlTest(18); - doTabXmlTest(19); - //bad xhtml doTabXmlTest(23); - doTabXmlTest(25); - doTabXmlTest(35); - doTabXmlTest(64); - doTabXmlTest(42); - } - - public static void main(String[] args){ - junit.textui.TestRunner.run( TabXmlTest.class ); - } -} diff --git a/services/wsdd/TabWs.wsdd b/services/wsdd/TabWs.wsdd deleted file mode 100644 index cab6ad580..000000000 --- a/services/wsdd/TabWs.wsdd +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/services/wsdd/VitroFacade.wsdd b/services/wsdd/VitroFacade.wsdd deleted file mode 100644 index 2ad52464c..000000000 --- a/services/wsdd/VitroFacade.wsdd +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - diff --git a/services/wsdd/VitroWs.wsdd b/services/wsdd/VitroWs.wsdd deleted file mode 100644 index cab6ad580..000000000 --- a/services/wsdd/VitroWs.wsdd +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/services/wsdd/VitroWs2.wsdd b/services/wsdd/VitroWs2.wsdd deleted file mode 100644 index 11b20c51e..000000000 --- a/services/wsdd/VitroWs2.wsdd +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/services/wsdd/VitroWs3.wsdd b/services/wsdd/VitroWs3.wsdd deleted file mode 100644 index 4bf51ab69..000000000 --- a/services/wsdd/VitroWs3.wsdd +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/services/xfire/additions/WEB-INF/classes/META-INF/xfire/services.xml b/services/xfire/additions/WEB-INF/classes/META-INF/xfire/services.xml deleted file mode 100644 index f19f9f35c..000000000 --- a/services/xfire/additions/WEB-INF/classes/META-INF/xfire/services.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - VitroWs - http://vitro.mannlib.cornell.edu/VitroWs2 - edu.cornell.mannlib.vitro.webservices.VitroWs2 - edu.cornell.mannlib.vitro.webservices.VitroWs2 - - - diff --git a/services/xsl/entity2eng.xsl b/services/xsl/entity2eng.xsl deleted file mode 100644 index f5e5220dd..000000000 --- a/services/xsl/entity2eng.xsl +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - -
    -

    -

    | - |

    -
    address:
    -
    phone:
    -
    email:
    -

    - -

    -
    - -
    -
    - -
    -
    -
    - - - -
      - -
    -
    - - -
  • - - - | - | -
  • -
    -