Author: mriou
Date: Sat Aug 19 14:04:06 2006
New Revision: 432878
URL: http://svn.apache.org/viewvc?rev=432878&view=rev
Log:
Making WS client a bit more tolerant.
Modified:
incubator/ode/trunk/axis2/pom.xml
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/service/ManagementService.java
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/service/ServiceClientUtil.java
incubator/ode/trunk/axis2/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java
Modified: incubator/ode/trunk/axis2/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/axis2/pom.xml?rev=432878&r1=432877&r2=432878&view=diff
==============================================================================
--- incubator/ode/trunk/axis2/pom.xml (original)
+++ incubator/ode/trunk/axis2/pom.xml Sat Aug 19 14:04:06 2006
@@ -30,7 +30,7 @@
</parent>
<version>2.0-SNAPSHOT</version>
<properties>
- <!-- maven.test.skip>false</maven.test.skip -->
+ <maven.test.skip>false</maven.test.skip>
</properties>
<dependencies>
@@ -126,9 +126,184 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- <scope>test</scope>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+
+
+
+ <dependency>
+ <groupId>axis2</groupId>
+ <artifactId>axis2-codegen</artifactId>
+ <version>${axis2Version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>axis2</groupId>
+ <artifactId>axis2-common</artifactId>
+ <version>${axis2Version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>axis2</groupId>
+ <artifactId>axis2-core</artifactId>
+ <version>${axis2Version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>axis2</groupId>
+ <artifactId>axis2-java2wsdl</artifactId>
+ <version>${axis2Version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>axis2</groupId>
+ <artifactId>axis2-jibx</artifactId>
+ <version>${axis2Version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>axis2</groupId>
+ <artifactId>axis2-kernel</artifactId>
+ <version>${axis2Version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>axis2</groupId>
+ <artifactId>axis2-saaj</artifactId>
+ <version>${axis2Version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>axis2</groupId>
+ <artifactId>axis2-security</artifactId>
+ <version>${axis2Version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>axis2</groupId>
+ <artifactId>axis2-xmlbeans</artifactId>
+ <version>${axis2Version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>ws-commons</groupId>
+ <artifactId>axiom-api</artifactId>
+ <version>${axis2Version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>ws-commons</groupId>
+ <artifactId>axiom-dom</artifactId>
+ <version>${axis2Version}</version>
+ <scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>ws-commons</groupId>
+ <artifactId>axiom-impl</artifactId>
+ <version>${axis2Version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>ws-commons</groupId>
+ <artifactId>neethi</artifactId>
+ <version>1.0.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.commons</groupId>
+ <artifactId>XmlSchema</artifactId>
+ <version>1.0.2</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- Other dependencies (brought by Axis2) -->
+ <dependency>
+ <groupId>annogen</groupId>
+ <artifactId>annogen</artifactId>
+ <version>0.1.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>backport-util-concurrent</groupId>
+ <artifactId>backport-util-concurrent</artifactId>
+ <version>2.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>1.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>geronimo-spec</groupId>
+ <artifactId>geronimo-spec-activation</artifactId>
+ <version>1.0.2-rc4</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>geronimo-spec</groupId>
+ <artifactId>geronimo-spec-javamail</artifactId>
+ <version>1.3.1-rc5</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>geronimo-spec</groupId>
+ <artifactId>geronimo-spec-jms</artifactId>
+ <version>1.1-rc4</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jibx</groupId>
+ <artifactId>jibx-run</artifactId>
+ <version>1.1-beta3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ <version>2.9.3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <forkMode>pertest</forkMode>
+ <childDelegation>true</childDelegation>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
</project>
Modified:
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/service/ManagementService.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/service/ManagementService.java?rev=432878&r1=432877&r2=432878&view=diff
==============================================================================
---
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/service/ManagementService.java
(original)
+++
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/service/ManagementService.java
Sat Aug 19 14:04:06 2006
@@ -143,7 +143,8 @@
private static Object convertFromOM(Class clazz, OMElement elmt) throws
AxisFault {
// Here comes the nasty code...
- if (elmt == null) return null;
+ if (elmt == null || elmt.getText().length() == 0 &&
!elmt.getChildElements().hasNext())
+ return null;
else if (clazz.equals(String.class)) {
return elmt.getText();
} else if (clazz.equals(Boolean.class) || clazz.equals(Boolean.TYPE)) {
Modified:
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/service/ServiceClientUtil.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/service/ServiceClientUtil.java?rev=432878&r1=432877&r2=432878&view=diff
==============================================================================
---
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/service/ServiceClientUtil.java
(original)
+++
incubator/ode/trunk/axis2/src/main/java/org/apache/ode/axis2/service/ServiceClientUtil.java
Sat Aug 19 14:04:06 2006
@@ -74,7 +74,9 @@
OMElement root = _factory.createOMElement(operation, pmns);
for (int m = 0; m < params.length; m++) {
OMElement omelmt = _factory.createOMElement(params[m], null);
- if (values[m] instanceof String)
+ if (values[m] == null)
+ omelmt.setText("");
+ else if (values[m] instanceof String)
omelmt.setText((String) values[m]);
else if (values[m] instanceof QName)
omelmt.setText((QName) values[m]);
Modified:
incubator/ode/trunk/axis2/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java
URL:
http://svn.apache.org/viewvc/incubator/ode/trunk/axis2/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java?rev=432878&r1=432877&r2=432878&view=diff
==============================================================================
---
incubator/ode/trunk/axis2/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java
(original)
+++
incubator/ode/trunk/axis2/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java
Sat Aug 19 14:04:06 2006
@@ -188,4 +188,8 @@
return _client.send(msg,
"http://localhost:8080/ode/services/DeploymentService");
}
+ public static void main(String[] args) {
+ junit.textui.TestRunner.run(new InstanceManagementTest());
+ }
+
}