Author: thomas.diesler(a)jboss.com
Date: 2007-07-13 09:42:05 -0400 (Fri, 13 Jul 2007)
New Revision: 3881
Modified:
branches/tdiesler/trunk/build/ant-import/build-testsuite.xml
branches/tdiesler/trunk/integration/native/build.xml
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java
Log:
partial commit
Modified: branches/tdiesler/trunk/build/ant-import/build-testsuite.xml
===================================================================
--- branches/tdiesler/trunk/build/ant-import/build-testsuite.xml 2007-07-13 12:40:49 UTC
(rev 3880)
+++ branches/tdiesler/trunk/build/ant-import/build-testsuite.xml 2007-07-13 13:42:05 UTC
(rev 3881)
@@ -202,8 +202,10 @@
<pathelement location="${jboss.client}/jaxb-xjc.jar"/>
<pathelement
location="${jboss.client}/jboss-aop-jdk50-client.jar"/>
<pathelement
location="${jboss.client}/jboss-aspect-jdk50-client.jar"/>
+ <pathelement location="${jboss.client}/jboss-ejb3x.jar"/>
+ <pathelement location="${jboss.client}/jboss-ejb3-client.jar"/>
+ <pathelement location="${jboss.client}/jboss-saaj.jar"/>
<pathelement location="${jboss.client}/jbossws-jboss40.jar"/>
- <pathelement location="${jboss.client}/jboss-saaj.jar"/>
<pathelement location="${jboss.client}/jbossall-client.jar"/>
<pathelement location="${jboss.client}/log4j.jar"/>
<pathelement location="${jboss.client}/wsdl4j.jar"/>
Modified: branches/tdiesler/trunk/integration/native/build.xml
===================================================================
--- branches/tdiesler/trunk/integration/native/build.xml 2007-07-13 12:40:49 UTC (rev
3880)
+++ branches/tdiesler/trunk/integration/native/build.xml 2007-07-13 13:42:05 UTC (rev
3881)
@@ -259,7 +259,6 @@
<metainf dir="${core.dir}/src/main/resources/standard-config">
<include name="standard-*-config.xml"/>
</metainf>
- <metainf
dir="${native.resources.dir}/jbossws-native40.sar/META-INF"/>
</jar>
</target>
Modified:
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java
===================================================================
---
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java 2007-07-13
12:40:49 UTC (rev 3880)
+++
branches/tdiesler/trunk/jbossws-core/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java 2007-07-13
13:42:05 UTC (rev 3881)
@@ -24,6 +24,7 @@
// $Id$
import java.io.IOException;
+import java.lang.reflect.Field;
import java.net.MalformedURLException;
import java.net.SocketTimeoutException;
import java.net.URL;
@@ -224,7 +225,7 @@
Marshaller marshaller = getMarshaller();
UnMarshaller unmarshaller = getUnmarshaller();
- /*
+ /**
* [JBWS-1704] The Use Of Remoting Causes An Additional 'datatype'
Parameter To Be Sent On All Requests
*
* An HTTPClientInvoker may disconnect from the server and recreated by the
remoting layer.
@@ -234,9 +235,8 @@
*
* This applies to remoting-1.4.5 and less
*/
- URL location =
Version.class.getProtectionDomain().getCodeSource().getLocation();
- System.out.println(Version.VERSION + " - " + location);
- if (Version.VERSION.startsWith("1.4"))
+ String version = getRemotingVersion();
+ if (version.startsWith("1.4"))
{
targetAddress = addURLParameter(targetAddress, InvokerLocator.DATATYPE,
"JBossWSMessage");
MarshalFactory.addMarshaller("JBossWSMessage", marshaller,
unmarshaller);
@@ -262,6 +262,28 @@
return client;
}
+ private String getRemotingVersion()
+ {
+ String version = null;
+ try
+ {
+ // Access the constant dynamically, otherwise it will be the compile time value
+ Field field = Version.class.getDeclaredField("VERSION");
+ version = (String)field.get(null);
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException("Cannot obtain remoting version", ex);
+ }
+
+ if (version == null)
+ {
+ URL codeURL =
Version.class.getProtectionDomain().getCodeSource().getLocation();
+ throw new RuntimeException("Cannot obtain remoting version from: " +
codeURL);
+ }
+ return version;
+ }
+
protected abstract UnMarshaller getUnmarshaller();
protected abstract Marshaller getMarshaller();
Show replies by date