Author: heiko.braun(a)jboss.com
Date: 2007-03-22 11:55:41 -0400 (Thu, 22 Mar 2007)
New Revision: 2660
Modified:
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
Log:
Merge service-ref fix from trunk
Modified:
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
===================================================================
---
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java 2007-03-22
15:42:02 UTC (rev 2659)
+++
branches/jbossws-1.2.1/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java 2007-03-22
15:55:41 UTC (rev 2660)
@@ -23,6 +23,16 @@
// $Id$
+import org.jboss.logging.Logger;
+import org.jboss.util.naming.Util;
+import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+import javax.jws.HandlerChain;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.WebServiceRefs;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Field;
@@ -32,18 +42,6 @@
import java.util.ArrayList;
import java.util.List;
-import javax.jws.HandlerChain;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceRef;
-import javax.xml.ws.WebServiceRefs;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.naming.Util;
-import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-import org.jboss.ws.WSException;
-
/**
* Binds a JAXWS Service object in the client's ENC
*
@@ -105,10 +103,8 @@
}
else
{
- if(null == wsref.type())
- throw new WSException("For class annotations, the WebServiceRef.type
MUST be specified.");
-
- targetClass = wsref.type();
+ if( wsref!=null && (wsref.type() != Object.class) )
+ targetClass = wsref.type();
}
String targetClassName = (targetClass != null ? targetClass.getName() : null);
Show replies by date