Author: thomas.diesler(a)jboss.com
Date: 2007-01-24 13:05:52 -0500 (Wed, 24 Jan 2007)
New Revision: 2083
Modified:
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
branches/jbossws-1.2.0/jbossws-tests/build.xml
Log:
Fix jdk1.4 related issues
Modified:
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java 2007-01-24
17:24:03 UTC (rev 2082)
+++
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/FaultMetaData.java 2007-01-24
18:05:52 UTC (rev 2083)
@@ -63,8 +63,8 @@
private QName xmlType;
private String javaTypeName;
private String faultBeanName;
- private Class<? extends Exception> javaType;
- private Class<?> faultBean;
+ private Class javaType;
+ private Class faultBean;
private Method faultInfoMethod;
private Constructor<? extends Exception> serviceExceptionConstructor;
@@ -208,10 +208,13 @@
}
// Initialize the cache
- javaType = getJavaType().asSubclass(Exception.class);
+ javaType = getJavaType();
if (javaType == null)
throw new WSException("Cannot load java type: " + javaTypeName);
+ if (JavaUtils.isAssignableFrom(Exception.class, javaType) == false)
+ throw new WSException("Fault java type is not a java.lang.Exception: "
+ javaTypeName);
+
if (epType == EndpointMetaData.Type.JAXWS)
{
faultBean = getFaultBean();
@@ -244,7 +247,7 @@
{
/* For each getter in the exception and its superclasses, a property of
* the same type and name is added to the bean. */
- XmlType xmlType = faultBean.getAnnotation(XmlType.class);
+ XmlType xmlType = (XmlType)faultBean.getAnnotation(XmlType.class);
if (xmlType == null)
throw new WebServiceException("@XmlType missing from fault bean: "
+ faultBeanName);
Modified:
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java
===================================================================
---
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java 2007-01-24
17:24:03 UTC (rev 2082)
+++
branches/jbossws-1.2.0/jbossws-core/src/main/java/org/jboss/ws/metadata/umdm/ParameterMetaData.java 2007-01-24
18:05:52 UTC (rev 2083)
@@ -109,21 +109,25 @@
private static boolean matchParameter(Method method, int index, Class expectedType,
Set<Integer> matches, boolean exact, boolean holder)
{
Class returnType = method.getReturnType();
- java.lang.reflect.Type[] genericParameters = method.getGenericParameterTypes();
- Class[] classParameters = method.getParameterTypes();
if (index == -1 && matchTypes(returnType, expectedType, exact, false))
return true;
+ Class[] classParameters = method.getParameterTypes();
if (index < 0 || index >= classParameters.length)
return false;
boolean matchTypes;
if (JavaUtils.isRetro14())
+ {
matchTypes = matchTypes(classParameters[index], expectedType, exact, holder);
- else
+ }
+ else
+ {
+ java.lang.reflect.Type[] genericParameters = method.getGenericParameterTypes();
matchTypes = matchTypes(genericParameters[index], expectedType, exact, holder);
+ }
if (matchTypes)
{
@@ -160,9 +164,7 @@
private static boolean matchTypesInternal(Class valueClass, Class expectedType,
boolean exact)
{
- // FIXME - Why do we need this hack? It shouldn't be needed. The method
- // signature should _ALWAYS_ match, else we will get ambiguous or
- // incorrect results
+ // FIXME - Why do we need this hack? The method signature should _ALWAYS_ match,
else we will get ambiguous or incorrect results
List<Class> anyTypes = new ArrayList<Class>();
anyTypes.add(javax.xml.soap.SOAPElement.class);
anyTypes.add(org.w3c.dom.Element.class);
Modified: branches/jbossws-1.2.0/jbossws-tests/build.xml
===================================================================
--- branches/jbossws-1.2.0/jbossws-tests/build.xml 2007-01-24 17:24:03 UTC (rev 2082)
+++ branches/jbossws-1.2.0/jbossws-tests/build.xml 2007-01-24 18:05:52 UTC (rev 2083)
@@ -211,10 +211,6 @@
<javac destdir="${tests.output.dir}/classes"
debug="${javac.debug}" encoding="utf-8"
verbose="${javac.verbose}" deprecation="${javac.deprecation}"
failonerror="${javac.fail.onerror}"
excludesfile="${excludesfile}">
<src path="${tests.java.dir}"/>
- <exclude name="org/jboss/test/ws/interop/**"/>
- <exclude name="org/jboss/test/ws/jaxrpc/jbws718/**"/>
- <exclude name="org/jboss/test/ws/jaxrpc/wseventing/**"/>
- <exclude name="org/jboss/test/ws/jaxrpc/samples/wseventing/**"/>
<exclude name="org/jboss/test/ws/jaxws/**"/>
<exclude name="org/jboss/test/ws/tools/jsr181/**"/>
<classpath refid="javac.classpath"/>
Show replies by date