You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by gd...@apache.org on 2007/04/09 18:57:32 UTC
svn commit: r526827 [1/2] - in /webservices/axis2/trunk/java/modules:
adb/src/org/apache/axis2/rpc/receivers/
integration/test/org/apache/axis2/async/
integration/test/org/apache/axis2/engine/
integration/test/org/apache/axis2/engine/util/ integration/...
Author: gdaniels
Date: Mon Apr 9 09:57:27 2007
New Revision: 526827
URL: http://svn.apache.org/viewvc?view=rev&rev=526827
Log:
* Allow <handler> specifications inside a <phase> tag to parse WITHOUT requiring an <order> tag - it's silly to have handlers which are cleary inside the Dispatch phase, for instance, have to have <order phase="Dispatch"/> when we can just infer it. TODO - should confirm that handlers inside a <phase> don't actually conflict by claiming they're in another phase!
* Fix FileSystemConfigurator to actually look for an "axis2.xml" file in the root of the supplied repository directory. If it's not there, don't throw a fault but instead use the default axis2.xml from the classpath.
* Fix broken SAAJ axis2.xml which was never being picked up because of the above.
* Fix tests which use "basedir" property to default to "." so that they can be used within an IDE. Introduce a static AbstractTestCase.basedir which can be used by anyone.
* Code cleanup, fix misspellings.
Modified:
webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/async/AsyncServiceTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/async/AsyncServiceWithTransportFailureTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/CommonsHTTPEchoRawXMLTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawRuntimeProxyTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLChunkedTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLLoadTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLMultipleASyncTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLMultipleSyncTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsSyncTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerExecutionTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageSaveAndRestoreTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/OneWayRawXMLTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/PausingHandlerExecutionTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceDispatchingTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/InvokerThread.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/profiling/ContextMemoryHandlingUtil.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/TestingUtils.java
webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DescriptionBuilder.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/FileSystemConfigurator.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/AbstractTestCase.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/addressing/wsdl/WSDL11ActionHelperTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AddingObserverTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AxisMessageTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/BuildERWithDeploymentTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/DeploymentTotalTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleDisengagementTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleversionTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/OperationExcludeTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ServiceGroupTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/TransportDeploymentTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/ModuleConfigTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/ModuleEngageTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/java/security/action/Action.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/java/security/driver/Java2SecTest.java
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/java/security/more/MorePermissionAccessControlContext.java
webservices/axis2/trunk/java/modules/metadata/test/org/apache/axis2/jaxws/description/AnnotationProviderImplDescriptionTests.java
webservices/axis2/trunk/java/modules/metadata/test/org/apache/axis2/jaxws/description/DescriptionTestUtils.java
webservices/axis2/trunk/java/modules/saaj/test-resources/axis2.xml
webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/IntegrationTest.java
webservices/axis2/trunk/java/modules/saaj/test/org/apache/axis2/saaj/integration/UtilServer.java
Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java Mon Apr 9 09:57:27 2007
@@ -56,8 +56,8 @@
* <p/>
* - create response msg and add return value as grand child of <soap:body>
*
- * @param inMessage
- * @param outMessage
+ * @param inMessage incoming MessageContext
+ * @param outMessage outgoing MessageContext
* @throws AxisFault
*/
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/async/AsyncServiceTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/async/AsyncServiceTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/async/AsyncServiceTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/async/AsyncServiceTest.java Mon Apr 9 09:57:27 2007
@@ -105,7 +105,7 @@
Callback callback = new Callback() {
public void onComplete(AsyncResult result) {
- TestingUtils.campareWithCreatedOMElement(
+ TestingUtils.compareWithCreatedOMElement(
result.getResponseEnvelope().getBody()
.getFirstElement());
System.out.println("result = " + result.getResponseEnvelope().getBody()
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/async/AsyncServiceWithTransportFailureTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/async/AsyncServiceWithTransportFailureTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/async/AsyncServiceWithTransportFailureTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/async/AsyncServiceWithTransportFailureTest.java Mon Apr 9 09:57:27 2007
@@ -102,7 +102,7 @@
Callback callback = new Callback() {
public void onComplete(AsyncResult result) {
- TestingUtils.campareWithCreatedOMElement(
+ TestingUtils.compareWithCreatedOMElement(
result.getResponseEnvelope().getBody().getFirstElement());
System.out.println("result = "
+ result.getResponseEnvelope().getBody().getFirstElement());
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/CommonsHTTPEchoRawXMLTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/CommonsHTTPEchoRawXMLTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/CommonsHTTPEchoRawXMLTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/CommonsHTTPEchoRawXMLTest.java Mon Apr 9 09:57:27 2007
@@ -81,7 +81,7 @@
Callback callback = new Callback() {
public void onComplete(AsyncResult result) {
- TestingUtils.campareWithCreatedOMElement(
+ TestingUtils.compareWithCreatedOMElement(
result.getResponseEnvelope().getBody().getFirstElement());
finish = true;
}
@@ -128,7 +128,7 @@
OMElement result = sender.sendReceive(payload);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
sender.cleanup();
// call.close();
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawRuntimeProxyTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawRuntimeProxyTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawRuntimeProxyTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawRuntimeProxyTest.java Mon Apr 9 09:57:27 2007
@@ -98,6 +98,6 @@
OMElement result = sender.sendReceive(payload);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
}
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLChunkedTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLChunkedTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLChunkedTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLChunkedTest.java Mon Apr 9 09:57:27 2007
@@ -76,6 +76,6 @@
OMElement result = sender.sendReceive(payload);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
}
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLLoadTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLLoadTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLLoadTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLLoadTest.java Mon Apr 9 09:57:27 2007
@@ -72,6 +72,6 @@
OMElement result = sender.sendReceive(payload);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
}
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLMultipleASyncTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLMultipleASyncTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLMultipleASyncTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLMultipleASyncTest.java Mon Apr 9 09:57:27 2007
@@ -94,7 +94,7 @@
for (int i = 0; i < 5; i++) {
Callback callback = new Callback() {
public void onComplete(AsyncResult result) {
- TestingUtils.campareWithCreatedOMElement(
+ TestingUtils.compareWithCreatedOMElement(
result.getResponseEnvelope()
.getBody().getFirstElement());
finish = true;
@@ -140,7 +140,7 @@
Callback callback = new Callback() {
public void onComplete(AsyncResult result) {
- TestingUtils.campareWithCreatedOMElement(
+ TestingUtils.compareWithCreatedOMElement(
result.getResponseEnvelope()
.getBody().getFirstElement());
finish = true;
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLMultipleSyncTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLMultipleSyncTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLMultipleSyncTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLMultipleSyncTest.java Mon Apr 9 09:57:27 2007
@@ -86,7 +86,7 @@
sender.setOptions(options);
for (int i = 0; i < 5; i++) {
OMElement result = sender.sendReceive(payload);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
}
sender.cleanup();
configContext.terminate();
@@ -111,7 +111,7 @@
for (int i = 0; i < 5; i++) {
OMElement result = sender.sendReceive(payload);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
}
sender.cleanup();
configContext.terminate();
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsSyncTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsSyncTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsSyncTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsSyncTest.java Mon Apr 9 09:57:27 2007
@@ -88,7 +88,7 @@
OMElement result = sender.sendReceive(operationName, method);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
sender.cleanup();
}
@@ -119,7 +119,7 @@
OMElement result = sender.sendReceive(operationName, method);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
sender.cleanup();
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsTest.java Mon Apr 9 09:57:27 2007
@@ -97,7 +97,7 @@
Callback callback = new Callback() {
public void onComplete(AsyncResult result) {
- TestingUtils.campareWithCreatedOMElement(
+ TestingUtils.compareWithCreatedOMElement(
result.getResponseEnvelope().getBody()
.getFirstElement());
finish = true;
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/EchoRawXMLTest.java Mon Apr 9 09:57:27 2007
@@ -42,13 +42,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import javax.xml.namespace.QName;
-
public class EchoRawXMLTest extends UtilServerBasedTestCase implements TestConstants {
private static final Log log = LogFactory.getLog(EchoRawXMLTest.class);
- protected QName transportName = new QName("http://localhost/my",
- "NullTransport");
protected AxisConfiguration engineRegistry;
protected MessageContext mc;
@@ -91,7 +87,7 @@
Callback callback = new Callback() {
public void onComplete(AsyncResult result) {
- TestingUtils.campareWithCreatedOMElement(
+ TestingUtils.compareWithCreatedOMElement(
result.getResponseEnvelope().getBody().getFirstElement());
finish = true;
}
@@ -136,7 +132,24 @@
OMElement result = sender.sendReceive(payload);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
+ }
+
+ public void testLocalEchoXMLSync() throws Exception {
+ OMElement payload = TestingUtils.createDummyOMElement();
+ Options options = new Options();
+ options.setTo(targetEPR);
+ options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
+ options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+ ConfigurationContext configContext =
+ ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
+ ServiceClient sender = new ServiceClient(configContext, null);
+ sender.setOptions(options);
+
+ OMElement result = sender.sendReceive(payload);
+
+ TestingUtils.compareWithCreatedOMElement(result);
}
public void testCorrectSOAPEnvelope() throws Exception {
@@ -154,7 +167,7 @@
OMElement result = sender.sendReceive(payload);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
}
public void testEchoXMLSyncHttpVersion() throws Exception {
@@ -172,7 +185,7 @@
OMElement result = sender.sendReceive(payload);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerExecutionTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerExecutionTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerExecutionTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/HandlerExecutionTest.java Mon Apr 9 09:57:27 2007
@@ -163,7 +163,7 @@
OMElement payload = TestingUtils.createDummyOMElement();
OMElement result = createClient().sendReceive(payload);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
}
public void testSuccessfulInvocation() throws Exception {
@@ -204,7 +204,7 @@
OMElement result = sender.sendReceive(payload);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
List expectedExecutionState = Arrays.asList(new String[] { "COut1", "COut2", "COut3", "In1",
"In2", "In3", "In4", "In5", "In6", "Out1", "Out2", "Out3", "FCOut3", "FCOut2",
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageSaveAndRestoreTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageSaveAndRestoreTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageSaveAndRestoreTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageSaveAndRestoreTest.java Mon Apr 9 09:57:27 2007
@@ -114,7 +114,7 @@
OMElement result = sender.sendReceive(payload);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
}
private Handler inboundHandler = new AbstractHandler() {
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/OneWayRawXMLTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/OneWayRawXMLTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/OneWayRawXMLTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/OneWayRawXMLTest.java Mon Apr 9 09:57:27 2007
@@ -60,7 +60,7 @@
axisOperation.setMessageReceiver(new MessageReceiver() {
public void receive(MessageContext messageCtx) {
envelope = messageCtx.getEnvelope();
- TestingUtils.campareWithCreatedOMElement(
+ TestingUtils.compareWithCreatedOMElement(
envelope.getBody().getFirstElement());
}
});
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/PausingHandlerExecutionTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/PausingHandlerExecutionTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/PausingHandlerExecutionTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/PausingHandlerExecutionTest.java Mon Apr 9 09:57:27 2007
@@ -158,7 +158,7 @@
OMElement payload = TestingUtils.createDummyOMElement();
OMElement result = createClient().sendReceive(payload);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
}
public void testSuccessfulInvocation() throws Exception {
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceDispatchingTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceDispatchingTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceDispatchingTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceDispatchingTest.java Mon Apr 9 09:57:27 2007
@@ -74,7 +74,7 @@
OMElement result = sender.sendReceive(payload);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
}
public void testDispatchWithURLAndSOAPAction() throws Exception {
@@ -96,7 +96,7 @@
sender.setOptions(options);
OMElement result = sender.sendReceive(payload);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
}
public void testDispatchWithSOAPBody() throws Exception {
@@ -119,6 +119,6 @@
OMElement result = sender.sendReceive(payload);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
}
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/InvokerThread.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/InvokerThread.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/InvokerThread.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/InvokerThread.java Mon Apr 9 09:57:27 2007
@@ -63,7 +63,7 @@
sender.setOptions(options);
OMElement result = sender.sendReceive(payload);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
log.info("Finishing Thread number " + threadNumber + " .....");
} catch (AxisFault axisFault) {
thrownException = axisFault;
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/profiling/ContextMemoryHandlingUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/profiling/ContextMemoryHandlingUtil.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/profiling/ContextMemoryHandlingUtil.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/util/profiling/ContextMemoryHandlingUtil.java Mon Apr 9 09:57:27 2007
@@ -49,7 +49,7 @@
options.setTo(targetEPR);
OMElement result = sender.sendReceive(payload);
- TestingUtils.campareWithCreatedOMElement(result);
+ TestingUtils.compareWithCreatedOMElement(result);
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/TestingUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/TestingUtils.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/TestingUtils.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/TestingUtils.java Mon Apr 9 09:57:27 2007
@@ -46,7 +46,7 @@
}
- public static void campareWithCreatedOMElement(OMElement element) {
+ public static void compareWithCreatedOMElement(OMElement element) {
OMElement firstChild = element.getFirstElement();
TestCase.assertNotNull(firstChild);
String textValue = firstChild.getText();
Modified: webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java (original)
+++ webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java Mon Apr 9 09:57:27 2007
@@ -1,13 +1,39 @@
package org.apache.ws.java2wsdl;
-import org.apache.ws.commons.schema.*;
+import org.apache.ws.commons.schema.XmlSchema;
+import org.apache.ws.commons.schema.XmlSchemaCollection;
+import org.apache.ws.commons.schema.XmlSchemaComplexContent;
+import org.apache.ws.commons.schema.XmlSchemaComplexContentExtension;
+import org.apache.ws.commons.schema.XmlSchemaComplexType;
+import org.apache.ws.commons.schema.XmlSchemaElement;
+import org.apache.ws.commons.schema.XmlSchemaForm;
+import org.apache.ws.commons.schema.XmlSchemaImport;
+import org.apache.ws.commons.schema.XmlSchemaSequence;
import org.apache.ws.commons.schema.utils.NamespaceMap;
import org.apache.ws.java2wsdl.bytecode.MethodTable;
import org.apache.ws.java2wsdl.utils.TypeTable;
-import org.codehaus.jam.*;
+import org.codehaus.jam.JAnnotation;
+import org.codehaus.jam.JClass;
+import org.codehaus.jam.JField;
+import org.codehaus.jam.JMethod;
+import org.codehaus.jam.JPackage;
+import org.codehaus.jam.JParameter;
+import org.codehaus.jam.JProperty;
+import org.codehaus.jam.JamClassIterator;
+import org.codehaus.jam.JamService;
+import org.codehaus.jam.JamServiceFactory;
+import org.codehaus.jam.JamServiceParams;
import javax.xml.namespace.QName;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Hashtable;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
/*
* Copyright 2004,2005 The Apache Software Foundation.
@@ -46,7 +72,7 @@
private TypeTable typeTable = new TypeTable();
// to keep loadded method using JAM
- private JMethod methods [];
+ private JMethod methods[];
//to store byte code method using Axis 1.x codes
private MethodTable methodTable;
@@ -75,7 +101,7 @@
public NamespaceGenerator getNsGen() throws Exception {
- if ( nsGen == null ) {
+ if (nsGen == null) {
nsGen = new DefaultNamespaceGenerator();
}
return nsGen;
@@ -92,20 +118,21 @@
this.classLoader = loader;
this.className = className;
- Class clazz = Class.forName(className, true, loader);
+ Class clazz = Class.forName(className, true, loader);
methodTable = new MethodTable(clazz);
this.targetNamespace = Java2WSDLUtils.targetNamespaceFromClassName(
className, loader, getNsGen()).toString();
-
+
if (schematargetNamespace != null
&& schematargetNamespace.trim().length() != 0) {
this.schemaTargetNameSpace = schematargetNamespace;
} else {
this.schemaTargetNameSpace =
- Java2WSDLUtils.schemaNamespaceFromClassName(className, loader, getNsGen()).toString();
+ Java2WSDLUtils.schemaNamespaceFromClassName(className, loader, getNsGen())
+ .toString();
}
-
+
if (schematargetNamespacePrefix != null
&& schematargetNamespacePrefix.trim().length() != 0) {
this.schema_namespace_prefix = schematargetNamespacePrefix;
@@ -115,8 +142,8 @@
}
/**
- * Generates schema for all the parameters in method. First generates schema
- * for all different parameter type and later refers to them.
+ * Generates schema for all the parameters in method. First generates schema for all different
+ * parameter type and later refers to them.
*
* @return Returns XmlSchema.
* @throws Exception
@@ -132,14 +159,14 @@
jam_service_parms.includeClass(className);
for (int count = 0; count < getExtraClasses().size(); ++count) {
- jam_service_parms.includeClass((String) getExtraClasses().get(count));
+ jam_service_parms.includeClass((String)getExtraClasses().get(count));
}
JamService service = factory.createService(jam_service_parms);
QName extraSchemaTypeName;
JamClassIterator jClassIter = service.getClasses();
//all most all the time the ittr will have only one class in it
while (jClassIter.hasNext()) {
- JClass jclass = (JClass) jClassIter.next();
+ JClass jclass = (JClass)jClassIter.next();
if (getQualifiedName(jclass).equals(className)) {
/**
* Schema genertaion done in two stage 1. Load all the methods and
@@ -150,9 +177,10 @@
* messages and port types will be creteated
*/
JAnnotation annotation = jclass.getAnnotation(AnnotationConstants.WEB_SERVICE);
- if(annotation!=null){
- String tns = annotation.getValue(AnnotationConstants.TARGETNAMESPACE).asString();
- if(tns!=null&&!"".equals(tns)){
+ if (annotation != null) {
+ String tns =
+ annotation.getValue(AnnotationConstants.TARGETNAMESPACE).asString();
+ if (tns != null && !"".equals(tns)) {
targetNamespace = tns;
}
}
@@ -167,9 +195,9 @@
for (int i = 0; i < methods.length; i++) {
JMethod jMethod = methods[i];
- JAnnotation methodAnnon= jMethod.getAnnotation(AnnotationConstants.WEB_METHOD);
- if(methodAnnon!=null){
- if(methodAnnon.getValue(AnnotationConstants.EXCLUDE).asBoolean()){
+ JAnnotation methodAnnon = jMethod.getAnnotation(AnnotationConstants.WEB_METHOD);
+ if (methodAnnon != null) {
+ if (methodAnnon.getValue(AnnotationConstants.EXCLUDE).asBoolean()) {
continue;
}
}
@@ -190,11 +218,13 @@
continue;
}
if (jMethod.getExceptionTypes().length > 0) {
- methodSchemaType = createSchemaTypeForMethodPart(getSimpleName(jMethod) + "Fault");
+ methodSchemaType =
+ createSchemaTypeForMethodPart(getSimpleName(jMethod) + "Fault");
sequence = new XmlSchemaSequence();
XmlSchemaElement elt1 = new XmlSchemaElement();
elt1.setName(getSimpleName(jMethod) + "Fault");
- elt1.setSchemaTypeName(typeTable.getQNamefortheType(Object.class.getName()));
+ elt1.setSchemaTypeName(
+ typeTable.getQNamefortheType(Object.class.getName()));
sequence.getItems().add(elt1);
methodSchemaType.setParticle(sequence);
}
@@ -202,8 +232,8 @@
//create the schema type for the method wrapper
uniqueMethods.put(getSimpleName(jMethod), jMethod);
- JParameter [] paras = jMethod.getParameters();
- String parameterNames [] = null;
+ JParameter[] paras = jMethod.getParameters();
+ String parameterNames[] = null;
if (paras.length > 0) {
parameterNames = methodTable.getParameterNames(methodName);
sequence = new XmlSchemaSequence();
@@ -214,38 +244,43 @@
for (int j = 0; j < paras.length; j++) {
JParameter methodParameter = paras[j];
- String parameterName =null;
- JAnnotation paramterAnnon= methodParameter.getAnnotation(AnnotationConstants.WEB_PARAM);
- if(paramterAnnon!=null){
- parameterName = paramterAnnon.getValue(AnnotationConstants.NAME).asString();
+ String parameterName = null;
+ JAnnotation paramterAnnon =
+ methodParameter.getAnnotation(AnnotationConstants.WEB_PARAM);
+ if (paramterAnnon != null) {
+ parameterName =
+ paramterAnnon.getValue(AnnotationConstants.NAME).asString();
}
- if(parameterName==null||"".equals(parameterName)){
- parameterName = (parameterNames != null && parameterNames[j] != null) ? parameterNames[j] : getSimpleName(methodParameter);
+ if (parameterName == null || "".equals(parameterName)) {
+ parameterName = (parameterNames != null && parameterNames[j] != null) ?
+ parameterNames[j] : getSimpleName(methodParameter);
}
JClass paraType = methodParameter.getType();
- if(nonRpcMethods.contains(getSimpleName(jMethod))){
- generateSchemaForType(sequence, null,getSimpleName(jMethod));
+ if (nonRpcMethods.contains(getSimpleName(jMethod))) {
+ generateSchemaForType(sequence, null, getSimpleName(jMethod));
break;
} else {
- generateSchemaForType(sequence, paraType,parameterName);
+ generateSchemaForType(sequence, paraType, parameterName);
}
}
// for its return type
JClass returnType = jMethod.getReturnType();
if (!returnType.isVoidType()) {
- methodSchemaType = createSchemaTypeForMethodPart(getSimpleName(jMethod) + RESPONSE);
+ methodSchemaType =
+ createSchemaTypeForMethodPart(getSimpleName(jMethod) + RESPONSE);
sequence = new XmlSchemaSequence();
methodSchemaType.setParticle(sequence);
- JAnnotation returnAnnon= jMethod.getAnnotation(AnnotationConstants.WEB_RESULT);
- String returnName ="return";
- if(returnAnnon!=null){
- returnName= returnAnnon.getValue(AnnotationConstants.NAME).asString();
- if(returnName!=null&&!"".equals(returnName)){
- returnName ="return";
+ JAnnotation returnAnnon =
+ jMethod.getAnnotation(AnnotationConstants.WEB_RESULT);
+ String returnName = "return";
+ if (returnAnnon != null) {
+ returnName = returnAnnon.getValue(AnnotationConstants.NAME).asString();
+ if (returnName != null && !"".equals(returnName)) {
+ returnName = "return";
}
}
- if(nonRpcMethods.contains(getSimpleName(jMethod))){
+ if (nonRpcMethods.contains(getSimpleName(jMethod))) {
generateSchemaForType(sequence, null, returnName);
} else {
generateSchemaForType(sequence, returnType, returnName);
@@ -265,9 +300,9 @@
}
/**
- * JAM convert first name of an attribute into UpperCase as an example if
- * there is a instance variable called foo in a bean , then Jam give that as
- * Foo so this method is to correct that error
+ * JAM convert first name of an attribute into UpperCase as an example if there is a instance
+ * variable called foo in a bean , then Jam give that as Foo so this method is to correct that
+ * error
*
* @param wrongName
* @return the right name, using english as the locale for case conversion
@@ -281,63 +316,62 @@
}
}
- /**
- * @param javaType
- */
+ /** @param javaType */
private QName generateSchema(JClass javaType) throws Exception {
String name = getQualifiedName(javaType);
- QName schemaTypeName =typeTable.getComplexSchemaType(name);
+ QName schemaTypeName = typeTable.getComplexSchemaType(name);
if (schemaTypeName == null) {
- String simpleName = getSimpleName(javaType);
+ String simpleName = getSimpleName(javaType);
String packageName = getQualifiedName(javaType.getContainingPackage());
String targetNameSpace = resolveSchemaNamespace(packageName);
XmlSchema xmlSchema = getXmlSchema(targetNameSpace);
- String targetNamespacePrefix = (String) targetNamespacePrefixMap.get(targetNameSpace);
+ String targetNamespacePrefix = (String)targetNamespacePrefixMap.get(targetNameSpace);
XmlSchemaComplexType complexType = new XmlSchemaComplexType(xmlSchema);
XmlSchemaSequence sequence = new XmlSchemaSequence();
- XmlSchemaComplexContentExtension complexExtension = new XmlSchemaComplexContentExtension() ;
+ XmlSchemaComplexContentExtension complexExtension =
+ new XmlSchemaComplexContentExtension();
XmlSchemaElement eltOuter = new XmlSchemaElement();
schemaTypeName = new QName(targetNameSpace, simpleName, targetNamespacePrefix);
eltOuter.setName(simpleName);
eltOuter.setQName(schemaTypeName);
-
- JClass sup = javaType.getSuperclass() ;
-
+
+ JClass sup = javaType.getSuperclass();
+
// AXIS2-1749 inheritance
- if ((sup != null) && !( "java.lang.Object".compareTo(sup.getQualifiedName()) == 0)) {
- String superClassName = sup.getQualifiedName();
- String superclassname = getSimpleName(sup) ;
- String tgtNamespace ;
+ if ((sup != null) && !("java.lang.Object".compareTo(sup.getQualifiedName()) == 0)) {
+ String superClassName = sup.getQualifiedName();
+ String superclassname = getSimpleName(sup);
+ String tgtNamespace;
String tgtNamespacepfx;
QName qName = typeTable.getSimpleSchemaTypeName(superClassName);
- if(qName !=null){
- tgtNamespace =qName.getNamespaceURI();
+ if (qName != null) {
+ tgtNamespace = qName.getNamespaceURI();
tgtNamespacepfx = qName.getPrefix();
} else {
- tgtNamespace = resolveSchemaNamespace(sup.getContainingPackage().getQualifiedName()) ;
- tgtNamespacepfx = (String) targetNamespacePrefixMap.get(tgtNamespace);
- }
-
- QName basetype = new QName(tgtNamespace,superclassname,tgtNamespacepfx) ;
-
- complexExtension.setBaseTypeName(basetype) ;
- complexExtension.setParticle(sequence) ;
-
- XmlSchemaComplexContent contentModel = new XmlSchemaComplexContent() ;
-
- contentModel.setContent(complexExtension) ;
-
- complexType.setContentModel(contentModel) ;
-
- }
- else
- complexType.setParticle(sequence);
+ tgtNamespace =
+ resolveSchemaNamespace(sup.getContainingPackage().getQualifiedName());
+ tgtNamespacepfx = (String)targetNamespacePrefixMap.get(tgtNamespace);
+ }
+
+ QName basetype = new QName(tgtNamespace, superclassname, tgtNamespacepfx);
+
+ complexExtension.setBaseTypeName(basetype);
+ complexExtension.setParticle(sequence);
+
+ XmlSchemaComplexContent contentModel = new XmlSchemaComplexContent();
+
+ contentModel.setContent(complexExtension);
+
+ complexType.setContentModel(contentModel);
+
+ } else
+ complexType.setParticle(sequence);
+
-
complexType.setName(simpleName);
xmlSchema.getItems().add(eltOuter);
@@ -350,169 +384,174 @@
// adding this type to the table
typeTable.addComplexSchema(name, eltOuter.getQName());
- JClass tempClass = javaType;
- Set propertiesSet = new HashSet();
- Set propertiesNames = new HashSet() ;
-
- // while (tempClass != null && !"java.lang.Object".equals(getQualifiedName(tempClass))) {
+ JClass tempClass = javaType;
+ Set propertiesSet = new HashSet();
+ Set propertiesNames = new HashSet();
+
+ // while (tempClass != null && !"java.lang.Object".equals(getQualifiedName(tempClass))) {
// With 1749 we don'nt need properties of superclasses
- JProperty[] tempProperties = tempClass.getDeclaredProperties();
- for (int i = 0; i < tempProperties.length; i++) {
- propertiesSet.add(tempProperties[i]);
- }
- // tempClass = tempClass.getSuperclass();
- // }
-
- JProperty[] properties = (JProperty[]) propertiesSet.toArray(new JProperty[0]);
+ JProperty[] tempProperties = tempClass.getDeclaredProperties();
+ for (int i = 0; i < tempProperties.length; i++) {
+ propertiesSet.add(tempProperties[i]);
+ }
+ // tempClass = tempClass.getSuperclass();
+ // }
+
+ JProperty[] properties = (JProperty[])propertiesSet.toArray(new JProperty[0]);
Arrays.sort(properties);
for (int i = 0; i < properties.length; i++) {
JProperty property = properties[i];
String propertyName = getQualifiedName(property.getType());
boolean isArryType = property.getType().isArrayType();
-
- String propname = getCorrectName(property.getSimpleName()) ;
-
- propertiesNames.add(propname) ;
-
- this.generateSchemaforFieldsandProperties(xmlSchema,sequence,property.getType(),propname, isArryType) ;
-
+
+ String propname = getCorrectName(property.getSimpleName());
+
+ propertiesNames.add(propname);
+
+ this.generateSchemaforFieldsandProperties(xmlSchema, sequence, property.getType(),
+ propname, isArryType);
+
}
-
+
// AXIS2-2116 support for fields
-
- JField[] tempFields = javaType.getDeclaredFields() ;
- HashMap FieldMap = new HashMap() ;
-
-
+
+ JField[] tempFields = javaType.getDeclaredFields();
+ HashMap FieldMap = new HashMap();
+
+
for (int i = 0; i < tempFields.length; i++) {
- // create a element for the field only if it is public
- // and there is no property with the same name
-
- if (tempFields[i].isPublic()) {
-
- // skip field with same name as a property
- if (!propertiesNames.contains(tempFields[i].getSimpleName())) {
-
- FieldMap.put(tempFields[i].getSimpleName(),tempFields[i]) ;
- }
- }
-
- }
-
+ // create a element for the field only if it is public
+ // and there is no property with the same name
+
+ if (tempFields[i].isPublic()) {
+
+ // skip field with same name as a property
+ if (!propertiesNames.contains(tempFields[i].getSimpleName())) {
+
+ FieldMap.put(tempFields[i].getSimpleName(), tempFields[i]);
+ }
+ }
+
+ }
+
// remove fields from super classes patch for defect Annogen-21
// getDeclaredFields is incorrectly returning fields of super classes as well
// getDeclaredProperties used earlier works correctly
-
- JClass supr = javaType.getSuperclass() ;
- while(supr != null && supr.getQualifiedName().compareTo("java.lang.Object") != 0) {
-
- JField[] suprFields = supr.getFields() ;
-
- for (int i = 0 ; i < suprFields.length ;i++) {
-
- FieldMap.remove(suprFields[i].getSimpleName()) ;
-
- }
-
- supr = supr.getSuperclass() ;
-
-
+
+ JClass supr = javaType.getSuperclass();
+ while (supr != null && supr.getQualifiedName().compareTo("java.lang.Object") != 0) {
+
+ JField[] suprFields = supr.getFields();
+
+ for (int i = 0; i < suprFields.length; i++) {
+
+ FieldMap.remove(suprFields[i].getSimpleName());
+
+ }
+
+ supr = supr.getSuperclass();
+
+
}
-
+
// end patch for Annogen -21
-
- JField[] froperties = (JField[]) FieldMap.values().toArray(new JField[0]);
+
+ JField[] froperties = (JField[])FieldMap.values().toArray(new JField[0]);
Arrays.sort(froperties);
-
+
for (int i = 0; i < froperties.length; i++) {
JField field = froperties[i];
String propertyName = field.getType().getQualifiedName();
boolean isArryType = field.getType().isArrayType();
-
- this.generateSchemaforFieldsandProperties(xmlSchema, sequence,field.getType(),field.getSimpleName(), isArryType) ;
- }
-
-
-
+
+ this.generateSchemaforFieldsandProperties(xmlSchema, sequence, field.getType(),
+ field.getSimpleName(), isArryType);
+ }
+
+
}
return schemaTypeName;
}
-
+
// moved code common to Fields & properties out of above method
- private void generateSchemaforFieldsandProperties(XmlSchema xmlSchema,XmlSchemaSequence sequence, JClass type, String name, boolean isArryType)
- throws Exception {
-
- String propertyName ;
-
- if (isArryType) {
- propertyName = getQualifiedName(type.getArrayComponentType()) ;
- } else
- propertyName = getQualifiedName(type) ;
-
- if(isArryType&&"byte".equals(propertyName)){
+ private void generateSchemaforFieldsandProperties(XmlSchema xmlSchema,
+ XmlSchemaSequence sequence, JClass type,
+ String name, boolean isArryType)
+ throws Exception {
+
+ String propertyName;
+
+ if (isArryType) {
+ propertyName = getQualifiedName(type.getArrayComponentType());
+ } else
+ propertyName = getQualifiedName(type);
+
+ if (isArryType && "byte".equals(propertyName)) {
propertyName = "base64Binary";
}
- if (typeTable.isSimpleType(propertyName)) {
- XmlSchemaElement elt1 = new XmlSchemaElement();
- elt1.setName(name);
- elt1.setSchemaTypeName(typeTable.getSimpleSchemaTypeName(propertyName));
- sequence.getItems().add(elt1);
-
- if (isArryType) {
- elt1.setMaxOccurs(Long.MAX_VALUE);
- elt1.setMinOccurs(1);
- }
-
-
- if (String.class.getName().equals(propertyName)) {
- elt1.setNillable(true);
- }
-
-
- } else {
- if (isArryType) {
- generateSchema(type.getArrayComponentType());
- } else {
- generateSchema(type);
- }
- XmlSchemaElement elt1 = new XmlSchemaElement();
- elt1.setName(name);
- elt1.setSchemaTypeName(typeTable.getComplexSchemaType(propertyName));
- sequence.getItems().add(elt1);
- if (isArryType) {
- elt1.setMaxOccurs(Long.MAX_VALUE);
- elt1.setMinOccurs(1);
- }
- elt1.setNillable(true);
-
- if (!((NamespaceMap) xmlSchema.getNamespaceContext()).values().
- contains(typeTable.getComplexSchemaType(propertyName).getNamespaceURI())) {
- XmlSchemaImport importElement = new XmlSchemaImport();
- importElement.setNamespace(typeTable.getComplexSchemaType(propertyName).getNamespaceURI());
- xmlSchema.getItems().add(importElement);
- ((NamespaceMap) xmlSchema.getNamespaceContext()).
- put(generatePrefix(), typeTable.getComplexSchemaType(propertyName).getNamespaceURI());
- }
- }
-
+ if (typeTable.isSimpleType(propertyName)) {
+ XmlSchemaElement elt1 = new XmlSchemaElement();
+ elt1.setName(name);
+ elt1.setSchemaTypeName(typeTable.getSimpleSchemaTypeName(propertyName));
+ sequence.getItems().add(elt1);
+
+ if (isArryType) {
+ elt1.setMaxOccurs(Long.MAX_VALUE);
+ elt1.setMinOccurs(1);
+ }
+
+
+ if (String.class.getName().equals(propertyName)) {
+ elt1.setNillable(true);
+ }
+
+
+ } else {
+ if (isArryType) {
+ generateSchema(type.getArrayComponentType());
+ } else {
+ generateSchema(type);
+ }
+ XmlSchemaElement elt1 = new XmlSchemaElement();
+ elt1.setName(name);
+ elt1.setSchemaTypeName(typeTable.getComplexSchemaType(propertyName));
+ sequence.getItems().add(elt1);
+ if (isArryType) {
+ elt1.setMaxOccurs(Long.MAX_VALUE);
+ elt1.setMinOccurs(1);
+ }
+ elt1.setNillable(true);
+
+ if (!((NamespaceMap)xmlSchema.getNamespaceContext()).values().
+ contains(typeTable.getComplexSchemaType(propertyName).getNamespaceURI())) {
+ XmlSchemaImport importElement = new XmlSchemaImport();
+ importElement.setNamespace(
+ typeTable.getComplexSchemaType(propertyName).getNamespaceURI());
+ xmlSchema.getItems().add(importElement);
+ ((NamespaceMap)xmlSchema.getNamespaceContext()).
+ put(generatePrefix(),
+ typeTable.getComplexSchemaType(propertyName).getNamespaceURI());
+ }
+ }
}
- private QName generateSchemaForType(XmlSchemaSequence sequence, JClass type, String partName) throws Exception {
+ private QName generateSchemaForType(XmlSchemaSequence sequence, JClass type, String partName)
+ throws Exception {
boolean isArrayType = false;
- if(type!=null){
+ if (type != null) {
isArrayType = type.isArrayType();
}
if (isArrayType) {
type = type.getArrayComponentType();
}
String classTypeName;
- if(type==null){
+ if (type == null) {
classTypeName = "java.lang.Object";
} else {
classTypeName = getQualifiedName(type);
@@ -521,16 +560,16 @@
classTypeName = "base64Binary";
isArrayType = false;
}
- if("javax.activation.DataHandler".equals(classTypeName)){
+ if ("javax.activation.DataHandler".equals(classTypeName)) {
classTypeName = "base64Binary";
}
QName schemaTypeName = typeTable.getSimpleSchemaTypeName(classTypeName);
if (schemaTypeName == null) {
schemaTypeName = generateSchema(type);
addContentToMethodSchemaType(sequence,
- schemaTypeName,
- partName,
- isArrayType);
+ schemaTypeName,
+ partName,
+ isArrayType);
//addImport((XmlSchema)schemaMap.get(schemaTargetNameSpace), schemaTypeName);
String schemaNamespace;
schemaNamespace = resolveSchemaNamespace(getQualifiedName(type.getContainingPackage()));
@@ -538,9 +577,9 @@
} else {
addContentToMethodSchemaType(sequence,
- schemaTypeName,
- partName,
- isArrayType);
+ schemaTypeName,
+ partName,
+ isArrayType);
}
return schemaTypeName;
@@ -565,7 +604,8 @@
private XmlSchemaComplexType createSchemaTypeForMethodPart(String localPartName) {
//XmlSchema xmlSchema = (XmlSchema)schemaMap.get(schemaTargetNameSpace);
XmlSchema xmlSchema = getXmlSchema(schemaTargetNameSpace);
- QName elementName = new QName(this.schemaTargetNameSpace, localPartName, this.schema_namespace_prefix);
+ QName elementName =
+ new QName(this.schemaTargetNameSpace, localPartName, this.schema_namespace_prefix);
XmlSchemaComplexType complexType = new XmlSchemaComplexType(xmlSchema);
XmlSchemaElement globalElement = new XmlSchemaElement();
@@ -584,18 +624,17 @@
private XmlSchema getXmlSchema(String targetNamespace) {
XmlSchema xmlSchema;
- if ((xmlSchema = (XmlSchema) schemaMap.get(targetNamespace)) == null) {
+ if ((xmlSchema = (XmlSchema)schemaMap.get(targetNamespace)) == null) {
String targetNamespacePrefix = null;
-
- if ( targetNamespace.equals(schemaTargetNameSpace) &&
- schema_namespace_prefix != null ) {
+
+ if (targetNamespace.equals(schemaTargetNameSpace) &&
+ schema_namespace_prefix != null) {
targetNamespacePrefix = schema_namespace_prefix;
- }
- else {
+ } else {
targetNamespacePrefix = generatePrefix();
}
-
+
xmlSchema = new XmlSchema(targetNamespace, xmlSchemaCollection);
xmlSchema.setAttributeFormDefault(getAttrFormDefaultSetting());
xmlSchema.setElementFormDefault(getElementFormDefaultSetting());
@@ -626,6 +665,7 @@
}
public void setExcludeMethods(ArrayList excludeMethods) {
+ if (excludeMethods == null) excludeMethods = new ArrayList();
this.excludeMethods = excludeMethods;
}
@@ -634,12 +674,12 @@
}
private void addImport(XmlSchema xmlSchema, QName schemaTypeName) {
- if (!((NamespaceMap) xmlSchema.getNamespaceContext()).values().
+ if (!((NamespaceMap)xmlSchema.getNamespaceContext()).values().
contains(schemaTypeName.getNamespaceURI())) {
XmlSchemaImport importElement = new XmlSchemaImport();
importElement.setNamespace(schemaTypeName.getNamespaceURI());
xmlSchema.getItems().add(importElement);
- ((NamespaceMap) xmlSchema.getNamespaceContext()).
+ ((NamespaceMap)xmlSchema.getNamespaceContext()).
put(generatePrefix(), schemaTypeName.getNamespaceURI());
}
}
@@ -691,13 +731,13 @@
//if all types must go into the wsdl types schema namespace
if (useWSDLTypesNamespace) {
//return schemaTargetNameSpace;
- return (String) pkg2nsmap.get("all");
+ return (String)pkg2nsmap.get("all");
} else {
if (pkg2nsmap != null && !pkg2nsmap.isEmpty()) {
//if types should go into namespaces that are mapped against the package name for the type
if (pkg2nsmap.get(packageName) != null) {
//return that mapping
- return (String) pkg2nsmap.get(packageName);
+ return (String)pkg2nsmap.get(packageName);
} else {
return getNsGen().schemaNamespaceFromPackageName(packageName).toString();
}
@@ -728,36 +768,44 @@
return targetNamespace;
}
- protected String getSimpleName(JMethod method){
- return method.getSimpleName();
- }
- protected String getSimpleName(JClass type){
- return type.getSimpleName();
- }
- protected String getSimpleName(JProperty peroperty){
+ protected String getSimpleName(JMethod method) {
+ return method.getSimpleName();
+ }
+
+ protected String getSimpleName(JClass type) {
+ return type.getSimpleName();
+ }
+
+ protected String getSimpleName(JProperty peroperty) {
return peroperty.getSimpleName();
}
- protected String getSimpleName(JParameter parameter){
+
+ protected String getSimpleName(JParameter parameter) {
return parameter.getSimpleName();
- }
+ }
- protected String getQualifiedName(JMethod method){
+ protected String getQualifiedName(JMethod method) {
return method.getQualifiedName();
}
- protected String getQualifiedName(JClass type){
+
+ protected String getQualifiedName(JClass type) {
return type.getQualifiedName();
}
- protected String getQualifiedName(JProperty peroperty){
+
+ protected String getQualifiedName(JProperty peroperty) {
return peroperty.getQualifiedName();
}
- protected String getQualifiedName(JParameter parameter){
+
+ protected String getQualifiedName(JParameter parameter) {
return parameter.getQualifiedName();
}
- protected String getQualifiedName(JPackage packagez){
+
+ protected String getQualifiedName(JPackage packagez) {
return packagez.getQualifiedName();
}
+
public void setNonRpcMethods(ArrayList nonRpcMethods) {
- if(nonRpcMethods!=null){
+ if (nonRpcMethods != null) {
this.nonRpcMethods = nonRpcMethods;
}
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java Mon Apr 9 09:57:27 2007
@@ -244,7 +244,7 @@
private void processDeployers(Iterator deployerItr) {
HashMap directoryToExtensionMappingMap = new HashMap();
- HashMap extensioToDeployerMappingMap = new HashMap();
+ HashMap extensionToDeployerMappingMap = new HashMap();
while (deployerItr.hasNext()) {
OMElement element = (OMElement) deployerItr.next();
String directory = element.getAttributeValue(new QName(DIRECTORY));
@@ -260,7 +260,7 @@
deployer.setDirectory(directory);
deployer.setExtension(extension);
directoryToExtensionMappingMap.put(directory, extension);
- extensioToDeployerMappingMap.put(extension, deployer);
+ extensionToDeployerMappingMap.put(extension, deployer);
} catch (ClassNotFoundException e) {
log.error(e);
} catch (InstantiationException e) {
@@ -273,7 +273,7 @@
}
if (deploymentEngine != null) {
deploymentEngine.setDirectoryToExtensionMappingMap(directoryToExtensionMappingMap);
- deploymentEngine.setExtensioToDeployerMappingMap(extensioToDeployerMappingMap);
+ deploymentEngine.setExtensionToDeployerMappingMap(extensionToDeployerMappingMap);
}
}
@@ -384,7 +384,8 @@
while (handlers.hasNext()) {
OMElement omElement = (OMElement) handlers.next();
- HandlerDescription handler = processHandler(omElement, axisConfig);
+ HandlerDescription handler = processHandler(omElement, axisConfig, phaseName);
+// HandlerDescription handler = processHandler(omElement, axisConfig);
handler.getRules().setPhaseName(phaseName);
Utils.loadHandler(axisConfig.getSystemClassLoader(), handler);
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java Mon Apr 9 09:57:27 2007
@@ -103,7 +103,7 @@
private HashMap directoryToExtensionMappingMap = new HashMap();
//to keep map of which deployer can process which file extension ,
// for example ServiceDeployer will process .aar file
- private HashMap extensioToDeployerMappingMap = new HashMap();
+ private HashMap extensionToDeployerMappingMap = new HashMap();
public void loadServices() {
repoListener.checkServices();
@@ -580,7 +580,7 @@
} else if (TYPE_MODULE.equals(type)) {
moduleDeployer.deploy(currentDeploymentFile);
} else {
- Deployer deployer = (Deployer) extensioToDeployerMappingMap.get(type);
+ Deployer deployer = (Deployer) extensionToDeployerMappingMap.get(type);
if (deployer != null) {
try {
deployer.deploy(currentDeploymentFile);
@@ -669,7 +669,7 @@
} else {
if (isHotUpdate()) {
Deployer deployer =
- (Deployer) extensioToDeployerMappingMap.get(fileType);
+ (Deployer) extensionToDeployerMappingMap.get(fileType);
if (deployer != null) {
deployer.unDeploy(wsInfo.getFileName());
}
@@ -874,7 +874,7 @@
private void initializeDeployers(ConfigurationContext configContext) {
serviceDeployer = new ServiceDeployer();
serviceDeployer.init(configContext);
- Iterator deployers = extensioToDeployerMappingMap.values().iterator();
+ Iterator deployers = extensionToDeployerMappingMap.values().iterator();
while (deployers.hasNext()) {
Deployer deployer = (Deployer) deployers.next();
deployer.init(configContext);
@@ -1017,8 +1017,8 @@
return repositoryDir;
}
- public void setExtensioToDeployerMappingMap(HashMap extensioToDeployerMappingMap) {
- this.extensioToDeployerMappingMap = extensioToDeployerMappingMap;
+ public void setExtensionToDeployerMappingMap(HashMap extensionToDeployerMappingMap) {
+ this.extensionToDeployerMappingMap = extensionToDeployerMappingMap;
}
public void setDirectoryToExtensionMappingMap(HashMap directoryToExtensionMappingMap) {
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DescriptionBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DescriptionBuilder.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DescriptionBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DescriptionBuilder.java Mon Apr 9 09:57:27 2007
@@ -30,6 +30,7 @@
import org.apache.axis2.description.ParameterInclude;
import org.apache.axis2.description.PolicyInclude;
import org.apache.axis2.description.WSDL2Constants;
+import org.apache.axis2.description.PhaseRule;
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.axis2.engine.MessageReceiver;
import org.apache.axis2.i18n.Messages;
@@ -372,6 +373,11 @@
}
+ protected HandlerDescription processHandler(OMElement handler_element, ParameterInclude parent)
+ throws DeploymentException
+ {
+ return processHandler(handler_element, parent, null);
+ }
/**
* Processes Handler element.
*
@@ -380,7 +386,8 @@
* @throws DeploymentException <code>DeploymentException</code>
*/
protected HandlerDescription processHandler(OMElement handler_element,
- ParameterInclude parent)
+ ParameterInclude parent,
+ String containingPhase)
throws DeploymentException {
HandlerDescription handler = new HandlerDescription();
@@ -411,10 +418,15 @@
OMElement order_element = handler_element
.getFirstChildWithName(new QName(TAG_ORDER));
+ PhaseRule rules = handler.getRules();
if (order_element == null) {
- throw new DeploymentException((Messages.getMessage(
- DeploymentErrorMsgs.INVALID_HANDLER,
- "phase rule has not been specified")));
+ if (containingPhase == null) {
+ // TODO : Include more information (which handler?) in message!
+ throw new DeploymentException((Messages.getMessage(
+ DeploymentErrorMsgs.INVALID_HANDLER,
+ "phase rule has not been specified")));
+ }
+ rules.setPhaseName(containingPhase);
} else {
Iterator order_itr = order_element.getAllAttributes();
@@ -424,26 +436,26 @@
String value = orderAttribute.getAttributeValue();
if (TAG_AFTER.equals(name)) {
- handler.getRules().setAfter(value);
+ rules.setAfter(value);
} else if (TAG_BEFORE.equals(name)) {
- handler.getRules().setBefore(value);
+ rules.setBefore(value);
} else if (TAG_PHASE.equals(name)) {
- handler.getRules().setPhaseName(value);
+ rules.setPhaseName(value);
} else if (TAG_PHASE_FIRST.equals(name)) {
String boolval = getValue(value);
if (boolval.equals(BOOLEAN_TRUE)) {
- handler.getRules().setPhaseFirst(true);
+ rules.setPhaseFirst(true);
} else if (boolval.equals(BOOLEAN_FALSE)) {
- handler.getRules().setPhaseFirst(false);
+ rules.setPhaseFirst(false);
}
} else if (TAG_PHASE_LAST.equals(name)) {
String boolval = getValue(value);
if (boolval.equals(BOOLEAN_TRUE)) {
- handler.getRules().setPhaseLast(true);
+ rules.setPhaseLast(true);
} else if (boolval.equals(BOOLEAN_FALSE)) {
- handler.getRules().setPhaseLast(false);
+ rules.setPhaseLast(false);
}
}
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/FileSystemConfigurator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/FileSystemConfigurator.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/FileSystemConfigurator.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/FileSystemConfigurator.java Mon Apr 9 09:57:27 2007
@@ -71,14 +71,20 @@
if (axis2xml == null) {
// If not, check for a system property setting
axis2xml = System.getProperty(Constants.AXIS2_CONF);
+
+ // And if not that, try at the root of the repository
+ if (axis2xml == null) {
+ axis2xml = repoLocation + File.separator + Constants.AXIS2_CONF;
+ }
+
// In either case, check that the file exists... if not
// we'll use the default axis2.xml on the classpath.
if (axis2xml != null) {
File configFile = new File(axis2xml);
if (!configFile.exists()) {
- log.info("Error in file (axis2.xml) creation inside FileSystemConfigurator");
- throw new AxisFault(
- "Error in file (axis2.xml) creation inside FileSystemConfigurator");
+ log.info("Config file '" + axis2xml + "' doesn't exist, ignoring.");
+ axis2xml = null;
+// throw new AxisFault("Config file '" + axis2xml + "' doesn't exist");
}
}
}
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java Mon Apr 9 09:57:27 2007
@@ -120,12 +120,11 @@
public static URL[] getURLsForAllJars(URL url) {
try {
ArrayList array = new ArrayList();
- String urlString = url.toString();
+// String urlString = url.toString();
InputStream in = url.openStream();
ZipInputStream zin;
- FileInputStream fin = null;
- array.add(url);
- zin = new ZipInputStream(in);
+ array.add(url);
+ zin = new ZipInputStream(in);
ZipEntry entry;
String entryName;
@@ -143,9 +142,6 @@
}
}
zin.close();
- if (fin != null) {
- fin.close();
- }
return (URL[]) array.toArray(new URL[array.size()]);
} catch (Exception e) {
throw new RuntimeException(e);
@@ -233,6 +229,11 @@
/**
* This guy will create a AxisService using java reflection
+ * @param axisService the target AxisService
+ * @param axisConfig the in-scope AxisConfiguration
+ * @param excludeOperations a List of Strings (or null), each containing a method to exclude
+ * @param nonRpcMethods a List of Strings (or null), each containing a non-rpc method name
+ * @throws Exception if a problem occurs
*/
public static void fillAxisService(AxisService axisService,
AxisConfiguration axisConfig,
@@ -316,7 +317,7 @@
// no need to expose , private and protected methods
continue;
}
- if (excludeOperations.contains(jmethod.getSimpleName())) {
+ if (excludeOperations != null && excludeOperations.contains(jmethod.getSimpleName())) {
continue;
}
String opName = jmethod.getSimpleName();
Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/AbstractTestCase.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/AbstractTestCase.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/AbstractTestCase.java Mon Apr 9 09:57:27 2007
@@ -39,18 +39,22 @@
/**
* Basedir for all file I/O. Important when running tests from
- * the reactor.
+ * the reactor. Note that anyone can use this statically.
*/
- public String basedir = System.getProperty("basedir");
+ public static String basedir;
+
+ static {
+ basedir = System.getProperty("basedir");
+ if (basedir == null) {
+ basedir = new File(".").getAbsolutePath();
+ }
+ }
/**
* @param testName
*/
public AbstractTestCase(String testName) {
super(testName);
- if (basedir == null) {
- basedir = new File(".").getAbsolutePath();
- }
testDir = new File(basedir, testDir).getAbsolutePath();
sampleDir = new File(basedir, sampleDir).getAbsolutePath();
outDir = new File(basedir, outDir).getAbsolutePath();
Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/addressing/wsdl/WSDL11ActionHelperTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/addressing/wsdl/WSDL11ActionHelperTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/addressing/wsdl/WSDL11ActionHelperTest.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/addressing/wsdl/WSDL11ActionHelperTest.java Mon Apr 9 09:57:27 2007
@@ -31,6 +31,8 @@
import java.net.URL;
import java.util.List;
+import org.apache.axis2.AbstractTestCase;
+
public class WSDL11ActionHelperTest extends TestCase {
String testWSDLFile = "/target/test-resources/wsdl/actionTests.wsdl";
@@ -43,7 +45,7 @@
reader.setFeature("javax.wsdl.importDocuments", false);
reader.setFeature("javax.wsdl.verbose", false);
- URL wsdlFile = new File(System.getProperty("basedir") + testWSDLFile)
+ URL wsdlFile = new File(AbstractTestCase.basedir + testWSDLFile)
.toURL();//getClass().getClassLoader().getResource(testWSDLFile);
definition = reader.readWSDL(wsdlFile.toString());
}
Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AddingObserverTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AddingObserverTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AddingObserverTest.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AddingObserverTest.java Mon Apr 9 09:57:27 2007
@@ -19,6 +19,7 @@
import junit.framework.TestCase;
import org.apache.axis2.context.ConfigurationContextFactory;
import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.AbstractTestCase;
public class AddingObserverTest extends TestCase {
@@ -26,7 +27,7 @@
public void testAddingObservs() throws Exception {
try {
- String filename = System.getProperty("basedir") +
+ String filename = AbstractTestCase.basedir +
"/test-resources/deployment/ConfigWithObservers";
er = ConfigurationContextFactory
.createConfigurationContextFromFileSystem(filename, filename + "/axis2.xml")
Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AxisMessageTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AxisMessageTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AxisMessageTest.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AxisMessageTest.java Mon Apr 9 09:57:27 2007
@@ -7,6 +7,7 @@
import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.Parameter;
import org.apache.axis2.engine.AxisConfiguration;
+import org.apache.axis2.AbstractTestCase;
import javax.xml.namespace.QName;
/*
@@ -30,7 +31,7 @@
public void testAxisMessage() throws Exception {
String filename =
- System.getProperty("basedir") + "/test-resources/deployment/AxisMessageTestRepo";
+ AbstractTestCase.basedir + "/test-resources/deployment/AxisMessageTestRepo";
AxisConfiguration er = ConfigurationContextFactory
.createConfigurationContextFromFileSystem(filename, filename + "/axis2.xml")
.getAxisConfiguration();
Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/BuildERWithDeploymentTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/BuildERWithDeploymentTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/BuildERWithDeploymentTest.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/BuildERWithDeploymentTest.java Mon Apr 9 09:57:27 2007
@@ -35,7 +35,7 @@
public void testDeployment() {
try {
- String filename = System.getProperty("basedir") + "/target/test-resources/deployment";
+ String filename = AbstractTestCase.basedir + "/target/test-resources/deployment";
AxisConfiguration er = ConfigurationContextFactory
.createConfigurationContextFromFileSystem(filename, null)
.getAxisConfiguration();
Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/DeploymentTotalTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/DeploymentTotalTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/DeploymentTotalTest.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/DeploymentTotalTest.java Mon Apr 9 09:57:27 2007
@@ -18,6 +18,7 @@
import junit.framework.TestCase;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.AbstractTestCase;
import org.apache.axis2.context.ConfigurationContextFactory;
import org.apache.axis2.description.Parameter;
import org.apache.axis2.engine.AxisConfiguration;
@@ -32,7 +33,7 @@
DeploymentException,
AxisFault,
XMLStreamException {
- String filename = System.getProperty("basedir") + "/target/test-resources/deployment";
+ String filename = AbstractTestCase.basedir + "/target/test-resources/deployment";
er = ConfigurationContextFactory
.createConfigurationContextFromFileSystem(filename, filename + "/axis2.xml")
.getAxisConfiguration();
Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleDisengagementTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleDisengagementTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleDisengagementTest.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleDisengagementTest.java Mon Apr 9 09:57:27 2007
@@ -2,6 +2,7 @@
import junit.framework.TestCase;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.AbstractTestCase;
import org.apache.axis2.context.ConfigurationContextFactory;
import org.apache.axis2.description.AxisModule;
import org.apache.axis2.description.AxisOperation;
@@ -37,7 +38,7 @@
protected void setUp() throws Exception {
String filename =
- System.getProperty("basedir") + "/test-resources/deployment/moduleDisEngegeRepo";
+ AbstractTestCase.basedir + "/test-resources/deployment/moduleDisEngegeRepo";
er = ConfigurationContextFactory.
createConfigurationContextFromFileSystem(filename, null).getAxisConfiguration();
AxisService testService = new AxisService();
Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleversionTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleversionTest.java?view=diff&rev=526827&r1=526826&r2=526827
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleversionTest.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleversionTest.java Mon Apr 9 09:57:27 2007
@@ -2,6 +2,7 @@
import junit.framework.TestCase;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.AbstractTestCase;
import org.apache.axis2.context.ConfigurationContextFactory;
import org.apache.axis2.description.AxisModule;
import org.apache.axis2.engine.AxisConfiguration;
@@ -29,7 +30,7 @@
public class ModuleversionTest extends TestCase {
public void testDefautModuleVersion() throws AxisFault {
- String filename = System.getProperty("basedir") +
+ String filename = AbstractTestCase.basedir +
"/test-resources/deployment/moduleVersion/Test1/axis2.xml";
AxisConfiguration ac =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, filename)
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org