You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by he...@apache.org on 2005/05/17 09:07:08 UTC
svn commit: r170525 - in /webservices/axis/trunk/java: etc/
modules/addressing/test/org/apache/axis/handlers/addressing/
modules/core/src/org/apache/axis/deployment/listener/ modules/samples/
modules/samples/test/org/apache/axis/engine/
modules/samples/test/org/apache/axis/integration/
Author: hemapani
Date: Tue May 17 00:07:06 2005
New Revision: 170525
URL: http://svn.apache.org/viewcvs?rev=170525&view=rev
Log:
modules loading do not work, I add a test case and exclude it
Added:
webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingModuleTest.java
Modified:
webservices/axis/trunk/java/etc/project.xml
webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/listener/RepositoryListenerImpl.java
webservices/axis/trunk/java/modules/samples/maven.xml
webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java
webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java
Modified: webservices/axis/trunk/java/etc/project.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/etc/project.xml?rev=170525&r1=170524&r2=170525&view=diff
==============================================================================
--- webservices/axis/trunk/java/etc/project.xml (original)
+++ webservices/axis/trunk/java/etc/project.xml Tue May 17 00:07:06 2005
@@ -175,7 +175,8 @@
<exclude>**/*AddressingInHandlerTest.java</exclude>
<exclude>**/*AddressingOutHandlerTest.java</exclude>
<exclude>**/*EngineWithDynamicPhaseResolvingTest.java</exclude>
- <exclude>**/*PhaseResolvingTest.java</exclude>
+ <exclude>**/*PhaseResolvingTest.java</exclude>
+ <exclude>**/*AddressingModuleTest.java</exclude>
</excludes>
<includes>
<include>**/*Test.java</include>
Added: webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingModuleTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingModuleTest.java?rev=170525&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingModuleTest.java (added)
+++ webservices/axis/trunk/java/modules/addressing/test/org/apache/axis/handlers/addressing/AddressingModuleTest.java Tue May 17 00:07:06 2005
@@ -0,0 +1,45 @@
+package org.apache.axis.handlers.addressing;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+import org.apache.axis.deployment.DeploymentEngine;
+import org.apache.axis.deployment.DeploymentException;
+import org.apache.axis.description.ModuleDescription;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * 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
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * 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.
+ * <p/>
+ */
+public class AddressingModuleTest extends TestCase {
+
+ /**
+ * @param testName
+ */
+ public AddressingModuleTest(String testName) {
+ super(testName);
+ }
+
+ public void testExtractAddressingInformationFromHeaders() throws DeploymentException {
+ DeploymentEngine deploymentEngine = new DeploymentEngine();
+ ModuleDescription moduleDesc =
+ deploymentEngine.buildModule(
+ new File("target/addressing.mar"));
+ assertNotNull(moduleDesc);
+
+ }
+
+}
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/listener/RepositoryListenerImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/listener/RepositoryListenerImpl.java?rev=170525&r1=170524&r2=170525&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/listener/RepositoryListenerImpl.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/listener/RepositoryListenerImpl.java Tue May 17 00:07:06 2005
@@ -170,7 +170,7 @@
}
private boolean isModuleArchiveFile(String filename) {
- if (filename.endsWith(".jar") | filename.equals(".mar")) {
+ if (filename.endsWith(".jar") || filename.endsWith(".mar")) {
return true;
}
return false;
Modified: webservices/axis/trunk/java/modules/samples/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/maven.xml?rev=170525&r1=170524&r2=170525&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/maven.xml (original)
+++ webservices/axis/trunk/java/modules/samples/maven.xml Tue May 17 00:07:06 2005
@@ -9,6 +9,10 @@
xmlns:ant="jelly:ant">
<postGoal name="test:compile">
<mkdir dir="target/test-resources/samples/modules"/>
- <copy file="../addressing/target/addressing.mar" tofile="target/test-resources/samples/modules/addressing.mar"/>
+ <mkdir dir="target/test-resources/repository-client/modules"/>
+ <copy file="../addressing/target/addressing.mar"
+ tofile="target/test-resources/samples/modules/addressing.mar"/>
+ <copy file="../addressing/target/addressing.mar"
+ tofile="target/test-resources/repository-client/modules/addressing.mar"/>
</postGoal>
</project>
Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java?rev=170525&r1=170524&r2=170525&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/engine/EchoRawXMLTest.java Tue May 17 00:07:06 2005
@@ -18,6 +18,8 @@
//todo
+import java.io.File;
+
import javax.xml.namespace.QName;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
@@ -29,8 +31,13 @@
import org.apache.axis.addressing.EndpointReference;
import org.apache.axis.clientapi.AsyncResult;
import org.apache.axis.clientapi.Callback;
+import org.apache.axis.context.ConfigurationContext;
+import org.apache.axis.context.EngineContextFactory;
import org.apache.axis.context.MessageContext;
import org.apache.axis.context.ServiceContext;
+import org.apache.axis.deployment.DeploymentEngine;
+import org.apache.axis.description.GlobalDescription;
+import org.apache.axis.description.ModuleDescription;
import org.apache.axis.description.ServiceDescription;
import org.apache.axis.integration.UtilServer;
import org.apache.axis.om.OMAbstractFactory;
@@ -60,7 +67,7 @@
private Thread thisThread;
private SimpleHTTPServer sas;
private ServiceContext serviceContext;
-
+ private ServiceDescription service;
private boolean finish = false;
@@ -74,14 +81,15 @@
protected void setUp() throws Exception {
UtilServer.start();
- ServiceDescription service =
+ service =
Utils.createSimpleService(
serviceName,
org.apache.axis.engine.Echo.class.getName(),
operationName);
UtilServer.deployService(service);
- serviceContext = UtilServer.getConfigurationContext().createServiceContext(service.getName());
-
+ serviceContext =
+ UtilServer.getConfigurationContext().createServiceContext(service.getName());
+
}
protected void tearDown() throws Exception {
@@ -100,96 +108,54 @@
return reqEnv;
}
- public void testEchoXMLASync() throws Exception {
- SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
-
- SOAPEnvelope reqEnv = createEnvelope(fac);
-
- org.apache.axis.clientapi.Call call = new org.apache.axis.clientapi.Call();
-
- call.setTo(targetEPR);
- call.setTransportInfo(Constants.TRANSPORT_HTTP,Constants.TRANSPORT_HTTP, false);
-
- Callback callback = new Callback() {
- public void onComplete(AsyncResult result) {
- try {
- result.getResponseEnvelope().serializeWithCache(
- XMLOutputFactory.newInstance().createXMLStreamWriter(System.out));
- } catch (XMLStreamException e) {
- reportError(e);
- } finally {
- finish = true;
- }
- }
-
- public void reportError(Exception e) {
- e.printStackTrace();
+ public void testEchoXMLASync() throws Exception {
+ SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
+
+ SOAPEnvelope reqEnv = createEnvelope(fac);
+
+ org.apache.axis.clientapi.Call call = new org.apache.axis.clientapi.Call();
+
+ call.setTo(targetEPR);
+ call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
+
+ Callback callback = new Callback() {
+ public void onComplete(AsyncResult result) {
+ try {
+ result.getResponseEnvelope().serializeWithCache(
+ XMLOutputFactory.newInstance().createXMLStreamWriter(System.out));
+ } catch (XMLStreamException e) {
+ reportError(e);
+ } finally {
finish = true;
}
- };
-
- call.invokeNonBlocking(operationName.getLocalPart(),reqEnv, callback);
- while (!finish) {
- Thread.sleep(1000);
}
-
- log.info("send the reqest");
- }
-
- public void testEchoXMLSync() throws Exception {
- SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
-
- SOAPEnvelope reqEnv = createEnvelope(fac);
-
- org.apache.axis.clientapi.Call call = new org.apache.axis.clientapi.Call();
-
- call.setTo(targetEPR);
- call.setTransportInfo(Constants.TRANSPORT_HTTP,Constants.TRANSPORT_HTTP, false);
-
- SOAPEnvelope result = (SOAPEnvelope)call.invokeBlocking(operationName.getLocalPart(),reqEnv);
- result.serializeWithCache(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out));
+
+ public void reportError(Exception e) {
+ e.printStackTrace();
+ finish = true;
+ }
+ };
+
+ call.invokeNonBlocking(operationName.getLocalPart(), reqEnv, callback);
+ while (!finish) {
+ Thread.sleep(1000);
}
-//
-//
-// public void testEchoXMLCompleteASync() throws Exception {
-// SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
-//
-// SOAPEnvelope reqEnv = fac.getDefaultEnvelope();
-// OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
-// OMElement method = fac.createOMElement("echoOMElement", omNs);
-// OMElement value = fac.createOMElement("myValue", omNs);
-// value.setText("Isaac Assimov, the foundation Sega");
-// method.addChild(value);
-// reqEnv.getBody().addChild(method);
-//
-// org.apache.axis.clientapi.Call call = new org.apache.axis.clientapi.Call();
-//
-// call.setTo(targetEPR);
-// call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
-// Callback callback = new Callback() {
-// public void onComplete(AsyncResult result) {
-// try {
-// result.getResponseEnvelope().serialize(
-// XMLOutputFactory.newInstance().createXMLStreamWriter(System.out));
-// } catch (XMLStreamException e) {
-// reportError(e);
-// } finally {
-// finish = true;
-// }
-// }
-//
-// public void reportError(Exception e) {
-// e.printStackTrace();
-// finish = true;
-// }
-// };
-//
-// call.invokeNonBlocking(operationName.getLocalPart(), reqEnv, callback);
-// while (!finish) {
-// Thread.sleep(1000);
-// }
-//
-// log.info("send the reqest");
-// }
+ log.info("send the reqest");
+ }
+
+ public void testEchoXMLSync() throws Exception {
+ SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
+
+ SOAPEnvelope reqEnv = createEnvelope(fac);
+
+ org.apache.axis.clientapi.Call call = new org.apache.axis.clientapi.Call();
+
+ call.setTo(targetEPR);
+ call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
+
+ SOAPEnvelope result =
+ (SOAPEnvelope) call.invokeBlocking(operationName.getLocalPart(), reqEnv);
+ result.serializeWithCache(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out));
+ }
}
Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java?rev=170525&r1=170524&r2=170525&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis/integration/UtilServer.java Tue May 17 00:07:06 2005
@@ -52,9 +52,10 @@
if (count == 0) {
EngineContextFactory erfac = new EngineContextFactory();
- //File file = new File("modules/samples/target/test-resources/samples");
- File file = new File("target/test-resources/samples");
- System.out.println(new File(file,"server.xml").exists());
+ File file = new File("modules/samples/target/test-resources/samples");
+ if(!file.exists()){
+ throw new Exception("repository directory does not exists");
+ }
ConfigurationContext er = erfac.buildEngineContext(file.getAbsolutePath());
try {
Thread.sleep(2000);