I have committed this attached change.. but the commit mail did not go
out to the list with the changes as I had not subscribed to the mailing
list with my new Apache id.. hence I am attaching the changes here for
review..
Note that I removed Xalan, but kept axis-wsd4j-1.2 as Deepal informed me
that its used by the Axis2 core.
Paul, could you try the tests now? I have tried a clean build and tested
all the samples under JDK 1.4.x without altering the JDK lib/endorsed
directory (but placing xerces under synapse_home/lib/endorsed) and it
worked for me.. would be good to validate it in a fresh environment though..
asankha
Paul Fremantle wrote:
+1 Asankha
Warning - when I removed the xalan dependency, the unit tests failed.
It ought to be able to make it work tho.
Paul
Index: bin/synapse.bat
===================================================================
--- bin/synapse.bat (revision 408554)
+++ bin/synapse.bat (working copy)
@@ -83,11 +83,18 @@
if "%_JAVACMD%" == "" set _JAVACMD=java.exe
:runSynapse
+rem set the classes by looping through the libs
+setlocal EnableDelayedExpansion
+set SYNAPSE_CLASS_PATH=%SYNAPSE_HOME%
+FOR %%C in (%SYNAPSE_HOME%\lib\*.jar) DO set
SYNAPSE_CLASS_PATH=!SYNAPSE_CLASS_PATH!;%%~fC
+set SYNAPSE_CLASS_PATH=%SYNAPSE_HOME%\conf;%SYNAPSE_CLASS_PATH%
+
+rem if a sample configuration is not specified, use default
+if "%_SYNAPSE_XML%" == "" set
_SYNAPSE_XML=-Dsynapse.xml=%SYNAPSE_HOME%\synapse_repository\conf\synapse.xml
+
@echo on
-setlocal
cd %SYNAPSE_HOME%
-"%_JAVACMD%" %_SYNAPSE_XML%
-Daxis2.xml=%SYNAPSE_HOME%\synapse_repository\conf\axis2.xml
-Djava.ext.dirs=%SYNAPSE_HOME%\lib;%EXT_DIRS%;%SYNAPSE_HOME% -cp
%SYNAPSE_HOME%\lib org.apache.axis2.transport.http.SimpleHTTPServer
%SYNAPSE_CMD_LINE_ARGS%
-endlocal
+"%_JAVACMD%" %_SYNAPSE_XML%
-Daxis2.xml=%SYNAPSE_HOME%\synapse_repository\conf\axis2.xml
-Djava.endorsed.dirs=%SYNAPSE_HOME%\lib\endorsed -cp %SYNAPSE_CLASS_PATH%
org.apache.axis2.transport.http.SimpleHTTPServer %SYNAPSE_CMD_LINE_ARGS%
goto end
:end
Index: etc/project.properties
===================================================================
--- etc/project.properties (revision 408554)
+++ etc/project.properties (working copy)
@@ -23,7 +23,7 @@
# JUnit
# -------------------------------------------------------------------
# explicit setting of Sax parser as below is a hack to avoid Junit from
loading its own parsers ignoring maven.test.excludeXmlApis
-maven.junit.jvmargs=-Djava.awt.headless=true
+maven.junit.jvmargs=-Djava.awt.headless=true
-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser
maven.junit.fork=yes
maven.test.excludeXmlApis=yes
#maven.junit.dir=${basedir}/modules/core
@@ -39,6 +39,7 @@
# -------------------------------------------------------------------
ant.version=1.6.5
axis.wsdl4j.version=1.2
+wsdl4j.version=1.5.2
axis2.version=1.0
axiom.version=1.0
@@ -46,7 +47,7 @@
XmlSchema.version=1.0.2
wss4j.version=1.5.0
commons.codec.version=1.3
-commons.discovery.version=0.2
+commons.fileupload.version=1.0
commons.httpclient.version=3.0
commons.logging.version=1.0.4
geronimo.spec.activation.version=1.0.2-rc4
@@ -62,7 +63,6 @@
stax.impl.artifactid=wstx
stax.impl.version=asl-2.9.3
stax.api.version=1.0
-xalan.version=2.7.0
xerces.version=2.8.0
xmlunit.version=1.0
annogen.version=0.1.0
Index: etc/project.xml
===================================================================
--- etc/project.xml (revision 408554)
+++ etc/project.xml (working copy)
@@ -102,14 +102,6 @@
</properties>
</dependency>
<dependency>
- <groupId>commons-discovery</groupId>
- <artifactId>commons-discovery</artifactId>
- <version>${commons.discovery.version}</version>
- <properties>
- <module>true</module>
- </properties>
- </dependency>
- <dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commons.codec.version}</version>
@@ -159,6 +151,14 @@
</dependency>
<dependency>
+ <groupId>wsdl4j</groupId>
+ <artifactId>wsdl4j</artifactId>
+ <version>${wsdl4j.version}</version>
+ <properties>
+ <module>true</module>
+ </properties>
+ </dependency>
+ <dependency>
<groupId>axis</groupId>
<artifactId>axis-wsdl4j</artifactId>
<version>${axis.wsdl4j.version}</version>
@@ -167,6 +167,22 @@
</properties>
</dependency>
<dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>${commons.fileupload.version}</version>
+ <properties>
+ <module>true</module>
+ </properties>
+ </dependency>
+ <dependency>
+ <groupId>servletapi</groupId>
+ <artifactId>servletapi</artifactId>
+ <version>${servletapi.version}</version>
+ <properties>
+ <module>true</module>
+ </properties>
+ </dependency>
+ <dependency>
<groupId>geronimo-spec</groupId>
<artifactId>geronimo-spec-javamail</artifactId>
<version>${geronimo.spec.javamail.version}</version>
@@ -191,14 +207,6 @@
</properties>
</dependency>
<dependency>
- <groupId>xalan</groupId>
- <artifactId>xalan</artifactId>
- <version>2.6.0</version>
- <properties>
- <module>true</module>
- </properties>
- </dependency>
- <dependency>
<groupId>annogen</groupId>
<artifactId>annogen</artifactId>
<version>${annogen.version}</version>
Index:
modules/core/src/org/apache/synapse/core/axis2/Axis2MessageContextFinder.java
===================================================================
---
modules/core/src/org/apache/synapse/core/axis2/Axis2MessageContextFinder.java
(revision 408554)
+++
modules/core/src/org/apache/synapse/core/axis2/Axis2MessageContextFinder.java
(working copy)
@@ -72,13 +72,14 @@
SynapseConfiguration synCfg = null;
AxisConfiguration axisCfg =
mc.getConfigurationContext().getAxisConfiguration();
- // if the Axis2 configuration defines a parameter for the Synapse
config, fetch it
- Parameter param = axisCfg.getParameter(SYNAPSE_CONFIGURATION);
- if (param != null) {
- String config = ((String) param.getValue()).trim();
- log.info("Axis2 configuration specifies the '" +
SYNAPSE_CONFIGURATION + "' parameter as " + config);
+ // if the system property synapse.xml is specified, use it.. else
default config
+ String config = System.getProperty(Constants.SYNAPSE_XML);
+ if (config != null) {
+ log.info("System property '" + Constants.SYNAPSE_XML +
+ "' specifies synapse configuration as " + config);
synCfg = SynapseConfigurationBuilder.getConfiguration(config);
} else {
+ log.warn("System property '" + Constants.SYNAPSE_XML + "' is not
specified. Using default configuration");
synCfg = SynapseConfigurationBuilder.getDefaultConfiguration();
}
Index:
modules/core/src/org/apache/synapse/core/axis2/SynapseAxis2Interceptor.java
===================================================================
--- modules/core/src/org/apache/synapse/core/axis2/SynapseAxis2Interceptor.java
(revision 408554)
+++ modules/core/src/org/apache/synapse/core/axis2/SynapseAxis2Interceptor.java
(working copy)
@@ -54,13 +54,14 @@
SynapseConfiguration synCfg = null;
- // if the Axis2 configuration defines a parameter for the Synapse
config, fetch it
- Parameter param = axisCfg.getParameter(SYNAPSE_CONFIGURATION);
- if (param != null) {
- String config = ((String) param.getValue()).trim();
- log.info("Axis2 configuration specifies the '" +
SYNAPSE_CONFIGURATION + "' parameter as " + config);
+ // if the system property synapse.xml is specified, use it.. else
default config
+ String config = System.getProperty(Constants.SYNAPSE_XML);
+ if (config != null) {
+ log.info("System property '" + Constants.SYNAPSE_XML +
+ "' specifies synapse configuration as " + config);
synCfg = SynapseConfigurationBuilder.getConfiguration(config);
} else {
+ log.warn("System property '" + Constants.SYNAPSE_XML + "' is not
specified. Using default configuration");
synCfg = SynapseConfigurationBuilder.getDefaultConfiguration();
}
Index: modules/extensions/test/org/apache/synapse/spring/SpringMediatorTest.java
===================================================================
--- modules/extensions/test/org/apache/synapse/spring/SpringMediatorTest.java
(revision 408554)
+++ modules/extensions/test/org/apache/synapse/spring/SpringMediatorTest.java
(working copy)
@@ -36,7 +36,7 @@
MessageContext msgCtx = TestUtils.getTestContext("<dummy/>");
msgCtx.setConfiguration(
-
SynapseConfigurationBuilder.getConfiguration("./../../repository/conf/sample/synapse_sample_3.xml"));
+
SynapseConfigurationBuilder.getConfiguration("./../../repository/conf/sample/synapse_spring_unittest.xml"));
msgCtx.getConfiguration().getMainMediator().mediate(msgCtx);
assertEquals(TestMediateHandlerImpl.invokeCount, 202);
Index: repository/conf/axis2.xml
===================================================================
--- repository/conf/axis2.xml (revision 408554)
+++ repository/conf/axis2.xml (working copy)
@@ -10,10 +10,6 @@
<!-- Uncomment this to enable REST support -->
<!-- <parameter name="enableREST" locked="false">true</parameter>-->
-
- <!-- Location of the SynapseRepository -->
- <parameter name="SynapseConfiguration"
locked="false">./../synapse_repository/conf/synapse.xml</parameter>
-
<parameter name="userName" locked="false">admin</parameter>
<parameter name="password" locked="false">axis2</parameter>
Index: repository/conf/sample/synapse_sample_1.xml
===================================================================
--- repository/conf/sample/synapse_sample_1.xml (revision 408554)
+++ repository/conf/sample/synapse_sample_1.xml (working copy)
@@ -10,7 +10,7 @@
<set-property name="correlate/label" value="customquote"/>
<!-- transform the custom quote into a standard quote requst -->
- <transform
xslt="file:../synapse_repository/conf/sample/transform.xslt"/>
+ <transform xslt="file:synapse_repository/conf/sample/transform.xslt"/>
<!-- send message to real endpoint and stop -->
<send/>
@@ -19,7 +19,7 @@
<sequence name="customresponse">
<!-- transform the custom quote into a standard quote requst -->
- <transform
xslt="file:../synapse_repository/conf/sample/transform_back.xslt"/>
+ <transform
xslt="file:synapse_repository/conf/sample/transform_back.xslt"/>
<!-- now send the custom response back to the client and stop -->
<send/>
Index: repository/conf/sample/synapse_sample_2.xml
===================================================================
--- repository/conf/sample/synapse_sample_2.xml (revision 408554)
+++ repository/conf/sample/synapse_sample_2.xml (working copy)
@@ -10,7 +10,7 @@
<sequence name="customrequest">
<!-- is this a valid custom request ? -->
- <validate schema="file:../synapse_repository/conf/sample/validate.xsd">
+ <validate schema="file:synapse_repository/conf/sample/validate.xsd">
<on-fail>
<!-- if the request does not validate againt schema
throw a fault -->
<makefault>
@@ -43,7 +43,7 @@
<set-property name="correlate/label" value="customquote"/>
<!-- transform the custom quote into a standard quote requst -->
- <transform
xslt="file:../synapse_repository/conf/sample/transform.xslt"/>
+ <transform xslt="file:synapse_repository/conf/sample/transform.xslt"/>
<log level="custom">
<property name="Text" value="Sending quote request"/>
@@ -60,7 +60,7 @@
<sequence name="customresponse">
<!-- transform the custom quote into a standard quote requst -->
- <transform
xslt="file:../synapse_repository/conf/sample/transform_back.xslt"/>
+ <transform
xslt="file:synapse_repository/conf/sample/transform_back.xslt"/>
<!-- now send the custom response back to the client and stop -->
<send/>
Index: repository/conf/sample/synapse_sample_3.xml
===================================================================
--- repository/conf/sample/synapse_sample_3.xml (revision 408554)
+++ repository/conf/sample/synapse_sample_3.xml (working copy)
@@ -1,12 +0,0 @@
-<synapse xmlns="http://ws.apache.org/ns/synapse"
xmlns:spring="http://ws.apache.org/ns/synapse/spring">
-
- <definitions>
- <spring:config name="springconfig"
src="./../../repository/conf/sample/springsample.xml"/>
- </definitions>
-
- <rules>
- <spring bean="springtest" config="springconfig"/>
- <spring bean="springtest"
src="./../../repository/conf/sample/springsample.xml"/>
- </rules>
-
-</synapse>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]